diff --git a/auto-generated-sdk/.openapi-generator/FILES b/auto-generated-sdk/.openapi-generator/FILES index 47b60f7d..28de52cf 100644 --- a/auto-generated-sdk/.openapi-generator/FILES +++ b/auto-generated-sdk/.openapi-generator/FILES @@ -104,6 +104,10 @@ docs/NPOOptimizerApi.md docs/NPOOptimizerStrategy.md docs/NPOOptimizerStrategyOverrides.md docs/ObjectRoot.md +docs/OneOfQuantDates.md +docs/OneOfQuantFormulas.md +docs/OneOfQuantFormulasArray.md +docs/OneOfQuantUniverse.md docs/OptimalPortfolio.md docs/Optimization.md docs/OptimizerAccount.md @@ -320,6 +324,10 @@ 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_formulas_array.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 @@ -412,7 +420,6 @@ fds/analyticsapi/engines/model/vault_date_parameters.py fds/analyticsapi/engines/model/vault_identifier.py fds/analyticsapi/engines/model_utils.py fds/analyticsapi/engines/models/__init__.py -fds/analyticsapi/engines/models/__init__.py fds/analyticsapi/engines/rest.py git_push.sh requirements.txt diff --git a/auto-generated-sdk/.openapi-generator/VERSION b/auto-generated-sdk/.openapi-generator/VERSION index acf69b48..7d3cdbf0 100644 --- a/auto-generated-sdk/.openapi-generator/VERSION +++ b/auto-generated-sdk/.openapi-generator/VERSION @@ -1 +1 @@ -5.1.0 \ No newline at end of file +5.3.1 \ No newline at end of file diff --git a/auto-generated-sdk/README.md b/auto-generated-sdk/README.md index c901ec03..4e7f54a1 100644 --- a/auto-generated-sdk/README.md +++ b/auto-generated-sdk/README.md @@ -299,6 +299,10 @@ 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) + - [OneOfQuantFormulasArray](docs/OneOfQuantFormulasArray.md) + - [OneOfQuantUniverse](docs/OneOfQuantUniverse.md) - [OptimalPortfolio](docs/OptimalPortfolio.md) - [Optimization](docs/Optimization.md) - [OptimizerAccount](docs/OptimizerAccount.md) diff --git a/auto-generated-sdk/docs/AFIOptimizationParametersRoot.md b/auto-generated-sdk/docs/AFIOptimizationParametersRoot.md index abfcd795..2dc09455 100644 --- a/auto-generated-sdk/docs/AFIOptimizationParametersRoot.md +++ b/auto-generated-sdk/docs/AFIOptimizationParametersRoot.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**AFIOptimizationParameters**](AFIOptimizationParameters.md) | | [optional] -**meta** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**meta** | **dict** | | [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/AxiomaEquityOptimizationParametersRoot.md b/auto-generated-sdk/docs/AxiomaEquityOptimizationParametersRoot.md index 0d14cae5..a384c0e9 100644 --- a/auto-generated-sdk/docs/AxiomaEquityOptimizationParametersRoot.md +++ b/auto-generated-sdk/docs/AxiomaEquityOptimizationParametersRoot.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**AxiomaEquityOptimizationParameters**](AxiomaEquityOptimizationParameters.md) | | [optional] -**meta** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**meta** | **dict** | | [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/BPMOptimizationParametersRoot.md b/auto-generated-sdk/docs/BPMOptimizationParametersRoot.md index cb28b120..7c11b242 100644 --- a/auto-generated-sdk/docs/BPMOptimizationParametersRoot.md +++ b/auto-generated-sdk/docs/BPMOptimizationParametersRoot.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**BPMOptimizationParameters**](BPMOptimizationParameters.md) | | [optional] -**meta** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**meta** | **dict** | | [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/FPOOptimizationParametersRoot.md b/auto-generated-sdk/docs/FPOOptimizationParametersRoot.md index 2015223a..542ff27e 100644 --- a/auto-generated-sdk/docs/FPOOptimizationParametersRoot.md +++ b/auto-generated-sdk/docs/FPOOptimizationParametersRoot.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**FPOOptimizationParameters**](FPOOptimizationParameters.md) | | [optional] -**meta** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**meta** | **dict** | | [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/NPOOptimizationParametersRoot.md b/auto-generated-sdk/docs/NPOOptimizationParametersRoot.md index f5c865c4..348ca740 100644 --- a/auto-generated-sdk/docs/NPOOptimizationParametersRoot.md +++ b/auto-generated-sdk/docs/NPOOptimizationParametersRoot.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**NPOOptimizationParameters**](NPOOptimizationParameters.md) | | [optional] -**meta** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**meta** | **dict** | | [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/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..54f22f61 --- /dev/null +++ b/auto-generated-sdk/docs/OneOfQuantFormulas.md @@ -0,0 +1,11 @@ +# OneOfQuantFormulas + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[OneOfQuantFormulasArray]**](OneOfQuantFormulasArray.md) | | + +[[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/OneOfQuantFormulasArray.md b/auto-generated-sdk/docs/OneOfQuantFormulasArray.md new file mode 100644 index 00000000..aafbcff3 --- /dev/null +++ b/auto-generated-sdk/docs/OneOfQuantFormulasArray.md @@ -0,0 +1,12 @@ +# OneOfQuantFormulasArray + + +## 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/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/OptimizerOutputTypes.md b/auto-generated-sdk/docs/OptimizerOutputTypes.md index 4cb298f6..775d9686 100644 --- a/auto-generated-sdk/docs/OptimizerOutputTypes.md +++ b/auto-generated-sdk/docs/OptimizerOutputTypes.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **trades** | [**OptimizerTradesList**](OptimizerTradesList.md) | | [optional] **optimal** | [**OptimizerOptimalHoldings**](OptimizerOptimalHoldings.md) | | [optional] **account** | [**OptimalPortfolio**](OptimalPortfolio.md) | | [optional] -**stats** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**stats** | **dict** | | [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/PubCalculationParametersRoot.md b/auto-generated-sdk/docs/PubCalculationParametersRoot.md index f2db35a7..f0fac682 100644 --- a/auto-generated-sdk/docs/PubCalculationParametersRoot.md +++ b/auto-generated-sdk/docs/PubCalculationParametersRoot.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**{str: (PubCalculationParameters,)}**](PubCalculationParameters.md) | List of calculation parameters. | [optional] -**meta** | **bool, date, datetime, dict, float, int, list, str** | | [optional] +**meta** | **dict** | | [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..02142ccf 100644 --- a/auto-generated-sdk/docs/QuantCalculationsApi.md +++ b/auto-generated-sdk/docs/QuantCalculationsApi.md @@ -515,18 +515,11 @@ with fds.analyticsapi.engines.ApiClient(configuration) as api_client: quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ "key": QuantCalculationParameters( - universe= - universe_type="Equity", - identifiers=[ - "identifiers_example", - ], - , - dates= - dates=[], - , - formulas=[ - , - ], + universe=OneOfQuantUniverse(None), + dates=OneOfQuantDates(None), + formulas=OneOfQuantFormulas([ + OneOfQuantFormulasArray(None), + ]), ), }, meta=QuantCalculationMeta( @@ -639,18 +632,11 @@ with fds.analyticsapi.engines.ApiClient(configuration) as api_client: quant_calculation_parameters_root = QuantCalculationParametersRoot( data={ "key": QuantCalculationParameters( - universe= - universe_type="Equity", - identifiers=[ - "identifiers_example", - ], - , - dates= - dates=[], - , - formulas=[ - , - ], + universe=OneOfQuantUniverse(None), + dates=OneOfQuantDates(None), + formulas=OneOfQuantFormulas([ + OneOfQuantFormulasArray(None), + ]), ), }, meta=QuantCalculationMeta( diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories.py b/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories.py index 1a7f6c9b..6c0dd069 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class AccountDirectories(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'directories': 'directories', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AccountDirectories - 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,) + accounts ([str]): List of account and composite files.. [optional] # noqa: E501 + directories ([str]): List of directories.. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories_root.py index 8bf53986..9db527dc 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/account_directories_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.account_directories import AccountDirectories @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """AccountDirectoriesRoot - a model defined in OpenAPI + + Args: + data (AccountDirectories): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters.py index 3c2aa998..81830861 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.afi_optimizer_strategy import AFIOptimizerStrategy @@ -102,8 +105,92 @@ def discriminator(): 'optimization': 'optimization', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, strategy, output_types, *args, **kwargs): # noqa: E501 + """AFIOptimizationParameters - a model defined in OpenAPI + + Args: + strategy (AFIOptimizerStrategy): + output_types (OptimizerOutputTypes): + + 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,) + account (OptimizerAccount): [optional] # noqa: E501 + optimization (Optimization): [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__,) + + self.strategy = strategy + self.output_types = output_types + 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', @@ -189,3 +276,6 @@ def __init__(self, strategy, output_types, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters_root.py index 71d0c95c..689d887e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimization_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.afi_optimization_parameters import AFIOptimizationParameters @@ -79,7 +82,7 @@ def openapi_types(): lazy_import() return { 'data': (AFIOptimizationParameters,), # noqa: E501 - 'meta': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'meta': (dict,), # noqa: E501 } @cached_property @@ -92,8 +95,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AFIOptimizationParametersRoot - 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,) + data (AFIOptimizationParameters): [optional] # noqa: E501 + meta (dict): [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', @@ -139,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) data (AFIOptimizationParameters): [optional] # noqa: E501 - meta (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + meta (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy.py b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy.py index 7b9c8dd9..a3284451 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.afi_optimizer_strategy_overrides import AFIOptimizerStrategyOverrides @@ -92,8 +95,89 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """AFIOptimizerStrategy - a model defined in OpenAPI + + Args: + id (str): OptimizerStrategy document path + + 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,) + overrides (AFIOptimizerStrategyOverrides): [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__,) + + self.id = id + 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', @@ -176,3 +260,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy_overrides.py b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy_overrides.py index 7a9ec065..b13ea6cd 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy_overrides.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/afi_optimizer_strategy_overrides.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class AFIOptimizerStrategyOverrides(ModelNormal): @@ -97,8 +100,89 @@ def discriminator(): 'transaction_cost': 'transactionCost', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AFIOptimizerStrategyOverrides - 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,) + objective (str): Objective. [optional] # noqa: E501 + tax (str): Tax. [optional] # noqa: E501 + constraints ({str: (str,)}): List of constraints. [optional] # noqa: E501 + alpha (str): Alpha. [optional] # noqa: E501 + transaction_cost (str): Transaction cost. [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', @@ -181,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters.py index 1164c268..62e1bc1d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.axioma_equity_optimizer_strategy import AxiomaEquityOptimizerStrategy @@ -102,8 +105,92 @@ def discriminator(): 'optimization': 'optimization', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, strategy, output_types, *args, **kwargs): # noqa: E501 + """AxiomaEquityOptimizationParameters - a model defined in OpenAPI + + Args: + strategy (AxiomaEquityOptimizerStrategy): + output_types (OptimizerOutputTypes): + + 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,) + account (OptimizerAccount): [optional] # noqa: E501 + optimization (Optimization): [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__,) + + self.strategy = strategy + self.output_types = output_types + 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', @@ -189,3 +276,6 @@ def __init__(self, strategy, output_types, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters_root.py index 07fbbd63..ad8799cb 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimization_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.axioma_equity_optimization_parameters import AxiomaEquityOptimizationParameters @@ -79,7 +82,7 @@ def openapi_types(): lazy_import() return { 'data': (AxiomaEquityOptimizationParameters,), # noqa: E501 - 'meta': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'meta': (dict,), # noqa: E501 } @cached_property @@ -92,8 +95,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AxiomaEquityOptimizationParametersRoot - 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,) + data (AxiomaEquityOptimizationParameters): [optional] # noqa: E501 + meta (dict): [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', @@ -139,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) data (AxiomaEquityOptimizationParameters): [optional] # noqa: E501 - meta (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + meta (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy.py b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy.py index 16b6d8b2..b8a767f6 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.axioma_equity_optimizer_strategy_overrides import AxiomaEquityOptimizerStrategyOverrides @@ -92,8 +95,89 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """AxiomaEquityOptimizerStrategy - a model defined in OpenAPI + + Args: + id (str): OptimizerStrategy document path + + 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,) + overrides (AxiomaEquityOptimizerStrategyOverrides): [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__,) + + self.id = id + 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', @@ -176,3 +260,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy_overrides.py b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy_overrides.py index 9e95177d..cfb181b3 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy_overrides.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/axioma_equity_optimizer_strategy_overrides.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class AxiomaEquityOptimizerStrategyOverrides(ModelNormal): @@ -97,8 +100,89 @@ def discriminator(): 'transaction_cost': 'transactionCost', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """AxiomaEquityOptimizerStrategyOverrides - 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,) + objective (str): Objective. [optional] # noqa: E501 + tax (str): Tax. [optional] # noqa: E501 + constraints ({str: (str,)}): List of constraints. [optional] # noqa: E501 + alpha (str): Alpha. [optional] # noqa: E501 + transaction_cost (str): Transaction cost. [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', @@ -181,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization.py b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization.py index 29ab53a7..95aa0076 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class BPMOptimization(ModelNormal): @@ -93,8 +96,89 @@ def discriminator(): 'cashflow': 'cashflow', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BPMOptimization - 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,) + market (str): Optimization market. [optional] # noqa: E501 + invest_all_cash (bool): Optimization invest all cash. [optional] # noqa: E501 + risk_model_date (str): Risk model date. [optional] # noqa: E501 + backtest_date (str): Backtest date. [optional] # noqa: E501 + cashflow (str): Cash flow. [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', @@ -177,3 +261,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters.py index 297139f1..6cb54384 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.bpm_optimization import BPMOptimization @@ -102,8 +105,92 @@ def discriminator(): 'account': 'account', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, strategy, output_types, *args, **kwargs): # noqa: E501 + """BPMOptimizationParameters - a model defined in OpenAPI + + Args: + strategy (BPMOptimizerStrategy): + output_types (OptimizerOutputTypes): + + 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,) + optimization (BPMOptimization): [optional] # noqa: E501 + account (OptimizerAccount): [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__,) + + self.strategy = strategy + self.output_types = output_types + 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', @@ -189,3 +276,6 @@ def __init__(self, strategy, output_types, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters_root.py index 7d0d6e10..3a2151fe 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimization_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.bpm_optimization_parameters import BPMOptimizationParameters @@ -79,7 +82,7 @@ def openapi_types(): lazy_import() return { 'data': (BPMOptimizationParameters,), # noqa: E501 - 'meta': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'meta': (dict,), # noqa: E501 } @cached_property @@ -92,8 +95,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BPMOptimizationParametersRoot - 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,) + data (BPMOptimizationParameters): [optional] # noqa: E501 + meta (dict): [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', @@ -139,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) data (BPMOptimizationParameters): [optional] # noqa: E501 - meta (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + meta (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy.py b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy.py index 5c14722e..21dad60f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.bpm_optimizer_strategy_overrides import BPMOptimizerStrategyOverrides @@ -92,8 +95,89 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """BPMOptimizerStrategy - a model defined in OpenAPI + + Args: + id (str): OptimizerStrategy document path + + 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,) + overrides (BPMOptimizerStrategyOverrides): [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__,) + + self.id = id + 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', @@ -176,3 +260,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_alpha_override.py b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_alpha_override.py index 68805185..c6a16f75 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_alpha_override.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_alpha_override.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class BPMOptimizerStrategyAlphaOverride(ModelNormal): @@ -96,8 +99,87 @@ def discriminator(): 'return_multiplier': 'returnMultiplier', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BPMOptimizerStrategyAlphaOverride - 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,) + formula (str): [optional] # noqa: E501 + return_type (str): [optional] # noqa: E501 + return_multiplier (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', ()) + + 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', @@ -178,3 +260,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_overrides.py b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_overrides.py index b4302dc2..899c14ce 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_overrides.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/bpm_optimizer_strategy_overrides.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.bpm_optimizer_strategy_alpha_override import BPMOptimizerStrategyAlphaOverride @@ -98,8 +101,88 @@ def discriminator(): 'transaction_cost': 'transactionCost', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """BPMOptimizerStrategyOverrides - 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,) + constraints ([ConstraintAction]): List of constraints. [optional] # noqa: E501 + alpha (BPMOptimizerStrategyAlphaOverride): [optional] # noqa: E501 + tax (str): Tax Can be set to \"\" for local. [optional] # noqa: E501 + transaction_cost (str): Transaction cost Can be set to \"\" for local. [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', @@ -181,3 +264,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info.py index 0192bd97..4d518906 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class CalculationInfo(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'calculation_id': 'calculationId', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CalculationInfo - 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,) + calculation_id (str): Calculation identifier. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info_root.py index 84f70040..7f9bc45c 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_info_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_info import CalculationInfo @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """CalculationInfoRoot - a model defined in OpenAPI + + Args: + data (CalculationInfo): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_meta.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_meta.py index 9941b5de..3fd46d0b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_meta.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_meta.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class CalculationMeta(ModelNormal): @@ -118,8 +121,88 @@ def discriminator(): 'format': 'format', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CalculationMeta - 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,) + contentorganization (str): [optional] if omitted the server will use the default value of "SimplifiedRow" # noqa: E501 + stach_content_organization (str): [optional] if omitted the server will use the default value of "SimplifiedRow" # noqa: E501 + contenttype (str): [optional] if omitted the server will use the default value of "Json" # noqa: E501 + format (str): [optional] if omitted the server will use the default value of "JsonStach" # 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', @@ -201,3 +284,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status.py index 6d28cd39..41810ce2 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_unit_status import CalculationUnitStatus @@ -100,8 +103,87 @@ def discriminator(): 'units': 'units', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CalculationStatus - 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,) + calculationid (str): Calculation's identifier. [optional] # noqa: E501 + status (str): Calculation's status. [optional] # noqa: E501 + units ({str: (CalculationUnitStatus,)}): Number of calculation units in batch.. [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', @@ -182,3 +264,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_meta.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_meta.py index e8a2077b..8077647e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_meta.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_meta.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_unit_status_meta import CalculationUnitStatusMeta @@ -90,8 +93,85 @@ def discriminator(): 'units': 'units', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CalculationStatusMeta - 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,) + units ({str: (CalculationUnitStatusMeta,)}): Meta of calculation units in batch.. [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', @@ -170,3 +250,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_root.py index 2a5e2d30..ae113953 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_status_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_status import CalculationStatus @@ -94,8 +97,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """CalculationStatusRoot - a model defined in OpenAPI + + Args: + data (CalculationStatus): + + 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,) + meta (CalculationStatusMeta): [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__,) + + self.data = data + 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', @@ -178,3 +262,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status.py index f50b471f..7aa40464 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.error import Error @@ -105,8 +108,89 @@ def discriminator(): 'points': 'points', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CalculationUnitStatus - 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,) + status (str): The status of calculation unit.. [optional] # noqa: E501 + errors ([Error]): The error in a calculation unit.. [optional] # noqa: E501 + result (str): The result URL of the calculation.. [optional] # noqa: E501 + progress (str): The progress of the calculation unit.. [optional] # noqa: E501 + points (int): The points for the calculation unit.. [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', @@ -189,3 +273,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status_meta.py b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status_meta.py index 3cab1288..4b32fafc 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status_meta.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/calculation_unit_status_meta.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class CalculationUnitStatusMeta(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'info': 'info', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """CalculationUnitStatusMeta - 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,) + info (str): The Info URL of the calculation.. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/client_error_response.py b/auto-generated-sdk/fds/analyticsapi/engines/model/client_error_response.py index 2a0e6987..ddb9b674 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/client_error_response.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/client_error_response.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.error import Error @@ -90,8 +93,85 @@ def discriminator(): 'errors': 'errors', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ClientErrorResponse - 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,) + errors ([Error]): [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', @@ -170,3 +250,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/column.py b/auto-generated-sdk/fds/analyticsapi/engines/model/column.py index 5709fce4..298e7a77 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/column.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/column.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class Column(ModelNormal): @@ -91,8 +94,88 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Column - 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,) + defaultstatisticsids ([str]): Column statistic Id. [optional] # noqa: E501 + name (str): Column Name. [optional] # noqa: E501 + directory (str): Column Directory. [optional] # noqa: E501 + category (str): Column Category. [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', @@ -174,3 +257,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/column_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/column_root.py index 0395cee7..0b53f733 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/column_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/column_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.column import Column @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """ColumnRoot - a model defined in OpenAPI + + Args: + data (Column): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic.py b/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic.py index 60b31e56..6179d86e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ColumnStatistic(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ColumnStatistic - 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,) + name (str): Column Statistic Name. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic_root.py index b3f3e259..3a7c9e1f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/column_statistic_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.column_statistic import ColumnStatistic @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """ColumnStatisticRoot - a model defined in OpenAPI + + Args: + data ({str: (ColumnStatistic,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary.py index 5b7ab884..fe5d425d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ColumnSummary(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ColumnSummary - 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,) + name (str): Column Name. [optional] # noqa: E501 + directory (str): Column Directory. [optional] # noqa: E501 + category (str): Column Category. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary_root.py index 066d8c8f..c449fb2b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/column_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.column_summary import ColumnSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """ColumnSummaryRoot - a model defined in OpenAPI + + Args: + data ({str: (ColumnSummary,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary.py index e88e94d7..744a753e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ComponentSummary(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ComponentSummary - 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,) + name (str): Component name.. [optional] # noqa: E501 + category (str): Component category.. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary_root.py index 23c12068..1dbc26fe 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/component_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.component_summary import ComponentSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """ComponentSummaryRoot - a model defined in OpenAPI + + Args: + data ({str: (ComponentSummary,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/configuration_account.py b/auto-generated-sdk/fds/analyticsapi/engines/model/configuration_account.py index 9714c20c..6c2035f8 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/configuration_account.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/configuration_account.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ConfigurationAccount(ModelNormal): @@ -95,8 +98,90 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConfigurationAccount - 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,) + benchmark_code (str): Benchmark code.. [optional] # noqa: E501 + benchmark_name (str): Benchmark name.. [optional] # noqa: E501 + max_end_date (str): Maximum end date.. [optional] # noqa: E501 + min_start_date (str): Minimum start date.. [optional] # noqa: E501 + locking_date (str): Locking date.. [optional] # noqa: E501 + name (str): Account name.. [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', @@ -180,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/constraint_action.py b/auto-generated-sdk/fds/analyticsapi/engines/model/constraint_action.py index 86e39ffa..a0ed98ef 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/constraint_action.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/constraint_action.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ConstraintAction(ModelNormal): @@ -91,8 +94,86 @@ def discriminator(): 'item2': 'item2', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ConstraintAction - 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,) + item1 (str): [optional] # noqa: E501 + item2 (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', ()) + + 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', @@ -172,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/currency.py b/auto-generated-sdk/fds/analyticsapi/engines/model/currency.py index d0b8752b..6cca7176 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/currency.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/currency.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class Currency(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Currency - 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,) + name (str): Name of currency.. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/currency_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/currency_root.py index 99697a65..baf6bcc9 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/currency_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/currency_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.currency import Currency @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """CurrencyRoot - a model defined in OpenAPI + + Args: + data ({str: (Currency,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary.py index cb4ac888..e8e98d73 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class DateParametersSummary(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'enddate': 'enddate', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DateParametersSummary - 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,) + startdate (str): Start date in YYYYMMDD format.. [optional] # noqa: E501 + enddate (str): End date in YYYYMMDD format.. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary_root.py index 186da775..f1fd9baf 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/date_parameters_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.date_parameters_summary import DateParametersSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """DateParametersSummaryRoot - a model defined in OpenAPI + + Args: + data (DateParametersSummary): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories.py b/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories.py index 222f95f5..e2143f08 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class DocumentDirectories(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'directories': 'directories', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """DocumentDirectories - 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,) + documents ([str]): List of documents. [optional] # noqa: E501 + directories ([str]): List of directories.. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories_root.py index a76fec5d..8fb096d0 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/document_directories_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.document_directories import DocumentDirectories @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """DocumentDirectoriesRoot - a model defined in OpenAPI + + Args: + data (DocumentDirectories): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/error.py b/auto-generated-sdk/fds/analyticsapi/engines/model/error.py index 89ec1ff5..b9021d6e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/error.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/error.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.error_source import ErrorSource @@ -94,8 +97,87 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Error - 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,) + id (str): [optional] # noqa: E501 + detail (str): [optional] # noqa: E501 + source (ErrorSource): [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', @@ -176,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/error_source.py b/auto-generated-sdk/fds/analyticsapi/engines/model/error_source.py index a0e50fbb..09216d63 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/error_source.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/error_source.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ErrorSource(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'parameter': 'parameter', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ErrorSource - 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,) + pointer (str): [optional] # noqa: E501 + parameter (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', ()) + + 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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/event_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/event_summary.py index c90fcbf9..8a945423 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/event_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/event_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class EventSummary(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'type': 'type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """EventSummary - 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,) + message (str): Event's message. [optional] # noqa: E501 + submissiondatetime (datetime): Event's submission time. [optional] # noqa: E501 + type (str): Event's type. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters.py index 859dc8ad..720f2099 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fi_job_settings import FIJobSettings @@ -96,8 +99,92 @@ def discriminator(): 'job_settings': 'jobSettings', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, securities, calculations, job_settings, *args, **kwargs): # noqa: E501 + """FICalculationParameters - a model defined in OpenAPI + + Args: + securities ([FISecurity]): List of securities + calculations ([str]): List of calculations + job_settings (FIJobSettings): + + 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', ()) + + 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__,) + + self.securities = securities + self.calculations = calculations + self.job_settings = job_settings + 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', @@ -183,3 +270,6 @@ def __init__(self, securities, calculations, job_settings, *args, **kwargs): # # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters_root.py index ce3f7d0a..c5dc970d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_calculation_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_meta import CalculationMeta @@ -94,8 +97,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FICalculationParametersRoot - 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,) + data (FICalculationParameters): [optional] # noqa: E501 + meta (CalculationMeta): [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', @@ -175,3 +256,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_job_settings.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_job_settings.py index 7930129d..c29b156d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_job_settings.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_job_settings.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FIJobSettings(ModelNormal): @@ -99,8 +102,92 @@ def discriminator(): 'calc_from_method': 'calcFromMethod', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, as_of_date, *args, **kwargs): # noqa: E501 + """FIJobSettings - a model defined in OpenAPI + + Args: + as_of_date (str): As of date + + 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,) + partial_duration_months ([int]): Partial duration months. [optional] # noqa: E501 + call_method (str): Call Method. [optional] # noqa: E501 + settlement (str): Settlement Date. [optional] # noqa: E501 + calc_from_method (str): Calculation Method. Methods : Active Spread, Actual Spread, Actual Spread To Worst Call, OAS, Price, Yield, Yield To No Call, Act/Act Yield To No Call, Bond Equivalent Yield, Yield To Worst Call, Discount Yield, Discount Margin, Implied Volatility, Bullet Spread, Bullet Spread To Worst Call, Pricing Matrix. [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__,) + + self.as_of_date = as_of_date + 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', @@ -186,3 +273,6 @@ def __init__(self, as_of_date, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_loss.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_loss.py index c457c6e5..ea0b0a22 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_loss.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_loss.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FILoss(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'loss_name': 'lossName', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FILoss - 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,) + loss_name (str): Loss Name. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_prepay.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_prepay.py index 12d5775e..efc0ba9d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_prepay.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_prepay.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FIPrepay(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'prepay_name': 'prepayName', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FIPrepay - 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,) + prepay_name (str): Prepay Name. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_prepay.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_prepay.py index 00d71351..daad0b24 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_prepay.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_prepay.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FIReferencePrepay(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'prepay_name': 'prepayName', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FIReferencePrepay - 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,) + prepay_name (str): Reference Prepay Name. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_security.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_security.py index 63ed9f51..fced12e5 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_security.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_reference_security.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fi_reference_prepay import FIReferencePrepay @@ -100,8 +103,90 @@ def discriminator(): 'settlement': 'settlement', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FIReferenceSecurity - 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,) + security_type (str): Reference Security Type. [optional] # noqa: E501 + security_name (str): Reference Security Name. [optional] # noqa: E501 + calc_from_method (str): Reference Calculation Method. Methods : Active Spread, Actual Spread, Actual Spread To Worst Call, OAS, Price, Yield, Yield To No Call, Act/Act Yield To No Call, Bond Equivalent Yield, Yield To Worst Call, Discount Yield, Discount Margin, Implied Volatility, Bullet Spread, Bullet Spread To Worst Call, Pricing Matrix. [optional] # noqa: E501 + calc_from_value (float): Reference CalcFromValue. [optional] # noqa: E501 + prepay (FIReferencePrepay): [optional] # noqa: E501 + settlement (str): Reference Settlement Date. [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', @@ -185,3 +270,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_security.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_security.py index c0e78173..4a02e3b9 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fi_security.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fi_security.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fi_loss import FILoss @@ -128,8 +131,101 @@ def discriminator(): 'discount_curve': 'discountCurve', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, calc_from_value, symbol, *args, **kwargs): # noqa: E501 + """FISecurity - a model defined in OpenAPI + + Args: + calc_from_value (float): Calculation from value + symbol (str): Symbol + + 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,) + settlement (str): Settlement date. [optional] # noqa: E501 + call_method (str): Call Method. [optional] # noqa: E501 + reference_security (FIReferenceSecurity): [optional] # noqa: E501 + loss (FILoss): [optional] # noqa: E501 + prepay (FIPrepay): [optional] # noqa: E501 + matrix_spread_adjustment (float): Matrix Spread Adjustment. [optional] # noqa: E501 + matrix_multiplier (float): Matrix Multiplier. [optional] # noqa: E501 + calc_from_method (str): Calculation Method. Methods : Active Spread, Actual Spread, Actual Spread To Worst Call, OAS, Price, Yield, Yield To No Call, Act/Act Yield To No Call, Bond Equivalent Yield, Yield To Worst Call, Discount Yield, Discount Margin, Implied Volatility, Bullet Spread, Bullet Spread To Worst Call, Pricing Matrix. [optional] # noqa: E501 + face (float): Face. [optional] if omitted the server will use the default value of 1 # noqa: E501 + face_type (str): Face type. [optional] if omitted the server will use the default value of "Current" # noqa: E501 + discount_curve (str): Discount curve. [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__,) + + self.calc_from_value = calc_from_value + self.symbol = symbol + 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', @@ -224,3 +320,6 @@ def __init__(self, calc_from_value, symbol, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_parameters.py index 95528b76..20102321 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fiab_date_parameters import FIABDateParameters @@ -100,8 +103,93 @@ def discriminator(): 'fisettingsdocument': 'fisettingsdocument', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, account, dates, *args, **kwargs): # noqa: E501 + """FIABCalculationParameters - a model defined in OpenAPI + + Args: + account (FIABIdentifier): + dates (FIABDateParameters): + + 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,) + fiabdocument (str): FiabDocument (optional) - FIAB document to use as a template. Should be a path to a FIAB document. Expects a GUI-style path (Client:/foo/bar). [optional] # noqa: E501 + msl (str): Master FISecurity List. Analytics results will be written to the selected MSL. Expects a GUI-style path (Client:/foo/bar). [optional] # noqa: E501 + fisettingsdocument (str): FISettingsDocument (optional) - The given @FIS document will be used to configure analytics assumptions and settings. Expects a GUI-style path (Client:/foo/bar). [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__,) + + self.account = account + self.dates = dates + 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', @@ -188,3 +276,6 @@ def __init__(self, account, dates, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status.py index e102ba7b..65d48978 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.event_summary import EventSummary @@ -108,8 +111,90 @@ def discriminator(): 'batchevents': 'batchevents', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FIABCalculationStatus - 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,) + id (str): Calculation's identifier. [optional] # noqa: E501 + status (str): Calculation's status. [optional] # noqa: E501 + startdatetime (datetime): Start time. [optional] # noqa: E501 + completiondatetime (datetime): Completion time. [optional] # noqa: E501 + progress (int): Calculation's progress. [optional] # noqa: E501 + batchevents ([EventSummary]): List of batch events. [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', @@ -193,3 +278,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status_summary.py index 09b06ab1..be700f77 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_calculation_status_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FIABCalculationStatusSummary(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'lastpolltime': 'lastpolltime', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FIABCalculationStatusSummary - 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,) + requesttime (datetime): Request time of calculation.. [optional] # noqa: E501 + lastpolltime (datetime): Last poll time of calculation.. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_date_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_date_parameters.py index e49b4c11..208b5e36 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_date_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_date_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FIABDateParameters(ModelNormal): @@ -87,8 +90,90 @@ def discriminator(): 'enddate': 'enddate', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, startdate, enddate, *args, **kwargs): # noqa: E501 + """FIABDateParameters - a model defined in OpenAPI + + Args: + startdate (str): Calculation's start date. + enddate (str): Calculation's end date. + + 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', ()) + + 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__,) + + self.startdate = startdate + self.enddate = enddate + 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', @@ -172,3 +257,6 @@ def __init__(self, startdate, enddate, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_identifier.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_identifier.py index a3287e7d..b2d3aafd 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_identifier.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fiab_identifier.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FIABIdentifier(ModelNormal): @@ -85,8 +88,88 @@ def discriminator(): 'id': 'id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """FIABIdentifier - a model defined in OpenAPI + + Args: + id (str): User's FactSet account path. + + 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', ()) + + 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__,) + + self.id = id + 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', @@ -168,3 +251,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_account.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_account.py index c4e9e03e..4cd4f99d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_account.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_account.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.optimizer_account_overrides import OptimizerAccountOverrides @@ -96,8 +99,90 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, pa_document, *args, **kwargs): # noqa: E501 + """FPOAccount - a model defined in OpenAPI + + Args: + pa_document (PaDoc): + + 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,) + id (str): Account path. [optional] # noqa: E501 + overrides (OptimizerAccountOverrides): [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__,) + + self.pa_document = pa_document + 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', @@ -181,3 +266,6 @@ def __init__(self, pa_document, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_objective.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_objective.py index 41947edf..1188d2a9 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_objective.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_objective.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class FPOObjective(ModelNormal): @@ -91,8 +94,86 @@ def discriminator(): 'terms': 'terms', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FPOObjective - 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,) + active (str): [optional] # noqa: E501 + terms ({str: (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', ()) + + 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', @@ -172,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters.py index 63284ec5..bd876821 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fpo_account import FPOAccount @@ -102,8 +105,92 @@ def discriminator(): 'optimization': 'optimization', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, strategy, output_types, *args, **kwargs): # noqa: E501 + """FPOOptimizationParameters - a model defined in OpenAPI + + Args: + strategy (FPOOptimizerStrategy): + output_types (OptimizerOutputTypes): + + 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,) + account (FPOAccount): [optional] # noqa: E501 + optimization (Optimization): [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__,) + + self.strategy = strategy + self.output_types = output_types + 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', @@ -189,3 +276,6 @@ def __init__(self, strategy, output_types, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters_root.py index f26119d4..a3094f95 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimization_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fpo_optimization_parameters import FPOOptimizationParameters @@ -79,7 +82,7 @@ def openapi_types(): lazy_import() return { 'data': (FPOOptimizationParameters,), # noqa: E501 - 'meta': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'meta': (dict,), # noqa: E501 } @cached_property @@ -92,8 +95,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FPOOptimizationParametersRoot - 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,) + data (FPOOptimizationParameters): [optional] # noqa: E501 + meta (dict): [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', @@ -139,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) data (FPOOptimizationParameters): [optional] # noqa: E501 - meta (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + meta (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy.py index 25eabdb1..e9af8662 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fpo_optimizer_strategy_overrides import FPOOptimizerStrategyOverrides @@ -92,8 +95,89 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """FPOOptimizerStrategy - a model defined in OpenAPI + + Args: + id (str): OptimizerStrategy document path + + 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,) + overrides (FPOOptimizerStrategyOverrides): [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__,) + + self.id = id + 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', @@ -176,3 +260,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy_overrides.py b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy_overrides.py index 00ddecc4..7e426fe8 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy_overrides.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/fpo_optimizer_strategy_overrides.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.fpo_objective import FPOObjective @@ -100,8 +103,88 @@ def discriminator(): 'transaction_cost': 'transactionCost', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """FPOOptimizerStrategyOverrides - 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,) + objective (FPOObjective): [optional] # noqa: E501 + constraints ({str: (str,)}): List of constraints. [optional] # noqa: E501 + alpha (str): Alpha. [optional] # noqa: E501 + transaction_cost (str): Transaction cost. [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', @@ -183,3 +266,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/frequency.py b/auto-generated-sdk/fds/analyticsapi/engines/model/frequency.py index a394b312..8ee3da87 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/frequency.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/frequency.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class Frequency(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Frequency - 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,) + name (str): Frequency name.. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/frequency_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/frequency_root.py index bd2c72fd..0beffece 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/frequency_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/frequency_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.frequency import Frequency @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """FrequencyRoot - a model defined in OpenAPI + + Args: + data ({str: (Frequency,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/group.py b/auto-generated-sdk/fds/analyticsapi/engines/model/group.py index 59518031..418fd5dc 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/group.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/group.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class Group(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Group - 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,) + name (str): Group Name. [optional] # noqa: E501 + directory (str): Group Directory. [optional] # noqa: E501 + category (str): Group Category. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/group_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/group_root.py index 84415284..80ccfb0d 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/group_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/group_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.group import Group @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """GroupRoot - a model defined in OpenAPI + + Args: + data ({str: (Group,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template.py index eb71faed..2b9c1cb7 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.template_content_types import TemplateContentTypes @@ -102,8 +105,91 @@ def discriminator(): 'parent_component_id': 'parentComponentId', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LinkedPATemplate - 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,) + directory (str): Template directory.. [optional] # noqa: E501 + snapshot (bool): snapshot.. [optional] # noqa: E501 + content (TemplateContentTypes): [optional] # noqa: E501 + id (str): Template id.. [optional] # noqa: E501 + description (str): Template description.. [optional] # noqa: E501 + name (str): Template name.. [optional] # noqa: E501 + parent_component_id (str): Template parent tile.. [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', @@ -188,3 +274,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters.py index 49fa7441..6e8febd1 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.template_content_types import TemplateContentTypes @@ -96,8 +99,92 @@ def discriminator(): 'content': 'content', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, directory, parent_component_id, *args, **kwargs): # noqa: E501 + """LinkedPATemplateParameters - a model defined in OpenAPI + + Args: + directory (str): The directory to create a linked PA template + parent_component_id (str): Parent component id + + 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,) + description (str): Template description. [optional] # noqa: E501 + content (TemplateContentTypes): [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__,) + + self.directory = directory + self.parent_component_id = parent_component_id + 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', @@ -183,3 +270,6 @@ def __init__(self, directory, parent_component_id, *args, **kwargs): # noqa: E5 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters_root.py index 2dbec1ec..b7354b44 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.linked_pa_template_parameters import LinkedPATemplateParameters @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """LinkedPATemplateParametersRoot - a model defined in OpenAPI + + Args: + data (LinkedPATemplateParameters): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary.py index b77de43f..8d239fec 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class LinkedPATemplatePostSummary(ModelNormal): @@ -91,8 +94,88 @@ def discriminator(): 'parent_component_id': 'parentComponentId', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LinkedPATemplatePostSummary - 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,) + id (str): Template id.. [optional] # noqa: E501 + description (str): Template description.. [optional] # noqa: E501 + name (str): Template name.. [optional] # noqa: E501 + parent_component_id (str): Template parent tile.. [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', @@ -174,3 +257,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary_root.py index 5d459ab4..b6faa3bf 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_post_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.linked_pa_template_post_summary import LinkedPATemplatePostSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """LinkedPATemplatePostSummaryRoot - a model defined in OpenAPI + + Args: + data (LinkedPATemplatePostSummary): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_root.py index 1115b1a8..bebb5724 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.linked_pa_template import LinkedPATemplate @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """LinkedPATemplateRoot - a model defined in OpenAPI + + Args: + data (LinkedPATemplate): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary.py index 6fe4ec88..425161e2 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class LinkedPATemplateSummary(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'parent_component_id': 'parentComponentId', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LinkedPATemplateSummary - 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,) + description (str): Template description.. [optional] # noqa: E501 + name (str): Template name.. [optional] # noqa: E501 + parent_component_id (str): Template parent tile.. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary_root.py index e31d1360..6b8ea45b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.linked_pa_template_summary import LinkedPATemplateSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """LinkedPATemplateSummaryRoot - a model defined in OpenAPI + + Args: + data ({str: (LinkedPATemplateSummary,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters.py index c1e0d650..1815b1a5 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.template_content_types import TemplateContentTypes @@ -94,8 +97,87 @@ def discriminator(): 'content': 'content', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """LinkedPATemplateUpdateParameters - 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,) + parent_component_id (str): Parent component id. [optional] # noqa: E501 + description (str): Template description. [optional] # noqa: E501 + content (TemplateContentTypes): [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', @@ -176,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters_root.py index d5b6a8e8..238286fa 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/linked_pa_template_update_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.linked_pa_template_update_parameters import LinkedPATemplateUpdateParameters @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """LinkedPATemplateUpdateParametersRoot - a model defined in OpenAPI + + Args: + data (LinkedPATemplateUpdateParameters): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters.py index 00761996..c134996c 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.npo_optimizer_strategy import NPOOptimizerStrategy @@ -102,8 +105,92 @@ def discriminator(): 'optimization': 'optimization', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, strategy, output_types, *args, **kwargs): # noqa: E501 + """NPOOptimizationParameters - a model defined in OpenAPI + + Args: + strategy (NPOOptimizerStrategy): + output_types (OptimizerOutputTypes): + + 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,) + account (OptimizerAccount): [optional] # noqa: E501 + optimization (Optimization): [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__,) + + self.strategy = strategy + self.output_types = output_types + 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', @@ -189,3 +276,6 @@ def __init__(self, strategy, output_types, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters_root.py index bea26ed4..07eb0965 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimization_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.npo_optimization_parameters import NPOOptimizationParameters @@ -79,7 +82,7 @@ def openapi_types(): lazy_import() return { 'data': (NPOOptimizationParameters,), # noqa: E501 - 'meta': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'meta': (dict,), # noqa: E501 } @cached_property @@ -92,8 +95,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """NPOOptimizationParametersRoot - 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,) + data (NPOOptimizationParameters): [optional] # noqa: E501 + meta (dict): [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', @@ -139,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) data (NPOOptimizationParameters): [optional] # noqa: E501 - meta (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + meta (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy.py b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy.py index 83c4c377..556ba3db 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.npo_optimizer_strategy_overrides import NPOOptimizerStrategyOverrides @@ -92,8 +95,89 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """NPOOptimizerStrategy - a model defined in OpenAPI + + Args: + id (str): OptimizerStrategy document path + + 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,) + overrides (NPOOptimizerStrategyOverrides): [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__,) + + self.id = id + 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', @@ -176,3 +260,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy_overrides.py b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy_overrides.py index 8823ccdb..5c61c59e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy_overrides.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/npo_optimizer_strategy_overrides.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.constraint_action import ConstraintAction @@ -98,8 +101,89 @@ def discriminator(): 'alpha': 'alpha', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """NPOOptimizerStrategyOverrides - 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,) + objective ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Objective parameters. [optional] # noqa: E501 + constraints ([ConstraintAction]): List of constraints. [optional] # noqa: E501 + tax (str): Tax Can be set to \"\" for local. [optional] # noqa: E501 + transaction_cost (str): Transaction cost Can be set to \"\" for local. [optional] # noqa: E501 + alpha (str): Alpha. [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', @@ -182,3 +266,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/object_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/object_root.py index 62f157f8..35ea20ce 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/object_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/object_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ObjectRoot(ModelNormal): @@ -87,8 +90,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """ObjectRoot - a model defined in OpenAPI + + Args: + data (bool, date, datetime, dict, float, int, list, str, none_type): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -171,3 +255,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") 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..eff19711 --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_dates.py @@ -0,0 +1,335 @@ +""" + 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, + OpenApiModel +) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + + +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 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OneOfQuantDates - a model defined in OpenAPI + + Keyword Args: + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OneOfQuantDates - a model defined in OpenAPI + + Keyword Args: + source (str): + _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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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.") + + @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 because 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..35121ff0 --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas.py @@ -0,0 +1,284 @@ +""" + 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, + OpenApiModel +) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + + +def lazy_import(): + from fds.analyticsapi.engines.model.one_of_quant_formulas_array import OneOfQuantFormulasArray + globals()['OneOfQuantFormulasArray'] = OneOfQuantFormulasArray + + +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. + """ + lazy_import() + return { + 'value': ([OneOfQuantFormulasArray],), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _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] ([OneOfQuantFormulasArray]): # noqa: E501 + + Keyword Args: + value ([OneOfQuantFormulasArray]): # 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__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *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] ([OneOfQuantFormulasArray]): # noqa: E501 + + Keyword Args: + value ([OneOfQuantFormulasArray]): # 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', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + 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__,), + ) + + return self diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas_array.py b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas_array.py new file mode 100644 index 00000000..ca2e6509 --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_formulas_array.py @@ -0,0 +1,339 @@ +""" + 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, + OpenApiModel +) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + + +def lazy_import(): + from fds.analyticsapi.engines.model.quant_all_universal_screen_parameters import QuantAllUniversalScreenParameters + from fds.analyticsapi.engines.model.quant_fql_expression import QuantFqlExpression + from fds.analyticsapi.engines.model.quant_screening_expression import QuantScreeningExpression + from fds.analyticsapi.engines.model.quant_universal_screen_parameter import QuantUniversalScreenParameter + globals()['QuantAllUniversalScreenParameters'] = QuantAllUniversalScreenParameters + globals()['QuantFqlExpression'] = QuantFqlExpression + globals()['QuantScreeningExpression'] = QuantScreeningExpression + globals()['QuantUniversalScreenParameter'] = QuantUniversalScreenParameter + + +class OneOfQuantFormulasArray(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',): { + 'SCREENINGEXPRESSION': "ScreeningExpression", + 'FQLEXPRESSION': "FqlExpression", + 'UNIVERSALSCREENPARAMETER': "UniversalScreenParameter", + 'ALLUNIVERSALSCREENPARAMETERS': "AllUniversalScreenParameters", + }, + } + + 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 = { + 'AllUniversalScreenParameters': QuantAllUniversalScreenParameters, + 'FqlExpression': QuantFqlExpression, + 'QuantAllUniversalScreenParameters': QuantAllUniversalScreenParameters, + 'QuantFqlExpression': QuantFqlExpression, + 'QuantScreeningExpression': QuantScreeningExpression, + 'QuantUniversalScreenParameter': QuantUniversalScreenParameter, + 'ScreeningExpression': QuantScreeningExpression, + 'UniversalScreenParameter': QuantUniversalScreenParameter, + } + if not val: + return None + return {'source': val} + + attribute_map = { + 'source': 'source', # noqa: E501 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OneOfQuantFormulasArray - a model defined in OpenAPI + + Keyword Args: + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OneOfQuantFormulasArray - a model defined in OpenAPI + + Keyword Args: + source (str): + _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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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.") + + @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 because 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': [ + QuantAllUniversalScreenParameters, + QuantFqlExpression, + QuantScreeningExpression, + QuantUniversalScreenParameter, + ], + } 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..bee8a86f --- /dev/null +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/one_of_quant_universe.py @@ -0,0 +1,333 @@ +""" + 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, + OpenApiModel +) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + + +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 + } + + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OneOfQuantUniverse - a model defined in OpenAPI + + Keyword Args: + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """OneOfQuantUniverse - a model defined in OpenAPI + + Keyword Args: + source (str): + _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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # 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.") + + @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 because 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/optimal_portfolio.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimal_portfolio.py index 9871c05b..09e05360 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimal_portfolio.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimal_portfolio.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class OptimalPortfolio(ModelNormal): @@ -103,8 +106,89 @@ def discriminator(): 'if_ofdb_date_exists': 'ifOfdbDateExists', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OptimalPortfolio - 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,) + acct_name (str): Account path. [optional] # noqa: E501 + exclude_zero (bool): Exclude zero. [optional] # noqa: E501 + archive_date (str): Archive date. [optional] # noqa: E501 + if_acct_exists (str): Archive action if account exists. [optional] # noqa: E501 + if_ofdb_date_exists (str): Action if ofdb date exists. [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', @@ -187,3 +271,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/optimization.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimization.py index ef9d58a6..4a8cfea2 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimization.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimization.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class Optimization(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'cashflow': 'cashflow', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """Optimization - 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,) + risk_model_date (str): Risk model date. [optional] # noqa: E501 + backtest_date (str): Backtest date. [optional] # noqa: E501 + cashflow (str): Cash flow. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account.py index 9be707e2..608214cc 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.optimizer_account_overrides import OptimizerAccountOverrides @@ -92,8 +95,86 @@ def discriminator(): 'overrides': 'overrides', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OptimizerAccount - 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,) + id (str): Account path. [optional] # noqa: E501 + overrides (OptimizerAccountOverrides): [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', @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account_overrides.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account_overrides.py index 8f47edb9..780c9c3b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account_overrides.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_account_overrides.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class OptimizerAccountOverrides(ModelNormal): @@ -91,8 +94,88 @@ def discriminator(): 'currency': 'currency', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OptimizerAccountOverrides - 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,) + portfolio (str): Portfolio. [optional] # noqa: E501 + benchmark (str): Benchmark. [optional] # noqa: E501 + risk_model_id (str): Risk model. [optional] # noqa: E501 + currency (str): Currency. [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', @@ -174,3 +257,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_optimal_holdings.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_optimal_holdings.py index 23ea020b..78e7a2f2 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_optimal_holdings.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_optimal_holdings.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class OptimizerOptimalHoldings(ModelNormal): @@ -101,8 +104,87 @@ def discriminator(): 'exclude_zero': 'excludeZero', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OptimizerOptimalHoldings - 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,) + identifier_type (str): Identifier type. [optional] # noqa: E501 + include_cash (bool): Include cash. [optional] # noqa: E501 + exclude_zero (bool): Exclude zero. [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', @@ -183,3 +265,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_output_types.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_output_types.py index 1f12bbed..8b7859b4 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_output_types.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_output_types.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.optimal_portfolio import OptimalPortfolio @@ -85,7 +88,7 @@ def openapi_types(): 'trades': (OptimizerTradesList,), # noqa: E501 'optimal': (OptimizerOptimalHoldings,), # noqa: E501 'account': (OptimalPortfolio,), # noqa: E501 - 'stats': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'stats': (dict,), # noqa: E501 } @cached_property @@ -100,8 +103,88 @@ def discriminator(): 'stats': 'stats', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OptimizerOutputTypes - 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,) + trades (OptimizerTradesList): [optional] # noqa: E501 + optimal (OptimizerOptimalHoldings): [optional] # noqa: E501 + account (OptimalPortfolio): [optional] # noqa: E501 + stats (dict): [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', @@ -149,7 +232,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 trades (OptimizerTradesList): [optional] # noqa: E501 optimal (OptimizerOptimalHoldings): [optional] # noqa: E501 account (OptimalPortfolio): [optional] # noqa: E501 - stats (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + stats (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -183,3 +266,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_trades_list.py b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_trades_list.py index 21f72e20..5c175deb 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_trades_list.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/optimizer_trades_list.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class OptimizerTradesList(ModelNormal): @@ -99,8 +102,86 @@ def discriminator(): 'include_cash': 'includeCash', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """OptimizerTradesList - 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,) + identifier_type (str): Identifier type. [optional] # noqa: E501 + include_cash (bool): Include cash. [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', @@ -180,3 +261,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_column.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_column.py index 2aebad32..8c82758a 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_column.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_column.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PACalculationColumn(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'statistics': 'statistics', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PACalculationColumn - 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,) + id (str): FactSet-defined or User-defined Column identifier.. [optional] # noqa: E501 + statistics ([str]): Column Statistic identifier. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_group.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_group.py index dd5c768f..7b075d3f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_group.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_group.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PACalculationGroup(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'id': 'id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PACalculationGroup - 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,) + id (str): FactSet-defined or User-defined Group identifier.. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters.py index 163783e3..ed17d330 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_calculation_column import PACalculationColumn @@ -110,8 +113,95 @@ def discriminator(): 'componentdetail': 'componentdetail', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, componentid, *args, **kwargs): # noqa: E501 + """PACalculationParameters - a model defined in OpenAPI + + Args: + componentid (str): The PA Engine component identifier to analyze. + + 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,) + accounts ([PAIdentifier]): List of accounts.. [optional] # noqa: E501 + benchmarks ([PAIdentifier]): List of benchmarks.. [optional] # noqa: E501 + dates (PADateParameters): [optional] # noqa: E501 + groups ([PACalculationGroup]): List of groupings for the PA calculation. This will take precedence over the groupings saved in the PA document.. [optional] # noqa: E501 + currencyisocode (str): Currency ISO code for calculation.. [optional] # noqa: E501 + columns ([PACalculationColumn]): List of columns for the PA calculation. This will take precedence over the columns saved in the PA document.. [optional] # noqa: E501 + componentdetail (str): Component detail type for the PA component. It can be GROUPS or TOTALS or SECURITIES.. [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__,) + + self.componentid = componentid + 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', @@ -200,3 +290,6 @@ def __init__(self, componentid, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters_root.py index d5c626e7..08c4a333 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_calculation_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_meta import CalculationMeta @@ -94,8 +97,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PACalculationParametersRoot - 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,) + data ({str: (PACalculationParameters,)}): List of calculation parameters.. [optional] # noqa: E501 + meta (CalculationMeta): [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', @@ -175,3 +256,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component.py index f9c6cfc5..87f8dfd6 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_date_parameters import PADateParameters @@ -108,8 +111,93 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PAComponent - 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,) + id (str): Component identifier.. [optional] # noqa: E501 + accounts ([PAIdentifier]): List of accounts saved in the PA document.. [optional] # noqa: E501 + benchmarks ([PAIdentifier]): List of benchmarks saved in the PA document.. [optional] # noqa: E501 + currencyisocode (str): [optional] # noqa: E501 + dates (PADateParameters): [optional] # noqa: E501 + snapshot (bool): Is the component type snapshot or subperiod.. [optional] # noqa: E501 + path (str): The path to the document. [optional] # noqa: E501 + name (str): Component name.. [optional] # noqa: E501 + category (str): Component category.. [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', @@ -196,3 +284,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_data.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_data.py index b4441d8d..0d197156 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_data.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_data.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_calculation_column import PACalculationColumn @@ -108,8 +111,91 @@ def discriminator(): 'componentdetail': 'componentdetail', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PAComponentData - 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,) + accounts ([PAIdentifier]): List of accounts.. [optional] # noqa: E501 + benchmarks ([PAIdentifier]): List of benchmarks.. [optional] # noqa: E501 + groups ([PACalculationGroup]): List of groupings for the PA calculation. This will take precedence over the groupings saved in the PA document.. [optional] # noqa: E501 + columns ([PACalculationColumn]): List of columns for the PA calculation. This will take precedence over the columns saved in the PA document.. [optional] # noqa: E501 + dates (PADateParameters): [optional] # noqa: E501 + currencyisocode (str): Currency ISO code for calculation.. [optional] # noqa: E501 + componentdetail (str): PA Storage type. It can be GROUPS or TOTALS or SECURITIES.. [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', @@ -194,3 +280,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_root.py index ef660a4a..3f858d75 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_component_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_component import PAComponent @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """PAComponentRoot - a model defined in OpenAPI + + Args: + data (PAComponent): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_date_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_date_parameters.py index bbcff3d9..6dafd3b4 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_date_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_date_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PADateParameters(ModelNormal): @@ -89,8 +92,91 @@ def discriminator(): 'startdate': 'startdate', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, enddate, frequency, *args, **kwargs): # noqa: E501 + """PADateParameters - a model defined in OpenAPI + + Args: + enddate (str): Calculation's end date. + frequency (str): Calculation's frequency. + + 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,) + startdate (str): Calculation's start date.. [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__,) + + self.enddate = enddate + self.frequency = frequency + 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', @@ -175,3 +261,6 @@ def __init__(self, enddate, frequency, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_doc.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_doc.py index 4bb05420..d1fa98e1 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_doc.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_doc.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PaDoc(ModelNormal): @@ -85,8 +88,88 @@ def discriminator(): 'id': 'id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """PaDoc - a model defined in OpenAPI + + Args: + id (str): PA document path + + 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', ()) + + 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__,) + + self.id = id + 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', @@ -168,3 +251,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_identifier.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_identifier.py index e50ef0cc..8cdce12b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pa_identifier.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pa_identifier.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PAIdentifier(ModelNormal): @@ -87,8 +90,89 @@ def discriminator(): 'holdingsmode': 'holdingsmode', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """PAIdentifier - a model defined in OpenAPI + + Args: + id (str): User's FactSet account path OR benchmark. + + 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,) + holdingsmode (str): Holdings Mode can be B&H, TBR, OMS or EXT.. [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__,) + + self.id = id + 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', @@ -171,3 +255,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters.py index 6ae9b085..f8ce0541 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pub_date_parameters import PubDateParameters @@ -96,8 +99,92 @@ def discriminator(): 'dates': 'dates', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, document, account, dates, *args, **kwargs): # noqa: E501 + """PubCalculationParameters - a model defined in OpenAPI + + Args: + document (str): The Publisher Engine document to analyze. + account (PubIdentifier): + dates (PubDateParameters): + + 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', ()) + + 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__,) + + self.document = document + self.account = account + self.dates = dates + 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', @@ -183,3 +270,6 @@ def __init__(self, document, account, dates, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters_root.py index fa685d2c..3410cb39 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_calculation_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pub_calculation_parameters import PubCalculationParameters @@ -79,7 +82,7 @@ def openapi_types(): lazy_import() return { 'data': ({str: (PubCalculationParameters,)},), # noqa: E501 - 'meta': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'meta': (dict,), # noqa: E501 } @cached_property @@ -92,8 +95,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """PubCalculationParametersRoot - 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,) + data ({str: (PubCalculationParameters,)}): List of calculation parameters.. [optional] # noqa: E501 + meta (dict): [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', @@ -139,7 +220,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) data ({str: (PubCalculationParameters,)}): List of calculation parameters.. [optional] # noqa: E501 - meta (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501 + meta (dict): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_date_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_date_parameters.py index 483f6301..89906214 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_date_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_date_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PubDateParameters(ModelNormal): @@ -87,8 +90,89 @@ def discriminator(): 'startdate': 'startdate', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, enddate, *args, **kwargs): # noqa: E501 + """PubDateParameters - a model defined in OpenAPI + + Args: + enddate (str): Calculation's end date or as of date. + + 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,) + startdate (str): Calculation's start date.. [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__,) + + self.enddate = enddate + 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', @@ -171,3 +255,6 @@ def __init__(self, enddate, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_identifier.py b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_identifier.py index 6bf73b04..05f8143b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/pub_identifier.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/pub_identifier.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class PubIdentifier(ModelNormal): @@ -87,8 +90,89 @@ def discriminator(): 'holdingsmode': 'holdingsmode', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """PubIdentifier - a model defined in OpenAPI + + Args: + id (str): User's FactSet account path OR benchmark. + + 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,) + holdingsmode (str): Holdings Mode can be B&H, TBR, OMS or EXT.. [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__,) + + self.id = id + 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', @@ -171,3 +255,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_all_universal_screen_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_all_universal_screen_parameters.py index db22532b..75eb0229 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_all_universal_screen_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_all_universal_screen_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_formula import QuantFormula @@ -96,6 +99,98 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantAllUniversalScreenParameters - a model defined in OpenAPI + + Keyword Args: + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -109,13 +204,11 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantAllUniversalScreenParameters - a model defined in OpenAPI - Args: - source (str): - Keyword Args: + source (str): _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. @@ -178,36 +271,31 @@ def __init__(self, source, *args, **kwargs): # noqa: E501 '_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) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_meta.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_meta.py index 65941c70..0f3b1e90 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_meta.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_meta.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantCalculationMeta(ModelNormal): @@ -120,8 +123,89 @@ def discriminator(): 'format': 'format', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantCalculationMeta - 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,) + allow_array_data (bool): [optional] # noqa: E501 + contentorganization (str): [optional] if omitted the server will use the default value of "SimplifiedRow" # noqa: E501 + stach_content_organization (str): [optional] if omitted the server will use the default value of "SimplifiedRow" # noqa: E501 + contenttype (str): [optional] if omitted the server will use the default value of "Json" # noqa: E501 + format (str): [optional] if omitted the server will use the default value of "JsonStach" # 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', @@ -204,3 +288,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") 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..555f52fe 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 @@ -25,7 +25,18 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + + +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): @@ -72,10 +83,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 @@ -89,8 +101,87 @@ def discriminator(): 'formulas': 'formulas', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantCalculationParameters - 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,) + universe (OneOfQuantUniverse): [optional] # noqa: E501 + dates (OneOfQuantDates): [optional] # noqa: E501 + formulas (OneOfQuantFormulas): [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', @@ -135,9 +226,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) @@ -171,3 +262,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters_root.py index 5b06b23e..533c8e3b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_calculation_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_calculation_meta import QuantCalculationMeta @@ -94,8 +97,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantCalculationParametersRoot - 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,) + data ({str: (QuantCalculationParameters,)}): List of calculation parameters.. [optional] # noqa: E501 + meta (QuantCalculationMeta): [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', @@ -175,3 +256,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date.py index 1f039f7e..99935e96 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantDate(ModelNormal): @@ -93,8 +96,92 @@ def discriminator(): 'calendar': 'calendar', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, source, frequency, calendar, *args, **kwargs): # noqa: E501 + """QuantDate - a model defined in OpenAPI + + Args: + source (str): + frequency (str): + calendar (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', ()) + + 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__,) + + self.source = source + self.frequency = frequency + self.calendar = calendar + 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', @@ -180,3 +267,6 @@ def __init__(self, source, frequency, calendar, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list.py index 69432eca..12a06895 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_date import QuantDate @@ -100,6 +103,101 @@ def discriminator(): 'dates': 'dates', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantDateList - a model defined in OpenAPI + + Keyword Args: + source (str): + frequency (str): + calendar (str): + _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,) + dates ([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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -113,15 +211,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, source, frequency, calendar, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantDateList - a model defined in OpenAPI - Args: + Keyword Args: source (str): frequency (str): calendar (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. @@ -185,38 +281,31 @@ def __init__(self, source, frequency, calendar, *args, **kwargs): # noqa: E501 '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'source': source, - 'frequency': frequency, - 'calendar': calendar, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list_obsolete.py index db6ba725..6c5cdc18 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_date_list_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantDateListObsolete(ModelNormal): @@ -89,8 +92,91 @@ def discriminator(): 'dates': 'dates', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, frequency, calendar, *args, **kwargs): # noqa: E501 + """QuantDateListObsolete - a model defined in OpenAPI + + Args: + frequency (str): + calendar (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,) + dates ([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', ()) + + 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__,) + + self.frequency = frequency + self.calendar = calendar + 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', @@ -175,3 +261,6 @@ def __init__(self, frequency, calendar, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date.py index 0f74f8a9..eff999ee 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_date import QuantDate @@ -102,6 +105,102 @@ def discriminator(): 'calendar': 'calendar', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantFdsDate - a model defined in OpenAPI + + Keyword Args: + start_date (str): + end_date (str): + source (str): + frequency (str): + calendar (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -115,17 +214,15 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, start_date, end_date, source, frequency, calendar, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantFdsDate - a model defined in OpenAPI - Args: + Keyword Args: start_date (str): end_date (str): source (str): frequency (str): calendar (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. @@ -188,40 +285,31 @@ def __init__(self, start_date, end_date, source, frequency, calendar, *args, **k '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'start_date': start_date, - 'end_date': end_date, - 'source': source, - 'frequency': frequency, - 'calendar': calendar, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date_obsolete.py index 38133228..dc540395 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fds_date_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantFdsDateObsolete(ModelNormal): @@ -91,8 +94,94 @@ def discriminator(): 'calendar': 'calendar', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, start_date, end_date, frequency, calendar, *args, **kwargs): # noqa: E501 + """QuantFdsDateObsolete - a model defined in OpenAPI + + Args: + start_date (str): + end_date (str): + frequency (str): + calendar (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', ()) + + 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__,) + + self.start_date = start_date + self.end_date = end_date + self.frequency = frequency + self.calendar = calendar + 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', @@ -180,3 +269,6 @@ def __init__(self, start_date, end_date, frequency, calendar, *args, **kwargs): # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_formula.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_formula.py index 1a4a873c..4794236f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_formula.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_formula.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantFormula(ModelNormal): @@ -91,8 +94,88 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, source, *args, **kwargs): # noqa: E501 + """QuantFormula - 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', ()) + + 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__,) + + self.source = source + 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', @@ -174,3 +257,6 @@ def __init__(self, source, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression.py index 0b545a34..a253cbeb 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_formula import QuantFormula @@ -100,6 +103,100 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantFqlExpression - a model defined in OpenAPI + + Keyword Args: + expr (str): + name (str): + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -113,15 +210,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, expr, name, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantFqlExpression - a model defined in OpenAPI - Args: + Keyword Args: expr (str): name (str): 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. @@ -184,38 +279,31 @@ def __init__(self, expr, name, source, *args, **kwargs): # noqa: E501 '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'expr': expr, - 'name': name, - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression_obsolete.py index ff810bae..0a890c53 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_fql_expression_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantFqlExpressionObsolete(ModelNormal): @@ -87,8 +90,90 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, expr, name, *args, **kwargs): # noqa: E501 + """QuantFqlExpressionObsolete - a model defined in OpenAPI + + Args: + expr (str): + name (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', ()) + + 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__,) + + self.expr = expr + self.name = name + 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', @@ -172,3 +257,6 @@ def __init__(self, expr, name, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe.py index 008553df..cb0c269e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_universe import QuantUniverse @@ -103,6 +106,100 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantIdentifierUniverse - a model defined in OpenAPI + + Keyword Args: + universe_type (str): + identifiers ([str]): + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -116,15 +213,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, universe_type, identifiers, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantIdentifierUniverse - a model defined in OpenAPI - Args: + Keyword Args: universe_type (str): identifiers ([str]): 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. @@ -187,38 +282,31 @@ def __init__(self, universe_type, identifiers, source, *args, **kwargs): # noqa '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'universe_type': universe_type, - 'identifiers': identifiers, - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe_obsolete.py index 0089d027..e06759b4 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_identifier_universe_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantIdentifierUniverseObsolete(ModelNormal): @@ -98,8 +101,91 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, universe_type, identifiers, *args, **kwargs): # noqa: E501 + """QuantIdentifierUniverseObsolete - a model defined in OpenAPI + + Args: + universe_type (str): + identifiers ([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,) + source (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', ()) + + 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__,) + + self.universe_type = universe_type + self.identifiers = identifiers + 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', @@ -184,3 +270,6 @@ def __init__(self, universe_type, identifiers, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression.py index 0289f0ff..40351bd4 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_formula import QuantFormula @@ -100,6 +103,100 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantScreeningExpression - a model defined in OpenAPI + + Keyword Args: + expr (str): + name (str): + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -113,15 +210,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, expr, name, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantScreeningExpression - a model defined in OpenAPI - Args: + Keyword Args: expr (str): name (str): 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. @@ -184,38 +279,31 @@ def __init__(self, expr, name, source, *args, **kwargs): # noqa: E501 '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'expr': expr, - 'name': name, - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_obsolete.py index 9cb60b9e..5a487994 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantScreeningExpressionObsolete(ModelNormal): @@ -87,8 +90,90 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, expr, name, *args, **kwargs): # noqa: E501 + """QuantScreeningExpressionObsolete - a model defined in OpenAPI + + Args: + expr (str): + name (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', ()) + + 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__,) + + self.expr = expr + self.name = name + 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', @@ -172,3 +257,6 @@ def __init__(self, expr, name, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe.py index 710624ca..3f0bfe7c 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_universe import QuantUniverse @@ -105,6 +108,101 @@ def discriminator(): 'security_expr': 'securityExpr', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantScreeningExpressionUniverse - a model defined in OpenAPI + + Keyword Args: + universe_expr (str): + universe_type (str): + source (str): + _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,) + security_expr (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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -118,15 +216,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, universe_expr, universe_type, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantScreeningExpressionUniverse - a model defined in OpenAPI - Args: + Keyword Args: universe_expr (str): universe_type (str): 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. @@ -190,38 +286,31 @@ def __init__(self, universe_expr, universe_type, source, *args, **kwargs): # no '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'universe_expr': universe_expr, - 'universe_type': universe_type, - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe_obsolete.py index 36d2faf0..1c332fad 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_screening_expression_universe_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantScreeningExpressionUniverseObsolete(ModelNormal): @@ -100,8 +103,92 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, universe_expr, universe_type, *args, **kwargs): # noqa: E501 + """QuantScreeningExpressionUniverseObsolete - a model defined in OpenAPI + + Args: + universe_expr (str): + universe_type (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,) + security_expr (str): [optional] # noqa: E501 + source (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', ()) + + 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__,) + + self.universe_expr = universe_expr + self.universe_type = universe_type + 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', @@ -187,3 +274,6 @@ def __init__(self, universe_expr, universe_type, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter.py index 6369c461..03921009 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_formula import QuantFormula @@ -100,6 +103,100 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantUniversalScreenParameter - a model defined in OpenAPI + + Keyword Args: + reference_name (str): + name (str): + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -113,15 +210,13 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, reference_name, name, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantUniversalScreenParameter - a model defined in OpenAPI - Args: + Keyword Args: reference_name (str): name (str): 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. @@ -184,38 +279,31 @@ def __init__(self, reference_name, name, source, *args, **kwargs): # noqa: E501 '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'reference_name': reference_name, - 'name': name, - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter_obsolete.py index 2946e938..8bcaaf8c 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_parameter_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantUniversalScreenParameterObsolete(ModelNormal): @@ -87,8 +90,90 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, reference_name, name, *args, **kwargs): # noqa: E501 + """QuantUniversalScreenParameterObsolete - a model defined in OpenAPI + + Args: + reference_name (str): + name (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', ()) + + 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__,) + + self.reference_name = reference_name + self.name = name + 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', @@ -172,3 +257,6 @@ def __init__(self, reference_name, name, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe.py index 8145c424..9230e311 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.quant_universe import QuantUniverse @@ -97,6 +100,99 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """QuantUniversalScreenUniverse - a model defined in OpenAPI + + Keyword Args: + screen (str): + source (str): + _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', ()) + + 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__,) + + 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, + } + composed_info = validate_get_composed_info( + constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + + for var_name, var_value in kwargs.items(): + if var_name in discarded_args and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self._additional_properties_model_instances: + # discard variable. + continue + setattr(self, var_name, var_value) + + return self + required_properties = set([ '_data_store', '_check_type', @@ -110,14 +206,12 @@ def discriminator(): ]) @convert_js_args_to_python_args - def __init__(self, screen, source, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """QuantUniversalScreenUniverse - a model defined in OpenAPI - Args: + Keyword Args: screen (str): 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. @@ -180,37 +274,31 @@ def __init__(self, screen, source, *args, **kwargs): # noqa: E501 '_configuration': _configuration, '_visited_composed_classes': self._visited_composed_classes, } - required_args = { - 'screen': screen, - 'source': source, - } - model_args = {} - model_args.update(required_args) - model_args.update(kwargs) composed_info = validate_get_composed_info( - constant_args, model_args, self) + constant_args, kwargs, 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] + discarded_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 \ + if var_name in discarded_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - not self._additional_properties_model_instances: + self._additional_properties_model_instances: # 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.") @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 + # level we would get an error because 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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe_obsolete.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe_obsolete.py index 567ccfe7..2102a343 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe_obsolete.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universal_screen_universe_obsolete.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantUniversalScreenUniverseObsolete(ModelNormal): @@ -92,8 +95,89 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, screen, *args, **kwargs): # noqa: E501 + """QuantUniversalScreenUniverseObsolete - a model defined in OpenAPI + + Args: + screen (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,) + source (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', ()) + + 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__,) + + self.screen = screen + 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', @@ -176,3 +260,6 @@ def __init__(self, screen, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universe.py b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universe.py index d2ce0e3a..1b6475e9 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universe.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/quant_universe.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class QuantUniverse(ModelNormal): @@ -90,8 +93,88 @@ def discriminator(): 'source': 'source', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, source, *args, **kwargs): # noqa: E501 + """QuantUniverse - 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', ()) + + 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__,) + + self.source = source + 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', @@ -173,3 +256,6 @@ def __init__(self, source, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/return_type.py b/auto-generated-sdk/fds/analyticsapi/engines/model/return_type.py index cab3bbbc..3da3fa71 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/return_type.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/return_type.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class ReturnType(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'id': 'id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """ReturnType - 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,) + name (str): [optional] # noqa: E501 + id (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', ()) + + 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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts.py index 02adc018..a0ba57ae 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.return_type import ReturnType @@ -90,8 +93,85 @@ def discriminator(): 'returns_type': 'returnsType', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SPARAccounts - 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,) + returns_type ([ReturnType]): List of SPAR returnsType. [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', @@ -170,3 +250,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts_root.py index f40db8c6..765c124a 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_accounts_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.spar_accounts import SPARAccounts @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """SPARAccountsRoot - a model defined in OpenAPI + + Args: + data (SPARAccounts): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark.py index 3b264a5c..c872407b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.spar_identifier import SPARIdentifier @@ -94,8 +97,87 @@ def discriminator(): 'identifiers': 'identifiers', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SPARBenchmark - 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,) + id (str): Benchmark identifier. [optional] # noqa: E501 + name (str): Benchmark Name. [optional] # noqa: E501 + identifiers ([SPARIdentifier]): List of SPAR identifiers. [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', @@ -176,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark_root.py index 53b40867..ad2be399 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_benchmark_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.spar_benchmark import SPARBenchmark @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """SPARBenchmarkRoot - a model defined in OpenAPI + + Args: + data (SPARBenchmark): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters.py index 585014f0..854a2a84 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.spar_date_parameters import SPARDateParameters @@ -100,8 +103,92 @@ def discriminator(): 'currencyisocode': 'currencyisocode', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, componentid, *args, **kwargs): # noqa: E501 + """SPARCalculationParameters - a model defined in OpenAPI + + Args: + componentid (str): The SPAR Engine component identifier to analyze. + + 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,) + accounts ([SPARIdentifier]): List of accounts for SPAR calculation.. [optional] # noqa: E501 + benchmark (SPARIdentifier): [optional] # noqa: E501 + dates (SPARDateParameters): [optional] # noqa: E501 + currencyisocode (str): Currency ISO code for calculation.. [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__,) + + self.componentid = componentid + 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', @@ -187,3 +274,6 @@ def __init__(self, componentid, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters_root.py index 129abbdc..d4ece994 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_calculation_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_meta import CalculationMeta @@ -94,8 +97,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """SPARCalculationParametersRoot - 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,) + data ({str: (SPARCalculationParameters,)}): List of calculation parameters.. [optional] # noqa: E501 + meta (CalculationMeta): [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', @@ -175,3 +256,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_date_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_date_parameters.py index 5ef68a45..263e6b17 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_date_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_date_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class SPARDateParameters(ModelNormal): @@ -89,8 +92,92 @@ def discriminator(): 'frequency': 'frequency', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, startdate, enddate, frequency, *args, **kwargs): # noqa: E501 + """SPARDateParameters - a model defined in OpenAPI + + Args: + startdate (str): Calculation's start date. + enddate (str): Calculation's end date. + frequency (str): Calculation's frequency. + + 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', ()) + + 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__,) + + self.startdate = startdate + self.enddate = enddate + self.frequency = frequency + 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', @@ -176,3 +263,6 @@ def __init__(self, startdate, enddate, frequency, *args, **kwargs): # noqa: E50 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_identifier.py b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_identifier.py index 4ad434ea..bbac6522 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/spar_identifier.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/spar_identifier.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class SPARIdentifier(ModelNormal): @@ -89,8 +92,90 @@ def discriminator(): 'prefix': 'prefix', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """SPARIdentifier - a model defined in OpenAPI + + Args: + id (str): User's FactSet account OR benchmark id. + + 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,) + returntype (str): Benchmark return type.. [optional] # noqa: E501 + prefix (str): Benchmark prefix.. [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__,) + + self.id = id + 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', @@ -174,3 +259,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/template_content_types.py b/auto-generated-sdk/fds/analyticsapi/engines/model/template_content_types.py index 09383021..7a49ac5c 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/template_content_types.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/template_content_types.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class TemplateContentTypes(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'locked': 'locked', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TemplateContentTypes - 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,) + mandatory ([str]): Template mandatory fields. [optional] # noqa: E501 + optional ([str]): Template optional fields. [optional] # noqa: E501 + locked ([str]): Template locked fields. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component.py index bb106e07..e80b34ba 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_component_data import PAComponentData @@ -104,8 +107,92 @@ def discriminator(): 'type': 'type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TemplatedPAComponent - 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,) + id (str): [optional] # noqa: E501 + directory (str): [optional] # noqa: E501 + snapshot (bool): [optional] # noqa: E501 + component_data (PAComponentData): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + parent_template_id (str): [optional] # noqa: E501 + type (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', ()) + + 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', @@ -191,3 +278,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters.py index 36ca8259..3f0c2469 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_component_data import PAComponentData @@ -96,8 +99,92 @@ def discriminator(): 'component_data': 'componentData', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, directory, parent_template_id, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentParameters - a model defined in OpenAPI + + Args: + directory (str): Directory to create templated components + parent_template_id (str): Parent template id + + 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,) + description (str): Component description.. [optional] # noqa: E501 + component_data (PAComponentData): [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__,) + + self.directory = directory + self.parent_template_id = parent_template_id + 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', @@ -183,3 +270,6 @@ def __init__(self, directory, parent_template_id, *args, **kwargs): # noqa: E50 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters_root.py index 374bc259..3cab1ed3 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.templated_pa_component_parameters import TemplatedPAComponentParameters @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentParametersRoot - a model defined in OpenAPI + + Args: + data (TemplatedPAComponentParameters): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary.py index 9527fde8..5898130b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class TemplatedPAComponentPostSummary(ModelNormal): @@ -93,8 +96,89 @@ def discriminator(): 'type': 'type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentPostSummary - 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,) + id (str): [optional] # noqa: E501 + description (str): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + parent_template_id (str): [optional] # noqa: E501 + type (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', ()) + + 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', @@ -177,3 +261,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary_root.py index b935ab18..f11bc418 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_post_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.templated_pa_component_post_summary import TemplatedPAComponentPostSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentPostSummaryRoot - a model defined in OpenAPI + + Args: + data (TemplatedPAComponentPostSummary): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_root.py index 653828bc..35301ba4 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.templated_pa_component import TemplatedPAComponent @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentRoot - a model defined in OpenAPI + + Args: + data (TemplatedPAComponent): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary.py index d67c0981..48add061 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class TemplatedPAComponentSummary(ModelNormal): @@ -91,8 +94,88 @@ def discriminator(): 'type': 'type', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentSummary - 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,) + description (str): [optional] # noqa: E501 + name (str): [optional] # noqa: E501 + parent_template_id (str): [optional] # noqa: E501 + type (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', ()) + + 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', @@ -174,3 +257,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary_root.py index 2d280fbe..ac10316f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.templated_pa_component_summary import TemplatedPAComponentSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentSummaryRoot - a model defined in OpenAPI + + Args: + data ({str: (TemplatedPAComponentSummary,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters.py index 17cadebd..825a97c6 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_component_data import PAComponentData @@ -94,8 +97,87 @@ def discriminator(): 'component_data': 'componentData', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentUpdateParameters - 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,) + parent_template_id (str): Parent template id. [optional] # noqa: E501 + description (str): Component description.. [optional] # noqa: E501 + component_data (PAComponentData): [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', @@ -176,3 +258,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters_root.py index f4e0f1db..8cf71854 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/templated_pa_component_update_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.templated_pa_component_update_parameters import TemplatedPAComponentUpdateParameters @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """TemplatedPAComponentUpdateParametersRoot - a model defined in OpenAPI + + Args: + data (TemplatedPAComponentUpdateParameters): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template.py index 550add87..1247f3d4 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_calculation_column import PACalculationColumn @@ -126,8 +129,99 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplate - 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,) + id (str): Template id.. [optional] # noqa: E501 + directory (str): Template directory.. [optional] # noqa: E501 + template_type_id (str): Template type id. [optional] # noqa: E501 + snapshot (bool): snapshot.. [optional] # noqa: E501 + accounts ([PAIdentifier]): List of accounts. [optional] # noqa: E501 + benchmarks ([PAIdentifier]): List of benchmarks. [optional] # noqa: E501 + columns ([PACalculationColumn]): List of columns for the PA calculation. [optional] # noqa: E501 + dates (PADateParameters): [optional] # noqa: E501 + groups ([PACalculationGroup]): List of groupings for the PA calculation. [optional] # noqa: E501 + currencyisocode (str): Currency ISO code for calculation.. [optional] # noqa: E501 + componentdetail (str): PA storage type. It can be GROUPS or TOTALS or SECURITIES.. [optional] # noqa: E501 + content (TemplateContentTypes): [optional] # noqa: E501 + description (str): Template description.. [optional] # noqa: E501 + name (str): Template name.. [optional] # noqa: E501 + category (str): Unlinked template category. [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', @@ -220,3 +314,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type.py index 9883709a..05628e37 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class UnlinkedPATemplateCategoryAndType(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateCategoryAndType - 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,) + category (str): Unlinked template category. [optional] # noqa: E501 + name (str): Unlinked template type. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details.py index 2f3cb98e..560a7701 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_column_details import UnlinkedPATemplateColumnDetails @@ -102,8 +105,90 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateCategoryAndTypeDetails - 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,) + id (str): Type Id. [optional] # noqa: E501 + columns ([UnlinkedPATemplateColumnDetails]): List of default columns. [optional] # noqa: E501 + groups ([UnlinkedPATemplateGroupDetails]): List of default groupings. [optional] # noqa: E501 + snapshot (bool): Snapshot. [optional] # noqa: E501 + category (str): Unlinked template category. [optional] # noqa: E501 + name (str): Unlinked template type. [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', @@ -187,3 +272,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details_root.py index 4a5a571e..cf5489c3 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_details_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_category_and_type_details import UnlinkedPATemplateCategoryAndTypeDetails @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateCategoryAndTypeDetailsRoot - a model defined in OpenAPI + + Args: + data (UnlinkedPATemplateCategoryAndTypeDetails): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_root.py index ff129b5a..9e369809 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_category_and_type_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_category_and_type import UnlinkedPATemplateCategoryAndType @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateCategoryAndTypeRoot - a model defined in OpenAPI + + Args: + data ({str: (UnlinkedPATemplateCategoryAndType,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_column_details.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_column_details.py index 02022eaf..c793a714 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_column_details.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_column_details.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class UnlinkedPATemplateColumnDetails(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'statistics': 'statistics', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateColumnDetails - 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,) + name (str): Unlinked template column name. [optional] # noqa: E501 + id (str): FactSet-defined or User-defined Column identifier.. [optional] # noqa: E501 + statistics ([str]): Column Statistic identifier. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_group_details.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_group_details.py index 8e9cdaff..461e3072 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_group_details.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_group_details.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class UnlinkedPATemplateGroupDetails(ModelNormal): @@ -87,8 +90,86 @@ def discriminator(): 'id': 'id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateGroupDetails - 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,) + name (str): Unlinked template group name. [optional] # noqa: E501 + id (str): FactSet-defined or User-defined Group identifier.. [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', @@ -168,3 +249,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters.py index a38b44e3..a5d9d360 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_calculation_column import PACalculationColumn @@ -118,8 +121,99 @@ def discriminator(): 'content': 'content', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, directory, template_type_id, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateParameters - a model defined in OpenAPI + + Args: + directory (str): The directory to create an unlinked PA template + template_type_id (str): Template type id + + 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,) + description (str): Template description. [optional] # noqa: E501 + accounts ([PAIdentifier]): List of accounts. [optional] # noqa: E501 + benchmarks ([PAIdentifier]): List of benchmarks. [optional] # noqa: E501 + columns ([PACalculationColumn]): List of columns for the PA calculation. [optional] # noqa: E501 + dates (PADateParameters): [optional] # noqa: E501 + groups ([PACalculationGroup]): List of groupings for the PA calculation. [optional] # noqa: E501 + currencyisocode (str): Currency ISO code for calculation.. [optional] # noqa: E501 + componentdetail (str): PA storage type. It can be GROUPS or TOTALS or SECURITIES.. [optional] # noqa: E501 + content (TemplateContentTypes): [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__,) + + self.directory = directory + self.template_type_id = template_type_id + 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', @@ -212,3 +306,6 @@ def __init__(self, directory, template_type_id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters_root.py index 17ce3a1e..0897f70f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_parameters import UnlinkedPATemplateParameters @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateParametersRoot - a model defined in OpenAPI + + Args: + data (UnlinkedPATemplateParameters): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary.py index 94a33228..68db2309 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class UnlinkedPATemplatePostSummary(ModelNormal): @@ -91,8 +94,88 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplatePostSummary - 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,) + id (str): Template id.. [optional] # noqa: E501 + description (str): Template description.. [optional] # noqa: E501 + name (str): Template name.. [optional] # noqa: E501 + category (str): Unlinked template category. [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', @@ -174,3 +257,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary_root.py index baf380d8..96020fb2 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_post_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_post_summary import UnlinkedPATemplatePostSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplatePostSummaryRoot - a model defined in OpenAPI + + Args: + data (UnlinkedPATemplatePostSummary): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_root.py index ac8e1188..1027f520 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template import UnlinkedPATemplate @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateRoot - a model defined in OpenAPI + + Args: + data (UnlinkedPATemplate): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary.py index f2770429..1c41c52b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class UnlinkedPATemplateSummary(ModelNormal): @@ -89,8 +92,87 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateSummary - 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,) + description (str): Template description.. [optional] # noqa: E501 + name (str): Template name.. [optional] # noqa: E501 + category (str): Unlinked template category. [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', @@ -171,3 +253,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary_root.py index 4c791717..515c546e 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_summary import UnlinkedPATemplateSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateSummaryRoot - a model defined in OpenAPI + + Args: + data ({str: (UnlinkedPATemplateSummary,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters.py index 50ad2819..7867efb0 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.pa_calculation_column import PACalculationColumn @@ -114,8 +117,93 @@ def discriminator(): 'content': 'content', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateUpdateParameters - 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,) + description (str): Template description. [optional] # noqa: E501 + accounts ([PAIdentifier]): List of accounts. [optional] # noqa: E501 + benchmarks ([PAIdentifier]): List of benchmarks. [optional] # noqa: E501 + columns ([PACalculationColumn]): List of columns for the PA calculation. [optional] # noqa: E501 + dates (PADateParameters): [optional] # noqa: E501 + groups ([PACalculationGroup]): List of groupings for the PA calculation. [optional] # noqa: E501 + currencyisocode (str): Currency ISO code for calculation.. [optional] # noqa: E501 + componentdetail (str): PA storage type. It can be GROUPS or TOTALS or SECURITIES.. [optional] # noqa: E501 + content (TemplateContentTypes): [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', @@ -202,3 +290,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters_root.py index 016364c2..9c5bb7be 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/unlinked_pa_template_update_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.unlinked_pa_template_update_parameters import UnlinkedPATemplateUpdateParameters @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """UnlinkedPATemplateUpdateParametersRoot - a model defined in OpenAPI + + Args: + data (UnlinkedPATemplateUpdateParameters): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters.py index 95c67442..51936b51 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.vault_date_parameters import VaultDateParameters @@ -100,8 +103,94 @@ def discriminator(): 'componentdetail': 'componentdetail', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, componentid, account, configid, *args, **kwargs): # noqa: E501 + """VaultCalculationParameters - a model defined in OpenAPI + + Args: + componentid (str): The Vault component identifier to analyze. + account (VaultIdentifier): + configid (str): Vault Configuration identifier. + + 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,) + dates (VaultDateParameters): [optional] # noqa: E501 + componentdetail (str): Component detail type for the Vault component. It can be GROUPS or TOTALS or SECURITIES.. [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__,) + + self.componentid = componentid + self.account = account + self.configid = configid + 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', @@ -189,3 +278,6 @@ def __init__(self, componentid, account, configid, *args, **kwargs): # noqa: E5 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters_root.py index f5896c9a..a174992c 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_calculation_parameters_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.calculation_meta import CalculationMeta @@ -94,8 +97,86 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VaultCalculationParametersRoot - 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,) + data ({str: (VaultCalculationParameters,)}): List of calculation parameters.. [optional] # noqa: E501 + meta (CalculationMeta): [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', @@ -175,3 +256,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component.py index 1facf8e2..71b77f31 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.vault_date_parameters import VaultDateParameters @@ -108,8 +111,93 @@ def discriminator(): 'category': 'category', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VaultComponent - 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,) + id (str): Vault component identifier. [optional] # noqa: E501 + account (VaultIdentifier): [optional] # noqa: E501 + benchmark (VaultIdentifier): [optional] # noqa: E501 + currencyisocode (str): Currency iso code saved in the document. [optional] # noqa: E501 + dates (VaultDateParameters): [optional] # noqa: E501 + snapshot (bool): Snapshot. [optional] # noqa: E501 + path (str): The path to the document. [optional] # noqa: E501 + name (str): Component name.. [optional] # noqa: E501 + category (str): Component category.. [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', @@ -196,3 +284,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component_root.py index 5f3bb51a..e0c61ac0 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_component_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.vault_component import VaultComponent @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """VaultComponentRoot - a model defined in OpenAPI + + Args: + data (VaultComponent): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration.py index e12a77a0..00431f86 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.configuration_account import ConfigurationAccount @@ -92,8 +95,86 @@ def discriminator(): 'accounts': 'accounts', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VaultConfiguration - 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,) + name (str): Configuration name.. [optional] # noqa: E501 + accounts ({str: (ConfigurationAccount,)}): [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', @@ -173,3 +254,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_root.py index 3d8c9381..e11344cb 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.vault_configuration import VaultConfiguration @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """VaultConfigurationRoot - a model defined in OpenAPI + + Args: + data (VaultConfiguration): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary.py index bbd716f1..75041b6a 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class VaultConfigurationSummary(ModelNormal): @@ -85,8 +88,85 @@ def discriminator(): 'name': 'name', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 + """VaultConfigurationSummary - 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,) + name (str): Configuration name.. [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', @@ -165,3 +245,6 @@ def __init__(self, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary_root.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary_root.py index 159c9988..919afb0f 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary_root.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_configuration_summary_root.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + def lazy_import(): from fds.analyticsapi.engines.model.vault_configuration_summary import VaultConfigurationSummary @@ -92,8 +95,89 @@ def discriminator(): 'meta': 'meta', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, data, *args, **kwargs): # noqa: E501 + """VaultConfigurationSummaryRoot - a model defined in OpenAPI + + Args: + data ({str: (VaultConfigurationSummary,)}): + + 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,) + meta (bool, date, datetime, dict, float, int, list, str, none_type): [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__,) + + self.data = data + 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', @@ -176,3 +260,6 @@ def __init__(self, data, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_date_parameters.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_date_parameters.py index 89083ca6..62af3480 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_date_parameters.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_date_parameters.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class VaultDateParameters(ModelNormal): @@ -89,8 +92,91 @@ def discriminator(): 'startdate': 'startdate', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, enddate, frequency, *args, **kwargs): # noqa: E501 + """VaultDateParameters - a model defined in OpenAPI + + Args: + enddate (str): Calculation's end date. + frequency (str): Calculation's frequency. + + 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,) + startdate (str): Calculation's start date.. [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__,) + + self.enddate = enddate + self.frequency = frequency + 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', @@ -175,3 +261,6 @@ def __init__(self, enddate, frequency, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_identifier.py b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_identifier.py index b299634f..00dc4fcc 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model/vault_identifier.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model/vault_identifier.py @@ -25,7 +25,10 @@ file_type, none_type, validate_get_composed_info, + OpenApiModel ) +from fds.analyticsapi.engines.exceptions import ApiAttributeError + class VaultIdentifier(ModelNormal): @@ -85,8 +88,88 @@ def discriminator(): 'id': 'id', # noqa: E501 } + read_only_vars = { + } + _composed_schemas = {} + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501 + """VaultIdentifier - a model defined in OpenAPI + + Args: + id (str): User's FactSet account path OR benchmark. + + 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', ()) + + 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__,) + + self.id = id + 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', @@ -168,3 +251,6 @@ def __init__(self, id, *args, **kwargs): # noqa: E501 # 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.") diff --git a/auto-generated-sdk/fds/analyticsapi/engines/model_utils.py b/auto-generated-sdk/fds/analyticsapi/engines/model_utils.py index d5e244b4..63b04e1b 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/model_utils.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/model_utils.py @@ -1,4 +1,3 @@ - """ Engines API @@ -11,6 +10,7 @@ from datetime import date, datetime # noqa: F401 +from copy import deepcopy import inspect import io import os @@ -31,9 +31,25 @@ file_type = io.IOBase +def convert_js_args_to_python_args(fn): + from functools import wraps + @wraps(fn) + def wrapped_init(_self, *args, **kwargs): + """ + An attribute named `self` received from the api will conflicts with the reserved `self` + parameter of a class method. During generation, `self` attributes are mapped + to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. + """ + spec_property_naming = kwargs.get('_spec_property_naming', False) + if spec_property_naming: + kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) + return fn(_self, *args, **kwargs) + return wrapped_init + + class cached_property(object): # this caches the result of the function call for fn with no inputs - # use this as a decorator on fuction methods that you want converted + # use this as a decorator on function methods that you want converted # into cached properties result_key = '_results' @@ -172,6 +188,26 @@ def __getattr__(self, attr): """get the value of an attribute using dot notation: `instance.attr`""" return self.__getitem__(attr) + def __copy__(self): + cls = self.__class__ + if self.get("_spec_property_naming", False): + return cls._new_from_openapi_data(**self.__dict__) + else: + return new_cls.__new__(cls, **self.__dict__) + + def __deepcopy__(self, memo): + cls = self.__class__ + + if self.get("_spec_property_naming", False): + new_inst = cls._new_from_openapi_data() + else: + new_inst = cls.__new__(cls) + + for k, v in self.__dict__.items(): + setattr(new_inst, k, deepcopy(v, memo)) + return new_inst + + def __new__(cls, *args, **kwargs): # this function uses the discriminator to # pick a new schema/class to instantiate because a discriminator @@ -281,8 +317,128 @@ def __new__(cls, *args, **kwargs): self_inst = super(OpenApiModel, cls).__new__(cls) self_inst.__init__(*args, **kwargs) - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) + if kwargs.get("_spec_property_naming", False): + # when true, implies new is from deserialization + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) + else: + new_inst = new_cls.__new__(new_cls, *args, **kwargs) + new_inst.__init__(*args, **kwargs) + + return new_inst + + + @classmethod + @convert_js_args_to_python_args + def _new_from_openapi_data(cls, *args, **kwargs): + # this function uses the discriminator to + # pick a new schema/class to instantiate because a discriminator + # propertyName value was passed in + + if len(args) == 1: + arg = args[0] + if arg is None and is_type_nullable(cls): + # The input data is the 'null' value and the type is nullable. + return None + + if issubclass(cls, ModelComposed) and allows_single_value_input(cls): + model_kwargs = {} + oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) + return oneof_instance + + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): + # Use case 1: this openapi schema (cls) does not have a discriminator + # Use case 2: we have already visited this class before and are sure that we + # want to instantiate it this time. We have visited this class deserializing + # a payload with a discriminator. During that process we traveled through + # this class but did not make an instance of it. Now we are making an + # instance of a composed class which contains cls in it, so this time make an instance of cls. + # + # Here's an example of use case 2: 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 the composed schema dog Dog, we will make an instance of the + # Animal class (because Dal has allOf: Animal) but this time we won't travel + # through Animal's discriminator because we passed in + # _visited_composed_classes = (Animal,) + + return cls._from_openapi_data(*args, **kwargs) + + # Get the name and value of the discriminator property. + # The discriminator name is obtained from the discriminator meta-data + # and the discriminator value is obtained from the input data. + discr_propertyname_py = list(cls.discriminator.keys())[0] + discr_propertyname_js = cls.attribute_map[discr_propertyname_py] + if discr_propertyname_js in kwargs: + discr_value = kwargs[discr_propertyname_js] + elif discr_propertyname_py in kwargs: + discr_value = kwargs[discr_propertyname_py] + else: + # The input data does not contain the discriminator property. + path_to_item = kwargs.get('_path_to_item', ()) + raise ApiValueError( + "Cannot deserialize input data due to missing discriminator. " + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) + ) + + # Implementation note: the last argument to get_discriminator_class + # is a list of visited classes. get_discriminator_class may recursively + # call itself and update the list of visited classes, and the initial + # value must be an empty list. Hence not using 'visited_composed_classes' + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) + if new_cls is None: + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) + raise ApiValueError( + "Cannot deserialize input data due to invalid discriminator " + "value. The OpenAPI document has no mapping for discriminator " + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) + ) + + if new_cls in visited_composed_classes: + # if we are making an instance of a composed schema Descendent + # which allOf includes Ancestor, then Ancestor contains + # a discriminator that includes Descendent. + # So if we make an instance of Descendent, we have to make an + # instance of Ancestor to hold the allOf properties. + # This code detects that use case and makes the instance of Ancestor + # For example: + # When making an instance of Dog, _visited_composed_classes = (Dog,) + # then we make an instance of Animal to include in dog._composed_instances + # so when we are here, cls is Animal + # cls.discriminator != None + # cls not in _visited_composed_classes + # new_cls = Dog + # but we know we know that we already have Dog + # because it is in visited_composed_classes + # so make Animal here + return cls._from_openapi_data(*args, **kwargs) + + # Build a list containing all oneOf and anyOf descendants. + oneof_anyof_classes = None + if cls._composed_schemas is not None: + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) + oneof_anyof_child = new_cls in oneof_anyof_classes + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + + if cls._composed_schemas.get('allOf') and oneof_anyof_child: + # Validate that we can make self because when we make the + # new_cls it will not include the allOf validations in self + self_inst = cls._from_openapi_data(*args, **kwargs) + + + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) return new_inst @@ -317,7 +473,7 @@ def __getitem__(self, name): ) def __contains__(self, name): - """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" if name in self.required_properties: return name in self.__dict__ @@ -372,7 +528,7 @@ def __getitem__(self, name): ) def __contains__(self, name): - """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" if name in self.required_properties: return name in self.__dict__ @@ -436,27 +592,43 @@ def __setitem__(self, name, value): self.__dict__[name] = value return - # set the attribute on the correct instance - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - if model_instances: - for model_instance in model_instances: - if model_instance == self: - self.set_attribute(name, value) - else: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = ( - model_instance - ) - return None - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) + """ + Use cases: + 1. additional_properties_type is None (additionalProperties == False in spec) + Check for property presence in self.openapi_types + if not present then throw an error + if present set in self, set attribute + always set on composed schemas + 2. additional_properties_type exists + set attribute on self + always set on composed schemas + """ + if self.additional_properties_type is None: + """ + For an attribute to exist on a composed schema it must: + - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND + - fulfill schema_requirements in each oneOf/anyOf/allOf schemas + + schema_requirements: + For an attribute to exist on a schema it must: + - be present in properties at the schema OR + - have additionalProperties unset (defaults additionalProperties = any type) OR + - have additionalProperties set + """ + if name not in self.openapi_types: + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] + ) + # attribute must be set on self and composed instances + self.set_attribute(name, value) + for model_instance in self._composed_instances: + setattr(model_instance, name, value) + if name not in self._var_name_to_model_instances: + # we assigned an additional property + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + return None __unset_attribute_value__ = object() @@ -466,13 +638,12 @@ def get(self, name, default=None): return self.__dict__[name] # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) + model_instances = self._var_name_to_model_instances.get(name) values = [] - # A composed model stores child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. A named property can exist in - # multiple child models. If the property is present in more than one - # child model, the value must be the same across all the child models. + # A composed model stores self and child (oneof/anyOf/allOf) models under + # self._var_name_to_model_instances. + # Any property must exist in self and all model instances + # The value stored in all model instances must be the same if model_instances: for model_instance in model_instances: if name in model_instance._data_store: @@ -504,7 +675,7 @@ def __getitem__(self, name): return value def __contains__(self, name): - """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`""" + """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" if name in self.required_properties: return name in self.__dict__ @@ -1195,14 +1366,14 @@ def deserialize_model(model_data, model_class, path_to_item, check_type, _spec_property_naming=spec_property_naming) if issubclass(model_class, ModelSimple): - return model_class(model_data, **kw_args) + return model_class._new_from_openapi_data(model_data, **kw_args) elif isinstance(model_data, list): - return model_class(*model_data, **kw_args) + return model_class._new_from_openapi_data(*model_data, **kw_args) if isinstance(model_data, dict): kw_args.update(model_data) - return model_class(**kw_args) + return model_class._new_from_openapi_data(**kw_args) elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class(model_data, **kw_args) + return model_class._new_from_openapi_data(model_data, **kw_args) def deserialize_file(response_data, configuration, content_disposition=None): @@ -1335,14 +1506,14 @@ def is_valid_type(input_class_simple, valid_classes): Returns: bool """ + if issubclass(input_class_simple, OpenApiModel) and \ + valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + return True valid_type = input_class_simple in valid_classes if not valid_type and ( issubclass(input_class_simple, OpenApiModel) or input_class_simple is none_type): for valid_class in valid_classes: - if valid_class is object: - # this is to handle oneOf fields in a Model. AAPI team added this if condition to handle Quant API - return True if input_class_simple is none_type and is_type_nullable(valid_class): # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. return True @@ -1491,20 +1662,34 @@ def model_to_dict(model_instance, serialize=True): model_instances = [model_instance] if model_instance._composed_schemas: model_instances.extend(model_instance._composed_instances) + seen_json_attribute_names = set() + used_fallback_python_attribute_names = set() + py_to_json_map = {} for model_instance in model_instances: for attr, value in model_instance._data_store.items(): if serialize: # we use get here because additional property key names do not # exist in attribute_map - attr = model_instance.attribute_map.get(attr, attr) + try: + attr = model_instance.attribute_map[attr] + py_to_json_map.update(model_instance.attribute_map) + seen_json_attribute_names.add(attr) + except KeyError: + used_fallback_python_attribute_names.add(attr) if isinstance(value, list): - if not value or isinstance(value[0], PRIMITIVE_TYPES): - # empty list or primitive types - result[attr] = value - elif isinstance(value[0], ModelSimple): - result[attr] = [x.value for x in value] - else: - result[attr] = [model_to_dict(x, serialize=serialize) for x in value] + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], @@ -1518,6 +1703,16 @@ def model_to_dict(model_instance, serialize=True): result[attr] = model_to_dict(value, serialize=serialize) else: result[attr] = value + if serialize: + for python_key in used_fallback_python_attribute_names: + json_key = py_to_json_map.get(python_key) + if json_key is None: + continue + if python_key == json_key: + continue + json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names + if json_key_assigned_no_need_for_python_key: + del result[python_key] return result @@ -1561,25 +1756,19 @@ def get_valid_classes_phrase(input_classes): return "is one of [{0}]".format(", ".join(all_class_names)) -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(self, *args, **kwargs): - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python(kwargs, self.__class__) - return fn(self, *args, **kwargs) - return wrapped_init - - def get_allof_instances(self, model_args, constant_args): """ Args: self: the class we are handling model_args (dict): var_name to var_value used to make instances - constant_args (dict): var_name to var_value - used to make instances + constant_args (dict): + metadata arguments: + _check_type + _path_to_item + _spec_property_naming + _configuration + _visited_composed_classes Returns composed_instances (list) @@ -1587,20 +1776,11 @@ def get_allof_instances(self, model_args, constant_args): composed_instances = [] for allof_class in self._composed_schemas['allOf']: - # no need to handle changing js keys to python because - # for composed schemas, allof parameters are included in the - # composed schema and were changed to python keys in __new__ - # extract a dict of only required keys from fixed_model_args - kwargs = {} - var_names = set(allof_class.openapi_types.keys()) - for var_name in var_names: - if var_name in model_args: - kwargs[var_name] = model_args[var_name] - - # and use it to make the instance - kwargs.update(constant_args) try: - allof_instance = allof_class(**kwargs) + if constant_args.get('_spec_property_naming'): + allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) + else: + allof_instance = allof_class(**model_args, **constant_args) composed_instances.append(allof_instance) except Exception as ex: raise ApiValueError( @@ -1660,34 +1840,18 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): single_value_input = allows_single_value_input(oneof_class) - if not single_value_input: - # transform js keys from input data to python keys in fixed_model_args - fixed_model_args = change_keys_js_to_python( - model_kwargs, oneof_class) - - # Extract a dict with the properties that are declared in the oneOf schema. - # Undeclared properties (e.g. properties that are allowed because of the - # additionalProperties attribute in the OAS document) are not added to - # the dict. - kwargs = {} - var_names = set(oneof_class.openapi_types.keys()) - for var_name in var_names: - if var_name in fixed_model_args: - kwargs[var_name] = fixed_model_args[var_name] - - # do not try to make a model with no input args - if len(kwargs) == 0: - continue - - # and use it to make the instance - kwargs.update(constant_kwargs) - try: if not single_value_input: - oneof_instance = oneof_class(**kwargs) + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) + else: + oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) else: if issubclass(oneof_class, ModelSimple): - oneof_instance = oneof_class(model_arg, **constant_kwargs) + if constant_kwargs.get('_spec_property_naming'): + oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) + else: + oneof_instance = oneof_class(model_arg, **constant_kwargs) elif oneof_class in PRIMITIVE_TYPES: oneof_instance = validate_and_convert_types( model_arg, @@ -1741,24 +1905,11 @@ def get_anyof_instances(self, model_args, constant_args): # none_type deserialization is handled in the __new__ method continue - # transform js keys to python keys in fixed_model_args - fixed_model_args = change_keys_js_to_python(model_args, anyof_class) - - # extract a dict of only required keys from these_model_vars - kwargs = {} - var_names = set(anyof_class.openapi_types.keys()) - for var_name in var_names: - if var_name in fixed_model_args: - kwargs[var_name] = fixed_model_args[var_name] - - # do not try to make a model with no input args - if len(kwargs) == 0: - continue - - # and use it to make the instance - kwargs.update(constant_args) try: - anyof_instance = anyof_class(**kwargs) + if constant_args.get('_spec_property_naming'): + anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) + else: + anyof_instance = anyof_class(**model_args, **constant_args) anyof_instances.append(anyof_instance) except Exception: pass @@ -1771,47 +1922,34 @@ def get_anyof_instances(self, model_args, constant_args): return anyof_instances -def get_additional_properties_model_instances( - composed_instances, self): - additional_properties_model_instances = [] - all_instances = [self] - all_instances.extend(composed_instances) - for instance in all_instances: - if instance.additional_properties_type is not None: - additional_properties_model_instances.append(instance) - return additional_properties_model_instances - - -def get_var_name_to_model_instances(self, composed_instances): - var_name_to_model_instances = {} - all_instances = [self] - all_instances.extend(composed_instances) - for instance in all_instances: - for var_name in instance.openapi_types: - if var_name not in var_name_to_model_instances: - var_name_to_model_instances[var_name] = [instance] - else: - var_name_to_model_instances[var_name].append(instance) - return var_name_to_model_instances - - -def get_unused_args(self, composed_instances, model_args): - unused_args = dict(model_args) - # arguments apssed to self were already converted to python names +def get_discarded_args(self, composed_instances, model_args): + """ + Gathers the args that were discarded by configuration.discard_unknown_keys + """ + model_arg_keys = model_args.keys() + discarded_args = set() + # arguments passed to self were already converted to python names # before __init__ was called - for var_name_py in self.attribute_map: - if var_name_py in unused_args: - del unused_args[var_name_py] for instance in composed_instances: if instance.__class__ in self._composed_schemas['allOf']: - for var_name_py in instance.attribute_map: - if var_name_py in unused_args: - del unused_args[var_name_py] + try: + keys = instance.to_dict().keys() + discarded_keys = model_args - keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass else: - for var_name_js in instance.attribute_map.values(): - if var_name_js in unused_args: - del unused_args[var_name_js] - return unused_args + try: + all_keys = set(model_to_dict(instance, serialize=False).keys()) + js_keys = model_to_dict(instance, serialize=True).keys() + all_keys.update(js_keys) + discarded_keys = model_arg_keys - all_keys + discarded_args.update(discarded_keys) + except Exception: + # allOf integer schema will throw exception + pass + return discarded_args def validate_get_composed_info(constant_args, model_args, self): @@ -1855,36 +1993,42 @@ def validate_get_composed_info(constant_args, model_args, self): composed_instances.append(oneof_instance) anyof_instances = get_anyof_instances(self, model_args, constant_args) composed_instances.extend(anyof_instances) + """ + set additional_properties_model_instances + additional properties must be evaluated at the schema level + so self's additional properties are most important + If self is a composed schema with: + - no properties defined in self + - additionalProperties: False + Then for object payloads every property is an additional property + and they are not allowed, so only empty dict is allowed + + Properties must be set on all matching schemas + so when a property is assigned toa composed instance, it must be set on all + composed instances regardless of additionalProperties presence + keeping it to prevent breaking changes in v5.0.1 + TODO remove cls._additional_properties_model_instances in 6.0.0 + """ + additional_properties_model_instances = [] + if self.additional_properties_type is not None: + additional_properties_model_instances = [self] - # map variable names to composed_instances - var_name_to_model_instances = get_var_name_to_model_instances( - self, composed_instances) - - # set additional_properties_model_instances - additional_properties_model_instances = ( - get_additional_properties_model_instances(composed_instances, self) - ) - - # set any remaining values - unused_args = get_unused_args(self, composed_instances, model_args) - if len(unused_args) > 0 and \ - len(additional_properties_model_instances) == 0 and \ - (self._configuration is None or - not self._configuration.discard_unknown_keys): - raise ApiValueError( - "Invalid input arguments input when making an instance of " - "class %s. Not all inputs were used. The unused input data " - "is %s" % (self.__class__.__name__, unused_args) - ) + """ + no need to set properties on self in here, they will be set in __init__ + By here all composed schema oneOf/anyOf/allOf instances have their properties set using + model_args + """ + discarded_args = get_discarded_args(self, composed_instances, model_args) - # no need to add additional_properties to var_name_to_model_instances here - # because additional_properties_model_instances will direct us to that - # instance when we use getattr or setattr - # and we update var_name_to_model_instances in setattr + # map variable names to composed_instances + var_name_to_model_instances = {} + for prop_name in model_args: + if prop_name not in discarded_args: + var_name_to_model_instances[prop_name] = [self] + composed_instances return [ composed_instances, var_name_to_model_instances, additional_properties_model_instances, - unused_args - ] \ No newline at end of file + discarded_args + ] diff --git a/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py b/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py index bf0c031e..f0778483 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/models/__init__.py @@ -91,6 +91,10 @@ 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_formulas_array import OneOfQuantFormulasArray +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 diff --git a/auto-generated-sdk/fds/analyticsapi/engines/rest.py b/auto-generated-sdk/fds/analyticsapi/engines/rest.py index 5d4f5bdd..c525d831 100644 --- a/auto-generated-sdk/fds/analyticsapi/engines/rest.py +++ b/auto-generated-sdk/fds/analyticsapi/engines/rest.py @@ -15,8 +15,10 @@ import re import ssl from urllib.parse import urlencode - +from urllib.parse import urlparse +from urllib.request import proxy_bypass_environment import urllib3 +import ipaddress from fds.analyticsapi.engines.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError @@ -73,7 +75,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): maxsize = 4 # https pool manager - if configuration.proxy: + if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, @@ -138,15 +140,15 @@ def request(self, method, url, query_params=None, headers=None, timeout = urllib3.Timeout( connect=_request_timeout[0], read=_request_timeout[1]) - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' if query_params: url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): + if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) @@ -291,3 +293,55 @@ def PATCH(self, url, headers=None, query_params=None, post_params=None, _preload_content=_preload_content, _request_timeout=_request_timeout, body=body) + +# end of class RESTClientObject +def is_ipv4(target): + """ Test if IPv4 address or not + """ + try: + chk = ipaddress.IPv4Address(target) + return True + except ipaddress.AddressValueError: + return False + +def in_ipv4net(target, net): + """ Test if target belongs to given IPv4 network + """ + try: + nw = ipaddress.IPv4Network(net) + ip = ipaddress.IPv4Address(target) + if ip in nw: + return True + return False + except ipaddress.AddressValueError: + return False + except ipaddress.NetmaskValueError: + return False + +def should_bypass_proxies(url, no_proxy=None): + """ Yet another requests.should_bypass_proxies + Test if proxies should not be used for a particular url. + """ + + parsed = urlparse(url) + + # special cases + if parsed.hostname in [None, '']: + return True + + # special cases + if no_proxy in [None , '']: + return False + if no_proxy == '*': + return True + + no_proxy = no_proxy.lower().replace(' ',''); + entries = ( + host for host in no_proxy.split(',') if host + ) + + if is_ipv4(parsed.hostname): + for item in entries: + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} ) diff --git a/auto-generated-sdk/git_push.sh b/auto-generated-sdk/git_push.sh index ced3be2b..f53a75d4 100644 --- a/auto-generated-sdk/git_push.sh +++ b/auto-generated-sdk/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' -