From 275f1219469ca28cecd31545d8d430ff7907624e Mon Sep 17 00:00:00 2001 From: factset-sdk-bot Date: Tue, 4 Jan 2022 09:45:07 +0000 Subject: [PATCH 1/2] feat(sdk): Auto-commit from 'analyticsapi-engines-sdk-generator' repository PR 44 for SDK version v5.3.0 --- auto-generated-sdk/.openapi-generator/FILES | 6 + auto-generated-sdk/README.md | 3 + auto-generated-sdk/docs/OneOfQuantDates.md | 14 + auto-generated-sdk/docs/OneOfQuantFormulas.md | 11 + auto-generated-sdk/docs/OneOfQuantUniverse.md | 12 + .../docs/QuantCalculationParameters.md | 6 +- .../docs/QuantCalculationsApi.md | 24 +- .../engines/model/one_of_quant_dates.py | 245 ++++++++++++++++++ .../engines/model/one_of_quant_formulas.py | 180 +++++++++++++ .../engines/model/one_of_quant_universe.py | 245 ++++++++++++++++++ .../model/quant_calculation_parameters.py | 21 +- .../analyticsapi/engines/models/__init__.py | 3 + 12 files changed, 749 insertions(+), 21 deletions(-) create mode 100644 auto-generated-sdk/docs/OneOfQuantDates.md create mode 100644 auto-generated-sdk/docs/OneOfQuantFormulas.md create mode 100644 auto-generated-sdk/docs/OneOfQuantUniverse.md create mode 100644 auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py create mode 100644 auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py create mode 100644 auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py diff --git a/auto-generated-sdk/.openapi-generator/FILES b/auto-generated-sdk/.openapi-generator/FILES index 47b60f7d..d2b6f11c 100644 --- a/auto-generated-sdk/.openapi-generator/FILES +++ b/auto-generated-sdk/.openapi-generator/FILES @@ -104,6 +104,9 @@ docs/NPOOptimizerApi.md docs/NPOOptimizerStrategy.md docs/NPOOptimizerStrategyOverrides.md docs/ObjectRoot.md +docs/OneOfQuantDates.md +docs/OneOfQuantFormulas.md +docs/OneOfQuantUniverse.md docs/OptimalPortfolio.md docs/Optimization.md docs/OptimizerAccount.md @@ -320,6 +323,9 @@ fds/analyticsapi/engines/model/npo_optimization_parameters_root.py fds/analyticsapi/engines/model/npo_optimizer_strategy.py fds/analyticsapi/engines/model/npo_optimizer_strategy_overrides.py fds/analyticsapi/engines/model/object_root.py +fds/analyticsapi/engines/model/one_of_quant_dates.py +fds/analyticsapi/engines/model/one_of_quant_formulas.py +fds/analyticsapi/engines/model/one_of_quant_universe.py fds/analyticsapi/engines/model/optimal_portfolio.py fds/analyticsapi/engines/model/optimization.py fds/analyticsapi/engines/model/optimizer_account.py diff --git a/auto-generated-sdk/README.md b/auto-generated-sdk/README.md index c901ec03..960e64cd 100644 --- a/auto-generated-sdk/README.md +++ b/auto-generated-sdk/README.md @@ -299,6 +299,9 @@ Class | Method | HTTP request | Description - [NPOOptimizerStrategy](docs/NPOOptimizerStrategy.md) - [NPOOptimizerStrategyOverrides](docs/NPOOptimizerStrategyOverrides.md) - [ObjectRoot](docs/ObjectRoot.md) + - [OneOfQuantDates](docs/OneOfQuantDates.md) + - [OneOfQuantFormulas](docs/OneOfQuantFormulas.md) + - [OneOfQuantUniverse](docs/OneOfQuantUniverse.md) - [OptimalPortfolio](docs/OptimalPortfolio.md) - [Optimization](docs/Optimization.md) - [OptimizerAccount](docs/OptimizerAccount.md) diff --git a/auto-generated-sdk/docs/OneOfQuantDates.md b/auto-generated-sdk/docs/OneOfQuantDates.md new file mode 100644 index 00000000..53d54f52 --- /dev/null +++ b/auto-generated-sdk/docs/OneOfQuantDates.md @@ -0,0 +1,14 @@ +# OneOfQuantDates + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **str** | | +**frequency** | **str** | | [optional] +**calendar** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/auto-generated-sdk/docs/OneOfQuantFormulas.md b/auto-generated-sdk/docs/OneOfQuantFormulas.md new file mode 100644 index 00000000..1b600777 --- /dev/null +++ b/auto-generated-sdk/docs/OneOfQuantFormulas.md @@ -0,0 +1,11 @@ +# OneOfQuantFormulas + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[object]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/auto-generated-sdk/docs/OneOfQuantUniverse.md b/auto-generated-sdk/docs/OneOfQuantUniverse.md new file mode 100644 index 00000000..e21ed7b0 --- /dev/null +++ b/auto-generated-sdk/docs/OneOfQuantUniverse.md @@ -0,0 +1,12 @@ +# OneOfQuantUniverse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/auto-generated-sdk/docs/QuantCalculationParameters.md b/auto-generated-sdk/docs/QuantCalculationParameters.md index e5984a30..756cfd29 100644 --- a/auto-generated-sdk/docs/QuantCalculationParameters.md +++ b/auto-generated-sdk/docs/QuantCalculationParameters.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**universe** | **object** | | [optional] -**dates** | **object** | | [optional] -**formulas** | **[object]** | | [optional] +**universe** | [**OneOfQuantUniverse**](OneOfQuantUniverse.md) | | [optional] +**dates** | [**OneOfQuantDates**](OneOfQuantDates.md) | | [optional] +**formulas** | [**OneOfQuantFormulas**](OneOfQuantFormulas.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/auto-generated-sdk/docs/QuantCalculationsApi.md b/auto-generated-sdk/docs/QuantCalculationsApi.md index b1c4ca44..ada3b6bf 100644 --- a/auto-generated-sdk/docs/QuantCalculationsApi.md +++ b/auto-generated-sdk/docs/QuantCalculationsApi.md @@ -515,18 +515,18 @@ with fds.analyticsapi.engines.ApiClient(configuration) as api_client: quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ "key": QuantCalculationParameters( - universe= + universe=OneOfQuantUniverse( universe_type="Equity", identifiers=[ "identifiers_example", ], - , - dates= + ), + dates=OneOfQuantDates( dates=[], - , - formulas=[ + ), + formulas=OneOfQuantFormulas([ , - ], + ]), ), }, meta=QuantCalculationMeta( @@ -639,18 +639,18 @@ with fds.analyticsapi.engines.ApiClient(configuration) as api_client: quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ "key": QuantCalculationParameters( - universe= + universe=OneOfQuantUniverse( universe_type="Equity", identifiers=[ "identifiers_example", ], - , - dates= + ), + dates=OneOfQuantDates( dates=[], - , - formulas=[ + ), + formulas=OneOfQuantFormulas([ , - ], + ]), ), }, meta=QuantCalculationMeta( diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py new file mode 100644 index 00000000..54a726c2 --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py @@ -0,0 +1,245 @@ +""" + Engines API + + Allow clients to fetch Analytics through APIs. # noqa: E501 + + The version of the OpenAPI document: v3:[pa,spar,vault,pub,quant,fi,axp,afi,npo,bpm,fpo,others],v1:[fiab] + Contact: analytics.api.support@factset.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fds.analyticsapi.engines.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, +) + +def lazy_import(): + from fds.analyticsapi.engines.model.quant_date_list import QuantDateList + from fds.analyticsapi.engines.model.quant_fds_date import QuantFdsDate + globals()['QuantDateList'] = QuantDateList + globals()['QuantFdsDate'] = QuantFdsDate + + +class OneOfQuantDates(ModelComposed): + """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 = { + ('source',): { + 'FDSDATE': "FdsDate", + 'DATELIST': "DateList", + }, + } + + 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 + """ + lazy_import() + 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. + """ + lazy_import() + return { + 'source': (str,), # noqa: E501 + 'frequency': (str,), # noqa: E501 + 'calendar': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'DateList': QuantDateList, + 'FdsDate': QuantFdsDate, + 'QuantDateList': QuantDateList, + 'QuantFdsDate': QuantFdsDate, + } + if not val: + return None + return {'source': val} + + attribute_map = { + 'source': 'source', # noqa: E501 + 'frequency': 'frequency', # noqa: E501 + 'calendar': 'calendar', # noqa: E501 + } + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, source, *args, **kwargs): # noqa: E501 + """OneOfQuantDates - a model defined in OpenAPI + + Args: + source (str): + + 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,) + frequency (str): [optional] # noqa: E501 + calendar (str): [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__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + required_args = { + 'source': source, + } + model_args = {} + model_args.update(required_args) + model_args.update(kwargs) + composed_info = validate_get_composed_info( + constant_args, model_args, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + unused_args = composed_info[3] + + for var_name, var_value in required_args.items(): + setattr(self, var_name, var_value) + for var_name, var_value in kwargs.items(): + if var_name in unused_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + not self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error beause the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ], + 'oneOf': [ + QuantDateList, + QuantFdsDate, + ], + } diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py new file mode 100644 index 00000000..931665d1 --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py @@ -0,0 +1,180 @@ +""" + Engines API + + Allow clients to fetch Analytics through APIs. # noqa: E501 + + The version of the OpenAPI document: v3:[pa,spar,vault,pub,quant,fi,axp,afi,npo,bpm,fpo,others],v1:[fiab] + Contact: analytics.api.support@factset.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fds.analyticsapi.engines.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, +) + + +class OneOfQuantFormulas(ModelSimple): + """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. + 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 = { + } + + validations = { + } + + additional_properties_type = None + + _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 { + 'value': ([object],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + _composed_schemas = None + + 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): + """OneOfQuantFormulas - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([object]): # noqa: E501 + + Keyword Args: + value ([object]): # noqa: E501 + _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,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py new file mode 100644 index 00000000..93969e76 --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py @@ -0,0 +1,245 @@ +""" + Engines API + + Allow clients to fetch Analytics through APIs. # noqa: E501 + + The version of the OpenAPI document: v3:[pa,spar,vault,pub,quant,fi,axp,afi,npo,bpm,fpo,others],v1:[fiab] + Contact: analytics.api.support@factset.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from fds.analyticsapi.engines.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, +) + +def lazy_import(): + from fds.analyticsapi.engines.model.quant_identifier_universe import QuantIdentifierUniverse + from fds.analyticsapi.engines.model.quant_screening_expression_universe import QuantScreeningExpressionUniverse + from fds.analyticsapi.engines.model.quant_universal_screen_universe import QuantUniversalScreenUniverse + globals()['QuantIdentifierUniverse'] = QuantIdentifierUniverse + globals()['QuantScreeningExpressionUniverse'] = QuantScreeningExpressionUniverse + globals()['QuantUniversalScreenUniverse'] = QuantUniversalScreenUniverse + + +class OneOfQuantUniverse(ModelComposed): + """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 = { + ('source',): { + 'SCREENINGEXPRESSIONUNIVERSE': "ScreeningExpressionUniverse", + 'UNIVERSALSCREENUNIVERSE': "UniversalScreenUniverse", + 'IDENTIFIERUNIVERSE': "IdentifierUniverse", + }, + } + + 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 + """ + lazy_import() + 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. + """ + lazy_import() + return { + 'source': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + lazy_import() + val = { + 'IdentifierUniverse': QuantIdentifierUniverse, + 'QuantIdentifierUniverse': QuantIdentifierUniverse, + 'QuantScreeningExpressionUniverse': QuantScreeningExpressionUniverse, + 'QuantUniversalScreenUniverse': QuantUniversalScreenUniverse, + 'ScreeningExpressionUniverse': QuantScreeningExpressionUniverse, + 'UniversalScreenUniverse': QuantUniversalScreenUniverse, + } + if not val: + return None + return {'source': val} + + attribute_map = { + 'source': 'source', # noqa: E501 + } + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, source, *args, **kwargs): # noqa: E501 + """OneOfQuantUniverse - a model defined in OpenAPI + + Args: + source (str): + + 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,) + """ + + _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__,) + + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + required_args = { + 'source': source, + } + model_args = {} + model_args.update(required_args) + model_args.update(kwargs) + composed_info = validate_get_composed_info( + constant_args, model_args, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + unused_args = composed_info[3] + + for var_name, var_value in required_args.items(): + setattr(self, var_name, var_value) + for var_name, var_value in kwargs.items(): + if var_name in unused_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + not self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + @cached_property + def _composed_schemas(): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error beause the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + 'anyOf': [ + ], + 'allOf': [ + ], + 'oneOf': [ + QuantIdentifierUniverse, + QuantScreeningExpressionUniverse, + QuantUniversalScreenUniverse, + ], + } diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py index 588d616f..672f7d7f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py @@ -27,6 +27,14 @@ validate_get_composed_info, ) +def lazy_import(): + from fds.analyticsapi.engines.model.one_of_quant_dates import OneOfQuantDates + from fds.analyticsapi.engines.model.one_of_quant_formulas import OneOfQuantFormulas + from fds.analyticsapi.engines.model.one_of_quant_universe import OneOfQuantUniverse + globals()['OneOfQuantDates'] = OneOfQuantDates + globals()['OneOfQuantFormulas'] = OneOfQuantFormulas + globals()['OneOfQuantUniverse'] = OneOfQuantUniverse + class QuantCalculationParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -72,10 +80,11 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - 'universe': (object,), # noqa: E501 - 'dates': (object,), # noqa: E501 - 'formulas': ([object],), # noqa: E501 + 'universe': (OneOfQuantUniverse,), # noqa: E501 + 'dates': (OneOfQuantDates,), # noqa: E501 + 'formulas': (OneOfQuantFormulas,), # noqa: E501 } @cached_property @@ -135,9 +144,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - universe (object): [optional] # noqa: E501 - dates (object): [optional] # noqa: E501 - formulas ([object]): [optional] # noqa: E501 + universe (OneOfQuantUniverse): [optional] # noqa: E501 + dates (OneOfQuantDates): [optional] # noqa: E501 + formulas (OneOfQuantFormulas): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py b/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py index bf0c031e..6cc49179 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py @@ -91,6 +91,9 @@ from fds.analyticsapi.engines.model.npo_optimizer_strategy import NPOOptimizerStrategy from fds.analyticsapi.engines.model.npo_optimizer_strategy_overrides import NPOOptimizerStrategyOverrides from fds.analyticsapi.engines.model.object_root import ObjectRoot +from fds.analyticsapi.engines.model.one_of_quant_dates import OneOfQuantDates +from fds.analyticsapi.engines.model.one_of_quant_formulas import OneOfQuantFormulas +from fds.analyticsapi.engines.model.one_of_quant_universe import OneOfQuantUniverse from fds.analyticsapi.engines.model.optimal_portfolio import OptimalPortfolio from fds.analyticsapi.engines.model.optimization import Optimization from fds.analyticsapi.engines.model.optimizer_account import OptimizerAccount From 66e2b46025f42a0f690f910e88411ecefc4eda36 Mon Sep 17 00:00:00 2001 From: factset-sdk-bot Date: Thu, 6 Jan 2022 04:29:43 +0000 Subject: [PATCH 2/2] feat(sdk): Auto-commit from 'analyticsapi-engines-sdk-generator' repository PR 44 for SDK version v5.3.0 --- auto-generated-sdk/.openapi-generator/FILES | 6 - auto-generated-sdk/README.md | 3 - auto-generated-sdk/docs/OneOfQuantDates.md | 14 - auto-generated-sdk/docs/OneOfQuantFormulas.md | 11 - auto-generated-sdk/docs/OneOfQuantUniverse.md | 12 - .../docs/QuantCalculationParameters.md | 6 +- .../docs/QuantCalculationsApi.md | 24 +- .../engines/model/one_of_quant_dates.py | 245 ------------------ .../engines/model/one_of_quant_formulas.py | 180 ------------- .../engines/model/one_of_quant_universe.py | 245 ------------------ .../model/quant_calculation_parameters.py | 21 +- .../analyticsapi/engines/models/__init__.py | 3 - 12 files changed, 21 insertions(+), 749 deletions(-) delete mode 100644 auto-generated-sdk/docs/OneOfQuantDates.md delete mode 100644 auto-generated-sdk/docs/OneOfQuantFormulas.md delete mode 100644 auto-generated-sdk/docs/OneOfQuantUniverse.md delete mode 100644 auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py delete mode 100644 auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py delete mode 100644 auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py diff --git a/auto-generated-sdk/.openapi-generator/FILES b/auto-generated-sdk/.openapi-generator/FILES index d2b6f11c..47b60f7d 100644 --- a/auto-generated-sdk/.openapi-generator/FILES +++ b/auto-generated-sdk/.openapi-generator/FILES @@ -104,9 +104,6 @@ docs/NPOOptimizerApi.md docs/NPOOptimizerStrategy.md docs/NPOOptimizerStrategyOverrides.md docs/ObjectRoot.md -docs/OneOfQuantDates.md -docs/OneOfQuantFormulas.md -docs/OneOfQuantUniverse.md docs/OptimalPortfolio.md docs/Optimization.md docs/OptimizerAccount.md @@ -323,9 +320,6 @@ fds/analyticsapi/engines/model/npo_optimization_parameters_root.py fds/analyticsapi/engines/model/npo_optimizer_strategy.py fds/analyticsapi/engines/model/npo_optimizer_strategy_overrides.py fds/analyticsapi/engines/model/object_root.py -fds/analyticsapi/engines/model/one_of_quant_dates.py -fds/analyticsapi/engines/model/one_of_quant_formulas.py -fds/analyticsapi/engines/model/one_of_quant_universe.py fds/analyticsapi/engines/model/optimal_portfolio.py fds/analyticsapi/engines/model/optimization.py fds/analyticsapi/engines/model/optimizer_account.py diff --git a/auto-generated-sdk/README.md b/auto-generated-sdk/README.md index 960e64cd..c901ec03 100644 --- a/auto-generated-sdk/README.md +++ b/auto-generated-sdk/README.md @@ -299,9 +299,6 @@ Class | Method | HTTP request | Description - [NPOOptimizerStrategy](docs/NPOOptimizerStrategy.md) - [NPOOptimizerStrategyOverrides](docs/NPOOptimizerStrategyOverrides.md) - [ObjectRoot](docs/ObjectRoot.md) - - [OneOfQuantDates](docs/OneOfQuantDates.md) - - [OneOfQuantFormulas](docs/OneOfQuantFormulas.md) - - [OneOfQuantUniverse](docs/OneOfQuantUniverse.md) - [OptimalPortfolio](docs/OptimalPortfolio.md) - [Optimization](docs/Optimization.md) - [OptimizerAccount](docs/OptimizerAccount.md) diff --git a/auto-generated-sdk/docs/OneOfQuantDates.md b/auto-generated-sdk/docs/OneOfQuantDates.md deleted file mode 100644 index 53d54f52..00000000 --- a/auto-generated-sdk/docs/OneOfQuantDates.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneOfQuantDates - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**source** | **str** | | -**frequency** | **str** | | [optional] -**calendar** | **str** | | [optional] -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/auto-generated-sdk/docs/OneOfQuantFormulas.md b/auto-generated-sdk/docs/OneOfQuantFormulas.md deleted file mode 100644 index 1b600777..00000000 --- a/auto-generated-sdk/docs/OneOfQuantFormulas.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneOfQuantFormulas - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **[object]** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/auto-generated-sdk/docs/OneOfQuantUniverse.md b/auto-generated-sdk/docs/OneOfQuantUniverse.md deleted file mode 100644 index e21ed7b0..00000000 --- a/auto-generated-sdk/docs/OneOfQuantUniverse.md +++ /dev/null @@ -1,12 +0,0 @@ -# OneOfQuantUniverse - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**source** | **str** | | -**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/auto-generated-sdk/docs/QuantCalculationParameters.md b/auto-generated-sdk/docs/QuantCalculationParameters.md index 756cfd29..e5984a30 100644 --- a/auto-generated-sdk/docs/QuantCalculationParameters.md +++ b/auto-generated-sdk/docs/QuantCalculationParameters.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**universe** | [**OneOfQuantUniverse**](OneOfQuantUniverse.md) | | [optional] -**dates** | [**OneOfQuantDates**](OneOfQuantDates.md) | | [optional] -**formulas** | [**OneOfQuantFormulas**](OneOfQuantFormulas.md) | | [optional] +**universe** | **object** | | [optional] +**dates** | **object** | | [optional] +**formulas** | **[object]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/auto-generated-sdk/docs/QuantCalculationsApi.md b/auto-generated-sdk/docs/QuantCalculationsApi.md index ada3b6bf..b1c4ca44 100644 --- a/auto-generated-sdk/docs/QuantCalculationsApi.md +++ b/auto-generated-sdk/docs/QuantCalculationsApi.md @@ -515,18 +515,18 @@ with fds.analyticsapi.engines.ApiClient(configuration) as api_client: quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ "key": QuantCalculationParameters( - universe=OneOfQuantUniverse( + universe= universe_type="Equity", identifiers=[ "identifiers_example", ], - ), - dates=OneOfQuantDates( + , + dates= dates=[], - ), - formulas=OneOfQuantFormulas([ + , + formulas=[ , - ]), + ], ), }, meta=QuantCalculationMeta( @@ -639,18 +639,18 @@ with fds.analyticsapi.engines.ApiClient(configuration) as api_client: quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ "key": QuantCalculationParameters( - universe=OneOfQuantUniverse( + universe= universe_type="Equity", identifiers=[ "identifiers_example", ], - ), - dates=OneOfQuantDates( + , + dates= dates=[], - ), - formulas=OneOfQuantFormulas([ + , + formulas=[ , - ]), + ], ), }, meta=QuantCalculationMeta( diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py deleted file mode 100644 index 54a726c2..00000000 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py +++ /dev/null @@ -1,245 +0,0 @@ -""" - Engines API - - Allow clients to fetch Analytics through APIs. # noqa: E501 - - The version of the OpenAPI document: v3:[pa,spar,vault,pub,quant,fi,axp,afi,npo,bpm,fpo,others],v1:[fiab] - Contact: analytics.api.support@factset.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from fds.analyticsapi.engines.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, -) - -def lazy_import(): - from fds.analyticsapi.engines.model.quant_date_list import QuantDateList - from fds.analyticsapi.engines.model.quant_fds_date import QuantFdsDate - globals()['QuantDateList'] = QuantDateList - globals()['QuantFdsDate'] = QuantFdsDate - - -class OneOfQuantDates(ModelComposed): - """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 = { - ('source',): { - 'FDSDATE': "FdsDate", - 'DATELIST': "DateList", - }, - } - - 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 - """ - lazy_import() - 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. - """ - lazy_import() - return { - 'source': (str,), # noqa: E501 - 'frequency': (str,), # noqa: E501 - 'calendar': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'DateList': QuantDateList, - 'FdsDate': QuantFdsDate, - 'QuantDateList': QuantDateList, - 'QuantFdsDate': QuantFdsDate, - } - if not val: - return None - return {'source': val} - - attribute_map = { - 'source': 'source', # noqa: E501 - 'frequency': 'frequency', # noqa: E501 - 'calendar': 'calendar', # noqa: E501 - } - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, source, *args, **kwargs): # noqa: E501 - """OneOfQuantDates - a model defined in OpenAPI - - Args: - source (str): - - 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,) - frequency (str): [optional] # noqa: E501 - calendar (str): [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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - required_args = { - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) - composed_info = validate_get_composed_info( - constant_args, model_args, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - unused_args = composed_info[3] - - for var_name, var_value in required_args.items(): - setattr(self, var_name, var_value) - for var_name, var_value in kwargs.items(): - if var_name in unused_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error beause the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ], - 'oneOf': [ - QuantDateList, - QuantFdsDate, - ], - } diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py deleted file mode 100644 index 931665d1..00000000 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py +++ /dev/null @@ -1,180 +0,0 @@ -""" - Engines API - - Allow clients to fetch Analytics through APIs. # noqa: E501 - - The version of the OpenAPI document: v3:[pa,spar,vault,pub,quant,fi,axp,afi,npo,bpm,fpo,others],v1:[fiab] - Contact: analytics.api.support@factset.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from fds.analyticsapi.engines.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, -) - - -class OneOfQuantFormulas(ModelSimple): - """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. - 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 = { - } - - validations = { - } - - additional_properties_type = None - - _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 { - 'value': ([object],), - } - - @cached_property - def discriminator(): - return None - - - attribute_map = {} - - _composed_schemas = None - - 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): - """OneOfQuantFormulas - a model defined in OpenAPI - - Note that value can be passed either in args or in kwargs, but not in both. - - Args: - args[0] ([object]): # noqa: E501 - - Keyword Args: - value ([object]): # noqa: E501 - _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,) - """ - # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) - - if 'value' in kwargs: - value = kwargs.pop('value') - elif args: - args = list(args) - value = args.pop(0) - else: - raise ApiTypeError( - "value is required, but not passed in args or kwargs and doesn't have default", - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _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__,) - self.value = value - if kwargs: - raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( - kwargs, - self.__class__.__name__, - ), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py deleted file mode 100644 index 93969e76..00000000 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py +++ /dev/null @@ -1,245 +0,0 @@ -""" - Engines API - - Allow clients to fetch Analytics through APIs. # noqa: E501 - - The version of the OpenAPI document: v3:[pa,spar,vault,pub,quant,fi,axp,afi,npo,bpm,fpo,others],v1:[fiab] - Contact: analytics.api.support@factset.com - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from fds.analyticsapi.engines.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, -) - -def lazy_import(): - from fds.analyticsapi.engines.model.quant_identifier_universe import QuantIdentifierUniverse - from fds.analyticsapi.engines.model.quant_screening_expression_universe import QuantScreeningExpressionUniverse - from fds.analyticsapi.engines.model.quant_universal_screen_universe import QuantUniversalScreenUniverse - globals()['QuantIdentifierUniverse'] = QuantIdentifierUniverse - globals()['QuantScreeningExpressionUniverse'] = QuantScreeningExpressionUniverse - globals()['QuantUniversalScreenUniverse'] = QuantUniversalScreenUniverse - - -class OneOfQuantUniverse(ModelComposed): - """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 = { - ('source',): { - 'SCREENINGEXPRESSIONUNIVERSE': "ScreeningExpressionUniverse", - 'UNIVERSALSCREENUNIVERSE': "UniversalScreenUniverse", - 'IDENTIFIERUNIVERSE': "IdentifierUniverse", - }, - } - - 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 - """ - lazy_import() - 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. - """ - lazy_import() - return { - 'source': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - lazy_import() - val = { - 'IdentifierUniverse': QuantIdentifierUniverse, - 'QuantIdentifierUniverse': QuantIdentifierUniverse, - 'QuantScreeningExpressionUniverse': QuantScreeningExpressionUniverse, - 'QuantUniversalScreenUniverse': QuantUniversalScreenUniverse, - 'ScreeningExpressionUniverse': QuantScreeningExpressionUniverse, - 'UniversalScreenUniverse': QuantUniversalScreenUniverse, - } - if not val: - return None - return {'source': val} - - attribute_map = { - 'source': 'source', # noqa: E501 - } - - required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', - '_composed_instances', - '_var_name_to_model_instances', - '_additional_properties_model_instances', - ]) - - @convert_js_args_to_python_args - def __init__(self, source, *args, **kwargs): # noqa: E501 - """OneOfQuantUniverse - a model defined in OpenAPI - - Args: - source (str): - - 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,) - """ - - _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__,) - - constant_args = { - '_check_type': _check_type, - '_path_to_item': _path_to_item, - '_spec_property_naming': _spec_property_naming, - '_configuration': _configuration, - '_visited_composed_classes': self._visited_composed_classes, - } - required_args = { - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) - composed_info = validate_get_composed_info( - constant_args, model_args, self) - self._composed_instances = composed_info[0] - self._var_name_to_model_instances = composed_info[1] - self._additional_properties_model_instances = composed_info[2] - unused_args = composed_info[3] - - for var_name, var_value in required_args.items(): - setattr(self, var_name, var_value) - for var_name, var_value in kwargs.items(): - if var_name in unused_args and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: - # discard variable. - continue - setattr(self, var_name, var_value) - - @cached_property - def _composed_schemas(): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error beause the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - lazy_import() - return { - 'anyOf': [ - ], - 'allOf': [ - ], - 'oneOf': [ - QuantIdentifierUniverse, - QuantScreeningExpressionUniverse, - QuantUniversalScreenUniverse, - ], - } diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py index 672f7d7f..588d616f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters.py @@ -27,14 +27,6 @@ validate_get_composed_info, ) -def lazy_import(): - from fds.analyticsapi.engines.model.one_of_quant_dates import OneOfQuantDates - from fds.analyticsapi.engines.model.one_of_quant_formulas import OneOfQuantFormulas - from fds.analyticsapi.engines.model.one_of_quant_universe import OneOfQuantUniverse - globals()['OneOfQuantDates'] = OneOfQuantDates - globals()['OneOfQuantFormulas'] = OneOfQuantFormulas - globals()['OneOfQuantUniverse'] = OneOfQuantUniverse - class QuantCalculationParameters(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. @@ -80,11 +72,10 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - 'universe': (OneOfQuantUniverse,), # noqa: E501 - 'dates': (OneOfQuantDates,), # noqa: E501 - 'formulas': (OneOfQuantFormulas,), # noqa: E501 + 'universe': (object,), # noqa: E501 + 'dates': (object,), # noqa: E501 + 'formulas': ([object],), # noqa: E501 } @cached_property @@ -144,9 +135,9 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - universe (OneOfQuantUniverse): [optional] # noqa: E501 - dates (OneOfQuantDates): [optional] # noqa: E501 - formulas (OneOfQuantFormulas): [optional] # noqa: E501 + universe (object): [optional] # noqa: E501 + dates (object): [optional] # noqa: E501 + formulas ([object]): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py b/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py index 6cc49179..bf0c031e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py @@ -91,9 +91,6 @@ from fds.analyticsapi.engines.model.npo_optimizer_strategy import NPOOptimizerStrategy from fds.analyticsapi.engines.model.npo_optimizer_strategy_overrides import NPOOptimizerStrategyOverrides from fds.analyticsapi.engines.model.object_root import ObjectRoot -from fds.analyticsapi.engines.model.one_of_quant_dates import OneOfQuantDates -from fds.analyticsapi.engines.model.one_of_quant_formulas import OneOfQuantFormulas -from fds.analyticsapi.engines.model.one_of_quant_universe import OneOfQuantUniverse from fds.analyticsapi.engines.model.optimal_portfolio import OptimalPortfolio from fds.analyticsapi.engines.model.optimization import Optimization from fds.analyticsapi.engines.model.optimizer_account import OptimizerAccount