diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
new file mode 100644
index 0000000..e01c473
--- /dev/null
+++ b/.github/workflows/python.yml
@@ -0,0 +1,38 @@
+# NOTE: This file is auto generated by OpenAPI Generator.
+# URL: https://openapi-generator.tech
+#
+# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
+
+name: data_bridges_client Python package
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+ if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
+ - name: Lint with flake8
+ run: |
+ # stop the build if there are Python syntax errors or undefined names
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+ - name: Test with pytest
+ run: |
+ pytest
diff --git a/.gitignore b/.gitignore
index f840601..43995bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -62,21 +62,5 @@ docs/_build/
# PyBuilder
target/
-# Ipython Notebook
+#Ipython Notebook
.ipynb_checkpoints
-
-# PyCharm
-.idea/
-
-# Swagger
-generate/swagger.json
-
-# Unneccessary autogenerated files
-.gitlab-ci.yml
-git_push.sh
-.travis.yml
-
-# Env secrets
-.env
-
-/test_runs
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..3e5771b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,31 @@
+# NOTE: This file is auto generated by OpenAPI Generator.
+# URL: https://openapi-generator.tech
+#
+# ref: https://docs.gitlab.com/ee/ci/README.html
+# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
+
+stages:
+ - test
+
+.pytest:
+ stage: test
+ script:
+ - pip install -r requirements.txt
+ - pip install -r test-requirements.txt
+ - pytest --cov=data_bridges_client
+
+pytest-3.7:
+ extends: .pytest
+ image: python:3.7-alpine
+pytest-3.8:
+ extends: .pytest
+ image: python:3.8-alpine
+pytest-3.9:
+ extends: .pytest
+ image: python:3.9-alpine
+pytest-3.10:
+ extends: .pytest
+ image: python:3.10-alpine
+pytest-3.11:
+ extends: .pytest
+ image: python:3.11-alpine
diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore
index 3b2a219..7484ee5 100644
--- a/.openapi-generator-ignore
+++ b/.openapi-generator-ignore
@@ -4,9 +4,6 @@
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
-/scripts
-.gitignore
-
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index bb634f5..3f324dd 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -1,4 +1,7 @@
+.github/workflows/python.yml
+.gitignore
.gitlab-ci.yml
+.openapi-generator-ignore
.travis.yml
README.md
data_bridges_client/__init__.py
@@ -9,73 +12,67 @@ data_bridges_client/api/currency_api.py
data_bridges_client/api/economic_data_api.py
data_bridges_client/api/food_security_api.py
data_bridges_client/api/gorp_api.py
+data_bridges_client/api/incubation_api.py
data_bridges_client/api/market_prices_api.py
data_bridges_client/api/markets_api.py
data_bridges_client/api/rpme_api.py
data_bridges_client/api/surveys_api.py
data_bridges_client/api/xls_forms_api.py
data_bridges_client/api_client.py
-data_bridges_client/apis/__init__.py
+data_bridges_client/api_response.py
data_bridges_client/configuration.py
data_bridges_client/exceptions.py
-data_bridges_client/model/__init__.py
-data_bridges_client/model/bad_request_dto.py
-data_bridges_client/model/commodity_dto.py
-data_bridges_client/model/commodity_price_dto.py
-data_bridges_client/model/commodity_processing_dto.py
-data_bridges_client/model/commodity_quality_dto.py
-data_bridges_client/model/coordinate.py
-data_bridges_client/model/coordinate_equality_comparer.py
-data_bridges_client/model/coordinate_sequence.py
-data_bridges_client/model/coordinate_sequence_factory.py
-data_bridges_client/model/currency_dto.py
-data_bridges_client/model/dimension.py
-data_bridges_client/model/economic_indicator_property.py
-data_bridges_client/model/economic_indicator_property_paged_result.py
-data_bridges_client/model/envelope.py
-data_bridges_client/model/geometry.py
-data_bridges_client/model/geometry_factory.py
-data_bridges_client/model/geometry_overlay.py
-data_bridges_client/model/gorp_value_with_changes.py
-data_bridges_client/model/gorp_value_with_changes_paged_result.py
-data_bridges_client/model/i_attributes_table.py
-data_bridges_client/model/i_feature.py
-data_bridges_client/model/ipc_value.py
-data_bridges_client/model/ipc_value_paged_result.py
-data_bridges_client/model/mfi_processed_data_dto.py
-data_bridges_client/model/nearby_markets_dto.py
-data_bridges_client/model/nts_geometry_services.py
-data_bridges_client/model/ogc_geometry_type.py
-data_bridges_client/model/ordinates.py
-data_bridges_client/model/paged_commodity_list_dto.py
-data_bridges_client/model/paged_commodity_price_list_dto.py
-data_bridges_client/model/paged_commodity_weekly_aggregated_price_list_dto.py
-data_bridges_client/model/paged_currency_list_dto.py
-data_bridges_client/model/paged_processed_data_dto.py
-data_bridges_client/model/paged_survey_list_dto.py
-data_bridges_client/model/paged_xls_form_list_dto.py
-data_bridges_client/model/point.py
-data_bridges_client/model/precision_model.py
-data_bridges_client/model/precision_models.py
-data_bridges_client/model/problem_details.py
-data_bridges_client/model/rpme_assessment.py
-data_bridges_client/model/rpme_assessment_paged_result.py
-data_bridges_client/model/rpme_output_values.py
-data_bridges_client/model/rpme_variable.py
-data_bridges_client/model/rpme_variable_paged_result.py
-data_bridges_client/model/survey_details_dto.py
-data_bridges_client/model/survey_list_dto.py
-data_bridges_client/model/usd_indirect_quotation.py
-data_bridges_client/model/usd_indirect_quotation_paged_result.py
-data_bridges_client/model/view_extended_aggregated_price.py
-data_bridges_client/model/view_extended_aggregated_price_paged_result.py
-data_bridges_client/model/view_extended_alps_value.py
-data_bridges_client/model/view_extended_alps_value_paged_result.py
-data_bridges_client/model/weekly_aggregated_price.py
-data_bridges_client/model/xls_form_definition_dto.py
-data_bridges_client/model/xls_form_dto.py
-data_bridges_client/model_utils.py
data_bridges_client/models/__init__.py
+data_bridges_client/models/bad_request_dto.py
+data_bridges_client/models/commodity_dto.py
+data_bridges_client/models/commodity_price_dto.py
+data_bridges_client/models/commodity_processing_dto.py
+data_bridges_client/models/commodity_quality_dto.py
+data_bridges_client/models/currency_dto.py
+data_bridges_client/models/economic_data_dto.py
+data_bridges_client/models/economic_indicator_property.py
+data_bridges_client/models/economic_indicator_property_paged_result.py
+data_bridges_client/models/feature.py
+data_bridges_client/models/geometry.py
+data_bridges_client/models/gorp_value_with_changes.py
+data_bridges_client/models/gorp_value_with_changes_paged_result.py
+data_bridges_client/models/household_survey_list_dto.py
+data_bridges_client/models/household_survey_list_dto_paged_result.py
+data_bridges_client/models/ipc_value.py
+data_bridges_client/models/ipc_value_paged_result.py
+data_bridges_client/models/key_name_dto.py
+data_bridges_client/models/market_dto.py
+data_bridges_client/models/market_geo_json_root.py
+data_bridges_client/models/mfi_processed_data_dto.py
+data_bridges_client/models/nearby_markets_dto.py
+data_bridges_client/models/paged_commodity_list_dto.py
+data_bridges_client/models/paged_commodity_price_list_dto.py
+data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py
+data_bridges_client/models/paged_currency_list_dto.py
+data_bridges_client/models/paged_economic_data_dto.py
+data_bridges_client/models/paged_market_list_dto.py
+data_bridges_client/models/paged_processed_data_dto.py
+data_bridges_client/models/paged_survey_list_dto.py
+data_bridges_client/models/paged_survey_responses_dto.py
+data_bridges_client/models/paged_xls_form_list_dto.py
+data_bridges_client/models/problem_details.py
+data_bridges_client/models/properties.py
+data_bridges_client/models/rpme_assessment.py
+data_bridges_client/models/rpme_assessment_paged_result.py
+data_bridges_client/models/rpme_output_values.py
+data_bridges_client/models/rpme_variable.py
+data_bridges_client/models/rpme_variable_paged_result.py
+data_bridges_client/models/survey_list_dto.py
+data_bridges_client/models/usd_indirect_quotation.py
+data_bridges_client/models/usd_indirect_quotation_paged_result.py
+data_bridges_client/models/view_extended_aggregated_price.py
+data_bridges_client/models/view_extended_aggregated_price_paged_result.py
+data_bridges_client/models/view_extended_alps_value.py
+data_bridges_client/models/view_extended_alps_value_paged_result.py
+data_bridges_client/models/weekly_aggregated_price.py
+data_bridges_client/models/xls_form_definition_dto.py
+data_bridges_client/models/xls_form_dto.py
+data_bridges_client/py.typed
data_bridges_client/rest.py
docs/BadRequestDTO.md
docs/CommoditiesApi.md
@@ -84,53 +81,48 @@ docs/CommodityPriceDTO.md
docs/CommodityProcessingDTO.md
docs/CommodityQualityDTO.md
docs/CommodityUnitsApi.md
-docs/Coordinate.md
-docs/CoordinateEqualityComparer.md
-docs/CoordinateSequence.md
-docs/CoordinateSequenceFactory.md
docs/CurrencyApi.md
docs/CurrencyDTO.md
-docs/Dimension.md
docs/EconomicDataApi.md
+docs/EconomicDataDTO.md
docs/EconomicIndicatorProperty.md
docs/EconomicIndicatorPropertyPagedResult.md
-docs/Envelope.md
+docs/Feature.md
docs/FoodSecurityApi.md
docs/Geometry.md
-docs/GeometryFactory.md
-docs/GeometryOverlay.md
docs/GorpApi.md
docs/GorpValueWithChanges.md
docs/GorpValueWithChangesPagedResult.md
-docs/IAttributesTable.md
-docs/IFeature.md
+docs/HouseholdSurveyListDTO.md
+docs/HouseholdSurveyListDTOPagedResult.md
+docs/IncubationApi.md
docs/IpcValue.md
docs/IpcValuePagedResult.md
+docs/KeyNameDto.md
docs/MFIProcessedDataDTO.md
+docs/MarketDTO.md
+docs/MarketGeoJsonRoot.md
docs/MarketPricesApi.md
docs/MarketsApi.md
docs/NearbyMarketsDTO.md
-docs/NtsGeometryServices.md
-docs/OgcGeometryType.md
-docs/Ordinates.md
docs/PagedCommodityListDTO.md
docs/PagedCommodityPriceListDTO.md
docs/PagedCommodityWeeklyAggregatedPriceListDTO.md
docs/PagedCurrencyListDTO.md
+docs/PagedEconomicDataDTO.md
+docs/PagedMarketListDTO.md
docs/PagedProcessedDataDTO.md
docs/PagedSurveyListDTO.md
+docs/PagedSurveyResponsesDTO.md
docs/PagedXlsFormListDTO.md
-docs/Point.md
-docs/PrecisionModel.md
-docs/PrecisionModels.md
docs/ProblemDetails.md
+docs/Properties.md
docs/RpmeApi.md
docs/RpmeAssessment.md
docs/RpmeAssessmentPagedResult.md
docs/RpmeOutputValues.md
docs/RpmeVariable.md
docs/RpmeVariablePagedResult.md
-docs/SurveyDetailsDTO.md
docs/SurveyListDTO.md
docs/SurveysApi.md
docs/UsdIndirectQuotation.md
@@ -144,9 +136,71 @@ docs/XlsFormDTO.md
docs/XlsFormDefinitionDTO.md
docs/XlsFormsApi.md
git_push.sh
+pyproject.toml
requirements.txt
setup.cfg
setup.py
test-requirements.txt
test/__init__.py
+test/test_bad_request_dto.py
+test/test_commodities_api.py
+test/test_commodity_dto.py
+test/test_commodity_price_dto.py
+test/test_commodity_processing_dto.py
+test/test_commodity_quality_dto.py
+test/test_commodity_units_api.py
+test/test_currency_api.py
+test/test_currency_dto.py
+test/test_economic_data_api.py
+test/test_economic_data_dto.py
+test/test_economic_indicator_property.py
+test/test_economic_indicator_property_paged_result.py
+test/test_feature.py
+test/test_food_security_api.py
+test/test_geometry.py
+test/test_gorp_api.py
+test/test_gorp_value_with_changes.py
+test/test_gorp_value_with_changes_paged_result.py
+test/test_household_survey_list_dto.py
+test/test_household_survey_list_dto_paged_result.py
+test/test_incubation_api.py
+test/test_ipc_value.py
+test/test_ipc_value_paged_result.py
+test/test_key_name_dto.py
+test/test_market_dto.py
+test/test_market_geo_json_root.py
+test/test_market_prices_api.py
+test/test_markets_api.py
+test/test_mfi_processed_data_dto.py
+test/test_nearby_markets_dto.py
+test/test_paged_commodity_list_dto.py
+test/test_paged_commodity_price_list_dto.py
+test/test_paged_commodity_weekly_aggregated_price_list_dto.py
+test/test_paged_currency_list_dto.py
+test/test_paged_economic_data_dto.py
+test/test_paged_market_list_dto.py
+test/test_paged_processed_data_dto.py
+test/test_paged_survey_list_dto.py
+test/test_paged_survey_responses_dto.py
+test/test_paged_xls_form_list_dto.py
+test/test_problem_details.py
+test/test_properties.py
+test/test_rpme_api.py
+test/test_rpme_assessment.py
+test/test_rpme_assessment_paged_result.py
+test/test_rpme_output_values.py
+test/test_rpme_variable.py
+test/test_rpme_variable_paged_result.py
+test/test_survey_list_dto.py
+test/test_surveys_api.py
+test/test_usd_indirect_quotation.py
+test/test_usd_indirect_quotation_paged_result.py
+test/test_view_extended_aggregated_price.py
+test/test_view_extended_aggregated_price_paged_result.py
+test/test_view_extended_alps_value.py
+test/test_view_extended_alps_value_paged_result.py
+test/test_weekly_aggregated_price.py
+test/test_xls_form_definition_dto.py
+test/test_xls_form_dto.py
+test/test_xls_forms_api.py
tox.ini
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
index 1e20ec3..4b49d9b 100644
--- a/.openapi-generator/VERSION
+++ b/.openapi-generator/VERSION
@@ -1 +1 @@
-5.4.0
\ No newline at end of file
+7.2.0
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..00c5628
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+# ref: https://docs.travis-ci.com/user/languages/python
+language: python
+python:
+ - "3.7"
+ - "3.8"
+ - "3.9"
+ - "3.10"
+ - "3.11"
+ # uncomment the following if needed
+ #- "3.11-dev" # 3.11 development branch
+ #- "nightly" # nightly build
+# command to install dependencies
+install:
+ - "pip install -r requirements.txt"
+ - "pip install -r test-requirements.txt"
+# command to run tests
+script: pytest --cov=data_bridges_client
diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644
index d4fa34f..0000000
--- a/LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2023 WFP-VAM
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/README.md b/README.md
index 382c730..c0a4efe 100644
--- a/README.md
+++ b/README.md
@@ -3,13 +3,13 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.o
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-- API version: 1.3.1
+- API version: 2.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
-Python >=3.6
+Python 3.7+
## Installation & Usage
### pip install
@@ -17,9 +17,9 @@ Python >=3.6
If the python package is hosted on a repository, you can install directly using:
```sh
-pip install git+https://github.com/WFP-VAM/DataBridgesAPI.git
+pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
-(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/WFP-VAM/DataBridgesAPI.git`)
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
Then import the package:
```python
@@ -40,6 +40,10 @@ Then import the package:
import data_bridges_client
```
+### Tests
+
+Execute `pytest` to run the tests.
+
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
@@ -48,36 +52,47 @@ Please follow the [installation procedure](#installation--usage) and then run th
import time
import data_bridges_client
+from data_bridges_client.rest import ApiException
from pprint import pprint
-from data_bridges_client.api import commodities_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
-from data_bridges_client.token import WfpApiToken
-
-# Configure OAuth2 access token for authorization: default
-KEY = ''
-SECRET = ''
-token = WfpApiToken(api_key=KEY, api_secret=SECRET)
-
-# Enter a context with an instance of the API client using a fresh token
-with data_bridges_client.ApiClient(token.refresh_configuration()) as api_client:
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = commodities_api.CommoditiesApi(api_client)
- country_code = "SEN" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) (default to "json")
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.CommoditiesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
+ category_name = 'category_name_example' # str | The name, even partial and case insensitive, of a commodity category. (optional)
+ category_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List. (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
try:
# Provides the list of categories.
- api_response = api_instance.commodities_list_get(country_code=country_code, format=format, env=env)
+ api_response = api_instance.commodities_categories_list_get(country_code=country_code, category_name=category_name, category_id=category_id, page=page, format=format, env=env)
+ print("The response of CommoditiesApi->commodities_categories_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
- print("Exception when calling CommoditiesApi->commodities_list_get: %s\n" % e)
+ except ApiException as e:
+ print("Exception when calling CommoditiesApi->commodities_categories_list_get: %s\n" % e)
+
```
## Documentation for API Endpoints
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
@@ -92,6 +107,11 @@ Class | Method | HTTP request | Description
*FoodSecurityApi* | [**food_security_list_get**](docs/FoodSecurityApi.md#food_security_list_get) | **GET** /FoodSecurity/List |
*GorpApi* | [**gorp_latest_get**](docs/GorpApi.md#gorp_latest_get) | **GET** /Gorp/Latest | Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
*GorpApi* | [**gorp_list_get**](docs/GorpApi.md#gorp_list_get) | **GET** /Gorp/List | Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+*IncubationApi* | [**household_draft_internal_base_data_get**](docs/IncubationApi.md#household_draft_internal_base_data_get) | **GET** /Household/DraftInternalBaseData | Get data that includes the core household fields only by Survey ID
+*IncubationApi* | [**household_full_data_get**](docs/IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+*IncubationApi* | [**household_official_use_base_data_get**](docs/IncubationApi.md#household_official_use_base_data_get) | **GET** /Household/OfficialUseBaseData | Get data that includes the core household fields only by Survey ID
+*IncubationApi* | [**household_public_base_data_get**](docs/IncubationApi.md#household_public_base_data_get) | **GET** /Household/PublicBaseData | Get data that includes the core household fields only by Survey ID
+*IncubationApi* | [**household_surveys_get**](docs/IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
*MarketPricesApi* | [**market_prices_alps_get**](docs/MarketPricesApi.md#market_prices_alps_get) | **GET** /MarketPrices/Alps | Returns time series values of ALPS and PEWI.
*MarketPricesApi* | [**market_prices_price_daily_get**](docs/MarketPricesApi.md#market_prices_price_daily_get) | **GET** /MarketPrices/PriceDaily | Returns a daily time series of commodity market prices.
*MarketPricesApi* | [**market_prices_price_monthly_get**](docs/MarketPricesApi.md#market_prices_price_monthly_get) | **GET** /MarketPrices/PriceMonthly | Returns a monthly time series of commodity market prices.
@@ -101,14 +121,16 @@ Class | Method | HTTP request | Description
*MarketsApi* | [**markets_list_get**](docs/MarketsApi.md#markets_list_get) | **GET** /Markets/List | Get a complete list of markets in a country
*MarketsApi* | [**markets_markets_as_csv_get**](docs/MarketsApi.md#markets_markets_as_csv_get) | **GET** /Markets/MarketsAsCSV | Get a complete list of markets in a country
*MarketsApi* | [**markets_nearby_markets_get**](docs/MarketsApi.md#markets_nearby_markets_get) | **GET** /Markets/NearbyMarkets | Find markets near a given location by longitude and latitude within a 15Km distance
+*RpmeApi* | [**rpme_base_data_get**](docs/RpmeApi.md#rpme_base_data_get) | **GET** /Rpme/BaseData | Get data that includes the core RPME fields only by Survey ID
+*RpmeApi* | [**rpme_full_data_get**](docs/RpmeApi.md#rpme_full_data_get) | **GET** /Rpme/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
*RpmeApi* | [**rpme_output_values_get**](docs/RpmeApi.md#rpme_output_values_get) | **GET** /Rpme/OutputValues | Processed values for each variable used in the assessments
*RpmeApi* | [**rpme_surveys_get**](docs/RpmeApi.md#rpme_surveys_get) | **GET** /Rpme/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
*RpmeApi* | [**rpme_variables_get**](docs/RpmeApi.md#rpme_variables_get) | **GET** /Rpme/Variables | List of variables
*RpmeApi* | [**rpme_xls_forms_get**](docs/RpmeApi.md#rpme_xls_forms_get) | **GET** /Rpme/XLSForms | Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
*SurveysApi* | [**m_fi_surveys_base_data_get**](docs/SurveysApi.md#m_fi_surveys_base_data_get) | **GET** /MFI/Surveys/BaseData | Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
*SurveysApi* | [**m_fi_surveys_full_data_get**](docs/SurveysApi.md#m_fi_surveys_full_data_get) | **GET** /MFI/Surveys/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
-*SurveysApi* | [**m_fi_surveys_get**](docs/SurveysApi.md#m_fi_surveys_get) | **GET** /MFI/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
-*SurveysApi* | [**m_fi_surveys_processed_data_get**](docs/SurveysApi.md#m_fi_surveys_processed_data_get) | **GET** /MFI/Surveys/ProcessedData | Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+*SurveysApi* | [**m_fi_surveys_get**](docs/SurveysApi.md#m_fi_surveys_get) | **GET** /MFI/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
+*SurveysApi* | [**m_fi_surveys_processed_data_get**](docs/SurveysApi.md#m_fi_surveys_processed_data_get) | **GET** /MFI/Surveys/ProcessedData | Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
*XlsFormsApi* | [**m_fi_xls_forms_definition_get**](docs/XlsFormsApi.md#m_fi_xls_forms_definition_get) | **GET** /MFI/XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
*XlsFormsApi* | [**m_fi_xls_forms_get**](docs/XlsFormsApi.md#m_fi_xls_forms_get) | **GET** /MFI/XlsForms | Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
@@ -120,46 +142,40 @@ Class | Method | HTTP request | Description
- [CommodityPriceDTO](docs/CommodityPriceDTO.md)
- [CommodityProcessingDTO](docs/CommodityProcessingDTO.md)
- [CommodityQualityDTO](docs/CommodityQualityDTO.md)
- - [Coordinate](docs/Coordinate.md)
- - [CoordinateEqualityComparer](docs/CoordinateEqualityComparer.md)
- - [CoordinateSequence](docs/CoordinateSequence.md)
- - [CoordinateSequenceFactory](docs/CoordinateSequenceFactory.md)
- [CurrencyDTO](docs/CurrencyDTO.md)
- - [Dimension](docs/Dimension.md)
+ - [EconomicDataDTO](docs/EconomicDataDTO.md)
- [EconomicIndicatorProperty](docs/EconomicIndicatorProperty.md)
- [EconomicIndicatorPropertyPagedResult](docs/EconomicIndicatorPropertyPagedResult.md)
- - [Envelope](docs/Envelope.md)
+ - [Feature](docs/Feature.md)
- [Geometry](docs/Geometry.md)
- - [GeometryFactory](docs/GeometryFactory.md)
- - [GeometryOverlay](docs/GeometryOverlay.md)
- [GorpValueWithChanges](docs/GorpValueWithChanges.md)
- [GorpValueWithChangesPagedResult](docs/GorpValueWithChangesPagedResult.md)
- - [IAttributesTable](docs/IAttributesTable.md)
- - [IFeature](docs/IFeature.md)
+ - [HouseholdSurveyListDTO](docs/HouseholdSurveyListDTO.md)
+ - [HouseholdSurveyListDTOPagedResult](docs/HouseholdSurveyListDTOPagedResult.md)
- [IpcValue](docs/IpcValue.md)
- [IpcValuePagedResult](docs/IpcValuePagedResult.md)
+ - [KeyNameDto](docs/KeyNameDto.md)
- [MFIProcessedDataDTO](docs/MFIProcessedDataDTO.md)
+ - [MarketDTO](docs/MarketDTO.md)
+ - [MarketGeoJsonRoot](docs/MarketGeoJsonRoot.md)
- [NearbyMarketsDTO](docs/NearbyMarketsDTO.md)
- - [NtsGeometryServices](docs/NtsGeometryServices.md)
- - [OgcGeometryType](docs/OgcGeometryType.md)
- - [Ordinates](docs/Ordinates.md)
- [PagedCommodityListDTO](docs/PagedCommodityListDTO.md)
- [PagedCommodityPriceListDTO](docs/PagedCommodityPriceListDTO.md)
- [PagedCommodityWeeklyAggregatedPriceListDTO](docs/PagedCommodityWeeklyAggregatedPriceListDTO.md)
- [PagedCurrencyListDTO](docs/PagedCurrencyListDTO.md)
+ - [PagedEconomicDataDTO](docs/PagedEconomicDataDTO.md)
+ - [PagedMarketListDTO](docs/PagedMarketListDTO.md)
- [PagedProcessedDataDTO](docs/PagedProcessedDataDTO.md)
- [PagedSurveyListDTO](docs/PagedSurveyListDTO.md)
+ - [PagedSurveyResponsesDTO](docs/PagedSurveyResponsesDTO.md)
- [PagedXlsFormListDTO](docs/PagedXlsFormListDTO.md)
- - [Point](docs/Point.md)
- - [PrecisionModel](docs/PrecisionModel.md)
- - [PrecisionModels](docs/PrecisionModels.md)
- [ProblemDetails](docs/ProblemDetails.md)
+ - [Properties](docs/Properties.md)
- [RpmeAssessment](docs/RpmeAssessment.md)
- [RpmeAssessmentPagedResult](docs/RpmeAssessmentPagedResult.md)
- [RpmeOutputValues](docs/RpmeOutputValues.md)
- [RpmeVariable](docs/RpmeVariable.md)
- [RpmeVariablePagedResult](docs/RpmeVariablePagedResult.md)
- - [SurveyDetailsDTO](docs/SurveyDetailsDTO.md)
- [SurveyListDTO](docs/SurveyListDTO.md)
- [UsdIndirectQuotation](docs/UsdIndirectQuotation.md)
- [UsdIndirectQuotationPagedResult](docs/UsdIndirectQuotationPagedResult.md)
@@ -172,24 +188,25 @@ Class | Method | HTTP request | Description
- [XlsFormDefinitionDTO](docs/XlsFormDefinitionDTO.md)
+
## Documentation For Authorization
-## Bearer
-
-- **Type**: API key
-- **API key parameter name**: Authorization
-- **Location**: HTTP header
-
-
-## default
+Authentication schemes defined for the API:
+
+### default
- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: https://api.wfp.org/authorize
- **Scopes**:
+ - **vamdatabridges_household-officialusebasedata_get**: vamdatabridges_household-officialusebasedata_get
+ - **vamdatabridges_rpme-fulldata_get**: vamdatabridges_rpme-fulldata_get
+ - **vamdatabridges_household-publicbasedata_get**: vamdatabridges_household-publicbasedata_get
- **vamdatabridges_mfi-surveys-fulldata_get**: vamdatabridges_mfi-surveys-fulldata_get
+ - **vamdatabridges_household-draftinternalbasedata_get**: vamdatabridges_household-draftinternalbasedata_get
- **vamdatabridges_marketprices-priceraw_get**: vamdatabridges_marketprices-priceraw_get
+ - **vamdatabridges_household-fulldata_get**: vamdatabridges_household-fulldata_get
## Author
@@ -197,22 +214,3 @@ Class | Method | HTTP request | Description
wfp.economicanalysis@wfp.org
-## Notes for Large OpenAPI documents
-If the OpenAPI document is large, imports in data_bridges_client.apis and data_bridges_client.models may fail with a
-RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
-
-Solution 1:
-Use specific imports for apis and models like:
-- `from data_bridges_client.api.default_api import DefaultApi`
-- `from data_bridges_client.model.pet import Pet`
-
-Solution 2:
-Before importing the package, adjust the maximum recursion limit as shown below:
-```
-import sys
-sys.setrecursionlimit(1500)
-import data_bridges_client
-from data_bridges_client.apis import *
-from data_bridges_client.models import *
-```
-
diff --git a/data_bridges_client/__init__.py b/data_bridges_client/__init__.py
index 25d9931..8fce7c3 100644
--- a/data_bridges_client/__init__.py
+++ b/data_bridges_client/__init__.py
@@ -1,28 +1,94 @@
+# coding: utf-8
+
# flake8: noqa
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
__version__ = "1.0.0"
+# import apis into sdk package
+from data_bridges_client.api.commodities_api import CommoditiesApi
+from data_bridges_client.api.commodity_units_api import CommodityUnitsApi
+from data_bridges_client.api.currency_api import CurrencyApi
+from data_bridges_client.api.economic_data_api import EconomicDataApi
+from data_bridges_client.api.food_security_api import FoodSecurityApi
+from data_bridges_client.api.gorp_api import GorpApi
+from data_bridges_client.api.incubation_api import IncubationApi
+from data_bridges_client.api.market_prices_api import MarketPricesApi
+from data_bridges_client.api.markets_api import MarketsApi
+from data_bridges_client.api.rpme_api import RpmeApi
+from data_bridges_client.api.surveys_api import SurveysApi
+from data_bridges_client.api.xls_forms_api import XlsFormsApi
+
# import ApiClient
+from data_bridges_client.api_response import ApiResponse
from data_bridges_client.api_client import ApiClient
-
-# import Configuration
from data_bridges_client.configuration import Configuration
-
-# import exceptions
from data_bridges_client.exceptions import OpenApiException
-from data_bridges_client.exceptions import ApiAttributeError
from data_bridges_client.exceptions import ApiTypeError
from data_bridges_client.exceptions import ApiValueError
from data_bridges_client.exceptions import ApiKeyError
+from data_bridges_client.exceptions import ApiAttributeError
from data_bridges_client.exceptions import ApiException
+
+# import models into sdk package
+from data_bridges_client.models.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.commodity_dto import CommodityDTO
+from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO
+from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO
+from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO
+from data_bridges_client.models.currency_dto import CurrencyDTO
+from data_bridges_client.models.economic_data_dto import EconomicDataDTO
+from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty
+from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+from data_bridges_client.models.feature import Feature
+from data_bridges_client.models.geometry import Geometry
+from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO
+from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult
+from data_bridges_client.models.ipc_value import IpcValue
+from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult
+from data_bridges_client.models.key_name_dto import KeyNameDto
+from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO
+from data_bridges_client.models.market_dto import MarketDTO
+from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot
+from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
+from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO
+from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO
+from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO
+from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.models.problem_details import ProblemDetails
+from data_bridges_client.models.properties import Properties
+from data_bridges_client.models.rpme_assessment import RpmeAssessment
+from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+from data_bridges_client.models.rpme_output_values import RpmeOutputValues
+from data_bridges_client.models.rpme_variable import RpmeVariable
+from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult
+from data_bridges_client.models.survey_list_dto import SurveyListDTO
+from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation
+from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue
+from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice
+from data_bridges_client.models.xls_form_dto import XlsFormDTO
+from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
diff --git a/data_bridges_client/api/__init__.py b/data_bridges_client/api/__init__.py
index c8bff55..8f86505 100644
--- a/data_bridges_client/api/__init__.py
+++ b/data_bridges_client/api/__init__.py
@@ -1,3 +1,16 @@
-# do not import all apis into this module because that uses a lot of memory and stack frames
-# if you need the ability to import all apis from one package, import them with
-# from data_bridges_client.apis import CommoditiesApi
+# flake8: noqa
+
+# import apis into api package
+from data_bridges_client.api.commodities_api import CommoditiesApi
+from data_bridges_client.api.commodity_units_api import CommodityUnitsApi
+from data_bridges_client.api.currency_api import CurrencyApi
+from data_bridges_client.api.economic_data_api import EconomicDataApi
+from data_bridges_client.api.food_security_api import FoodSecurityApi
+from data_bridges_client.api.gorp_api import GorpApi
+from data_bridges_client.api.incubation_api import IncubationApi
+from data_bridges_client.api.market_prices_api import MarketPricesApi
+from data_bridges_client.api.markets_api import MarketsApi
+from data_bridges_client.api.rpme_api import RpmeApi
+from data_bridges_client.api.surveys_api import SurveysApi
+from data_bridges_client.api.xls_forms_api import XlsFormsApi
+
diff --git a/data_bridges_client/api/commodities_api.py b/data_bridges_client/api/commodities_api.py
index 01910b6..a82dad9 100644
--- a/data_bridges_client/api/commodities_api.py
+++ b/data_bridges_client/api/commodities_api.py
@@ -1,362 +1,750 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import io
+import warnings
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictInt, StrictStr, field_validator
-class CommoditiesApi(object):
+from typing import Optional
+
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class CommoditiesApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.commodities_categories_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCommodityListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Commodities/Categories/List',
- 'operation_id': 'commodities_categories_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'category_name',
- 'category_id',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'category_name':
- (str,),
- 'category_id':
- (int,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'category_name': 'categoryName',
- 'category_id': 'categoryID',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'category_name': 'query',
- 'category_id': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def commodities_categories_list_get(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ category_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity category.")] = None,
+ category_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCommodityListDTO:
+ """Provides the list of categories.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param category_name: The name, even partial and case insensitive, of a commodity category.
+ :type category_name: str
+ :param category_id: The exact ID of a Commodity, as found in /Commodities/List.
+ :type category_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodities_categories_list_get_serialize(
+ country_code=country_code,
+ category_name=category_name,
+ category_id=category_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.commodities_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCommodityListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Commodities/List',
- 'operation_id': 'commodities_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'commodity_name',
- 'commodity_id',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'commodity_name':
- (str,),
- 'commodity_id':
- (int,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'commodity_name': 'commodityName',
- 'commodity_id': 'commodityID',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'commodity_name': 'query',
- 'commodity_id': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def commodities_categories_list_get(
+
+ @validate_call
+ def commodities_categories_list_get_with_http_info(
self,
- **kwargs
- ):
- """Provides the list of categories. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.commodities_categories_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. [optional]
- category_name (str): The name, even partial and case insensitive, of a commodity category.. [optional]
- category_id (int): The exact ID of a Commodity, as found in /Commodities/List.. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCommodityListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ category_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity category.")] = None,
+ category_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCommodityListDTO]:
+ """Provides the list of categories.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param category_name: The name, even partial and case insensitive, of a commodity category.
+ :type category_name: str
+ :param category_id: The exact ID of a Commodity, as found in /Commodities/List.
+ :type category_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodities_categories_list_get_serialize(
+ country_code=country_code,
+ category_name=category_name,
+ category_id=category_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def commodities_categories_list_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ category_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity category.")] = None,
+ category_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Provides the list of categories.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param category_name: The name, even partial and case insensitive, of a commodity category.
+ :type category_name: str
+ :param category_id: The exact ID of a Commodity, as found in /Commodities/List.
+ :type category_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodities_categories_list_get_serialize(
+ country_code=country_code,
+ category_name=category_name,
+ category_id=category_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _commodities_categories_list_get_serialize(
+ self,
+ country_code,
+ category_name,
+ category_id,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if category_name is not None:
+
+ _query_params.append(('categoryName', category_name))
+
+ if category_id is not None:
+
+ _query_params.append(('categoryID', category_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Commodities/Categories/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.commodities_categories_list_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def commodities_list_get(
self,
- **kwargs
- ):
- """Provide the detailed list of the commodities available in DataBridges platform # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.commodities_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. [optional]
- commodity_name (str): The name, even partial and case insensitive, of a commodity. [optional]
- commodity_id (int): The exact ID of a commodity. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCommodityListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ commodity_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a commodity")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCommodityListDTO:
+ """Provide the detailed list of the commodities available in DataBridges platform
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param commodity_name: The name, even partial and case insensitive, of a commodity
+ :type commodity_name: str
+ :param commodity_id: The exact ID of a commodity
+ :type commodity_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodities_list_get_serialize(
+ country_code=country_code,
+ commodity_name=commodity_name,
+ commodity_id=commodity_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def commodities_list_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ commodity_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a commodity")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCommodityListDTO]:
+ """Provide the detailed list of the commodities available in DataBridges platform
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param commodity_name: The name, even partial and case insensitive, of a commodity
+ :type commodity_name: str
+ :param commodity_id: The exact ID of a commodity
+ :type commodity_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodities_list_get_serialize(
+ country_code=country_code,
+ commodity_name=commodity_name,
+ commodity_id=commodity_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def commodities_list_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ commodity_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a commodity")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Provide the detailed list of the commodities available in DataBridges platform
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param commodity_name: The name, even partial and case insensitive, of a commodity
+ :type commodity_name: str
+ :param commodity_id: The exact ID of a commodity
+ :type commodity_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodities_list_get_serialize(
+ country_code=country_code,
+ commodity_name=commodity_name,
+ commodity_id=commodity_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.commodities_list_get_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _commodities_list_get_serialize(
+ self,
+ country_code,
+ commodity_name,
+ commodity_id,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if commodity_name is not None:
+
+ _query_params.append(('commodityName', commodity_name))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Commodities/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/commodity_units_api.py b/data_bridges_client/api/commodity_units_api.py
index 18a6223..960f962 100644
--- a/data_bridges_client/api/commodity_units_api.py
+++ b/data_bridges_client/api/commodity_units_api.py
@@ -1,368 +1,767 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import io
+import warnings
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictInt, StrictStr, field_validator
-class CommodityUnitsApi(object):
+from typing import Optional
+
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class CommodityUnitsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.commodity_units_conversion_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCommodityListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/CommodityUnits/Conversion/List',
- 'operation_id': 'commodity_units_conversion_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'commodity_id',
- 'from_unit_id',
- 'to_unit_id',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'commodity_id':
- (int,),
- 'from_unit_id':
- (int,),
- 'to_unit_id':
- (int,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'commodity_id': 'commodityID',
- 'from_unit_id': 'fromUnitID',
- 'to_unit_id': 'toUnitID',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'commodity_id': 'query',
- 'from_unit_id': 'query',
- 'to_unit_id': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def commodity_units_conversion_list_get(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ from_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List")] = None,
+ to_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCommodityListDTO:
+ """Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param from_unit_id: The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List
+ :type from_unit_id: int
+ :param to_unit_id: The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List
+ :type to_unit_id: int
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodity_units_conversion_list_get_serialize(
+ country_code=country_code,
+ commodity_id=commodity_id,
+ from_unit_id=from_unit_id,
+ to_unit_id=to_unit_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.commodity_units_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCommodityListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/CommodityUnits/List',
- 'operation_id': 'commodity_units_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'commodity_unit_name',
- 'commodity_unit_id',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'commodity_unit_name':
- (str,),
- 'commodity_unit_id':
- (int,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'commodity_unit_name': 'commodityUnitName',
- 'commodity_unit_id': 'commodityUnitID',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'commodity_unit_name': 'query',
- 'commodity_unit_id': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def commodity_units_conversion_list_get(
+
+ @validate_call
+ def commodity_units_conversion_list_get_with_http_info(
self,
- **kwargs
- ):
- """Provides conversion factors to Kilogram or Litres for each convertible unit of measure. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.commodity_units_conversion_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- commodity_id (int): The exact ID of a Commodity, as found in /Commodities/List. [optional] if omitted the server will use the default value of 0
- from_unit_id (int): The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List. [optional] if omitted the server will use the default value of 0
- to_unit_id (int): The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List. [optional] if omitted the server will use the default value of 0
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCommodityListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ from_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List")] = None,
+ to_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCommodityListDTO]:
+ """Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param from_unit_id: The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List
+ :type from_unit_id: int
+ :param to_unit_id: The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List
+ :type to_unit_id: int
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodity_units_conversion_list_get_serialize(
+ country_code=country_code,
+ commodity_id=commodity_id,
+ from_unit_id=from_unit_id,
+ to_unit_id=to_unit_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def commodity_units_conversion_list_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ from_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List")] = None,
+ to_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param from_unit_id: The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List
+ :type from_unit_id: int
+ :param to_unit_id: The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List
+ :type to_unit_id: int
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodity_units_conversion_list_get_serialize(
+ country_code=country_code,
+ commodity_id=commodity_id,
+ from_unit_id=from_unit_id,
+ to_unit_id=to_unit_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _commodity_units_conversion_list_get_serialize(
+ self,
+ country_code,
+ commodity_id,
+ from_unit_id,
+ to_unit_id,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if from_unit_id is not None:
+
+ _query_params.append(('fromUnitID', from_unit_id))
+
+ if to_unit_id is not None:
+
+ _query_params.append(('toUnitID', to_unit_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/CommodityUnits/Conversion/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.commodity_units_conversion_list_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def commodity_units_list_get(
self,
- **kwargs
- ):
- """Provides the detailed list of the unit of measure available in DataBridges platform # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.commodity_units_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. [optional]
- commodity_unit_name (str): The name, even partial and case insensitive, of a commodity unit. [optional]
- commodity_unit_id (int): The exact ID of a commodity unit. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCommodityListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ commodity_unit_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity unit")] = None,
+ commodity_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a commodity unit")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCommodityListDTO:
+ """Provides the detailed list of the unit of measure available in DataBridges platform
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param commodity_unit_name: The name, even partial and case insensitive, of a commodity unit
+ :type commodity_unit_name: str
+ :param commodity_unit_id: The exact ID of a commodity unit
+ :type commodity_unit_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodity_units_list_get_serialize(
+ country_code=country_code,
+ commodity_unit_name=commodity_unit_name,
+ commodity_unit_id=commodity_unit_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def commodity_units_list_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ commodity_unit_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity unit")] = None,
+ commodity_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a commodity unit")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCommodityListDTO]:
+ """Provides the detailed list of the unit of measure available in DataBridges platform
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param commodity_unit_name: The name, even partial and case insensitive, of a commodity unit
+ :type commodity_unit_name: str
+ :param commodity_unit_id: The exact ID of a commodity unit
+ :type commodity_unit_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodity_units_list_get_serialize(
+ country_code=country_code,
+ commodity_unit_name=commodity_unit_name,
+ commodity_unit_id=commodity_unit_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def commodity_units_list_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ commodity_unit_name: Annotated[Optional[StrictStr], Field(description="The name, even partial and case insensitive, of a commodity unit")] = None,
+ commodity_unit_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a commodity unit")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Provides the detailed list of the unit of measure available in DataBridges platform
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param commodity_unit_name: The name, even partial and case insensitive, of a commodity unit
+ :type commodity_unit_name: str
+ :param commodity_unit_id: The exact ID of a commodity unit
+ :type commodity_unit_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._commodity_units_list_get_serialize(
+ country_code=country_code,
+ commodity_unit_name=commodity_unit_name,
+ commodity_unit_id=commodity_unit_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.commodity_units_list_get_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _commodity_units_list_get_serialize(
+ self,
+ country_code,
+ commodity_unit_name,
+ commodity_unit_id,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if commodity_unit_name is not None:
+
+ _query_params.append(('commodityUnitName', commodity_unit_name))
+
+ if commodity_unit_id is not None:
+
+ _query_params.append(('commodityUnitID', commodity_unit_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/CommodityUnits/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/currency_api.py b/data_bridges_client/api/currency_api.py
index 41ae6d8..a878144 100644
--- a/data_bridges_client/api/currency_api.py
+++ b/data_bridges_client/api/currency_api.py
@@ -1,357 +1,734 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import io
+import warnings
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_currency_list_dto import PagedCurrencyListDTO
-from data_bridges_client.model.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictInt, StrictStr, field_validator
-class CurrencyApi(object):
+from typing import Optional
+
+from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO
+from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class CurrencyApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.currency_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCurrencyListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Currency/List',
- 'operation_id': 'currency_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'currency_name',
- 'currency_id',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'currency_name':
- (str,),
- 'currency_id':
- (int,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'currency_name': 'currencyName',
- 'currency_id': 'currencyID',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'currency_name': 'query',
- 'currency_id': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def currency_list_get(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ currency_name: Annotated[Optional[StrictStr], Field(description="Currency 3-letter code, matching with ISO 4217.")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="Unique code to identify the currency in internal VAM currencies.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCurrencyListDTO:
+ """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param currency_name: Currency 3-letter code, matching with ISO 4217.
+ :type currency_name: str
+ :param currency_id: Unique code to identify the currency in internal VAM currencies.
+ :type currency_id: int
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._currency_list_get_serialize(
+ country_code=country_code,
+ currency_name=currency_name,
+ currency_id=currency_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.currency_usd_indirect_quotation_get_endpoint = _Endpoint(
- settings={
- 'response_type': (UsdIndirectQuotationPagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Currency/UsdIndirectQuotation',
- 'operation_id': 'currency_usd_indirect_quotation_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_iso3',
- 'currency_name',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_iso3':
- (str,),
- 'currency_name':
- (str,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_iso3': 'countryIso3',
- 'currency_name': 'currencyName',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_iso3': 'query',
- 'currency_name': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCurrencyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def currency_list_get(
+
+ @validate_call
+ def currency_list_get_with_http_info(
self,
- **kwargs
- ):
- """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.currency_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- currency_name (str): Currency 3-letter code, matching with ISO 4217.. [optional]
- currency_id (int): Unique code to identify the currency in internal VAM currencies.. [optional] if omitted the server will use the default value of 0
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCurrencyListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ currency_name: Annotated[Optional[StrictStr], Field(description="Currency 3-letter code, matching with ISO 4217.")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="Unique code to identify the currency in internal VAM currencies.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCurrencyListDTO]:
+ """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param currency_name: Currency 3-letter code, matching with ISO 4217.
+ :type currency_name: str
+ :param currency_id: Unique code to identify the currency in internal VAM currencies.
+ :type currency_id: int
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._currency_list_get_serialize(
+ country_code=country_code,
+ currency_name=currency_name,
+ currency_id=currency_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCurrencyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def currency_list_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ currency_name: Annotated[Optional[StrictStr], Field(description="Currency 3-letter code, matching with ISO 4217.")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="Unique code to identify the currency in internal VAM currencies.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param currency_name: Currency 3-letter code, matching with ISO 4217.
+ :type currency_name: str
+ :param currency_id: Unique code to identify the currency in internal VAM currencies.
+ :type currency_id: int
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._currency_list_get_serialize(
+ country_code=country_code,
+ currency_name=currency_name,
+ currency_id=currency_id,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCurrencyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _currency_list_get_serialize(
+ self,
+ country_code,
+ currency_name,
+ currency_id,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if currency_name is not None:
+
+ _query_params.append(('currencyName', currency_name))
+
+ if currency_id is not None:
+
+ _query_params.append(('currencyID', currency_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Currency/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.currency_list_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def currency_usd_indirect_quotation_get(
self,
- **kwargs
- ):
- """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.currency_usd_indirect_quotation_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_iso3 (str): The code to identify the country. Must be a ISO-3166 Alpha 3 code.. [optional] if omitted the server will use the default value of ""
- currency_name (str): the ISO3 code for the currency, based on ISO4217. [optional] if omitted the server will use the default value of ""
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- UsdIndirectQuotationPagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ currency_name: Annotated[Optional[StrictStr], Field(description="the ISO3 code for the currency, based on ISO4217")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> UsdIndirectQuotationPagedResult:
+ """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type country_iso3: str
+ :param currency_name: the ISO3 code for the currency, based on ISO4217
+ :type currency_name: str
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._currency_usd_indirect_quotation_get_serialize(
+ country_iso3=country_iso3,
+ currency_name=currency_name,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UsdIndirectQuotationPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def currency_usd_indirect_quotation_get_with_http_info(
+ self,
+ country_iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ currency_name: Annotated[Optional[StrictStr], Field(description="the ISO3 code for the currency, based on ISO4217")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[UsdIndirectQuotationPagedResult]:
+ """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type country_iso3: str
+ :param currency_name: the ISO3 code for the currency, based on ISO4217
+ :type currency_name: str
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._currency_usd_indirect_quotation_get_serialize(
+ country_iso3=country_iso3,
+ currency_name=currency_name,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UsdIndirectQuotationPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def currency_usd_indirect_quotation_get_without_preload_content(
+ self,
+ country_iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ currency_name: Annotated[Optional[StrictStr], Field(description="the ISO3 code for the currency, based on ISO4217")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type country_iso3: str
+ :param currency_name: the ISO3 code for the currency, based on ISO4217
+ :type currency_name: str
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._currency_usd_indirect_quotation_get_serialize(
+ country_iso3=country_iso3,
+ currency_name=currency_name,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "UsdIndirectQuotationPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.currency_usd_indirect_quotation_get_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _currency_usd_indirect_quotation_get_serialize(
+ self,
+ country_iso3,
+ currency_name,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_iso3 is not None:
+
+ _query_params.append(('countryIso3', country_iso3))
+
+ if currency_name is not None:
+
+ _query_params.append(('currencyName', currency_name))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Currency/UsdIndirectQuotation',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/economic_data_api.py b/data_bridges_client/api/economic_data_api.py
index 0446edf..6f323f9 100644
--- a/data_bridges_client/api/economic_data_api.py
+++ b/data_bridges_client/api/economic_data_api.py
@@ -1,368 +1,772 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-import re # noqa: F401
-import sys # noqa: F401
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
-from data_bridges_client.model.problem_details import ProblemDetails
+from pydantic import Field
+from typing_extensions import Annotated
+from datetime import datetime
+from pydantic import StrictInt, StrictStr, field_validator
-class EconomicDataApi(object):
+from typing import Optional
+
+from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class EconomicDataApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.economic_data_indicator_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (EconomicIndicatorPropertyPagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/EconomicData/IndicatorList',
- 'operation_id': 'economic_data_indicator_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'page',
- 'indicator_name',
- 'iso3',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'page':
- (int,),
- 'indicator_name':
- (str,),
- 'iso3':
- (str,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'page': 'page',
- 'indicator_name': 'indicatorName',
- 'iso3': 'iso3',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'page': 'query',
- 'indicator_name': 'query',
- 'iso3': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def economic_data_indicator_list_get(
+ self,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ indicator_name: Annotated[Optional[StrictStr], Field(description="Unique indicator name.")] = None,
+ iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> EconomicIndicatorPropertyPagedResult:
+ """Returns the lists of indicators.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page: Page number for paged results
+ :type page: int
+ :param indicator_name: Unique indicator name.
+ :type indicator_name: str
+ :param iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type iso3: str
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._economic_data_indicator_list_get_serialize(
+ page=page,
+ indicator_name=indicator_name,
+ iso3=iso3,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.economic_data_indicator_name_get_endpoint = _Endpoint(
- settings={
- 'response_type': (file_type,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/EconomicData/{indicatorName}',
- 'operation_id': 'economic_data_indicator_name_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'indicator_name',
- 'page',
- 'iso3',
- 'start_date',
- 'end_date',
- 'format',
- 'env',
- ],
- 'required': [
- 'indicator_name',
- ],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'indicator_name':
- (str,),
- 'page':
- (int,),
- 'iso3':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'indicator_name': 'indicatorName',
- 'page': 'page',
- 'iso3': 'iso3',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'indicator_name': 'path',
- 'page': 'query',
- 'iso3': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EconomicIndicatorPropertyPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def economic_data_indicator_list_get(
+
+ @validate_call
+ def economic_data_indicator_list_get_with_http_info(
self,
- **kwargs
- ):
- """Returns the lists of indicators. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.economic_data_indicator_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- indicator_name (str): Unique indicator name.. [optional] if omitted the server will use the default value of ""
- iso3 (str): The code to identify the country. Must be a ISO-3166 Alpha 3 code.. [optional] if omitted the server will use the default value of ""
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- EconomicIndicatorPropertyPagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ indicator_name: Annotated[Optional[StrictStr], Field(description="Unique indicator name.")] = None,
+ iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[EconomicIndicatorPropertyPagedResult]:
+ """Returns the lists of indicators.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page: Page number for paged results
+ :type page: int
+ :param indicator_name: Unique indicator name.
+ :type indicator_name: str
+ :param iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type iso3: str
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._economic_data_indicator_list_get_serialize(
+ page=page,
+ indicator_name=indicator_name,
+ iso3=iso3,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EconomicIndicatorPropertyPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def economic_data_indicator_list_get_without_preload_content(
+ self,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ indicator_name: Annotated[Optional[StrictStr], Field(description="Unique indicator name.")] = None,
+ iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns the lists of indicators.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page: Page number for paged results
+ :type page: int
+ :param indicator_name: Unique indicator name.
+ :type indicator_name: str
+ :param iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type iso3: str
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._economic_data_indicator_list_get_serialize(
+ page=page,
+ indicator_name=indicator_name,
+ iso3=iso3,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "EconomicIndicatorPropertyPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _economic_data_indicator_list_get_serialize(
+ self,
+ page,
+ indicator_name,
+ iso3,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if indicator_name is not None:
+
+ _query_params.append(('indicatorName', indicator_name))
+
+ if iso3 is not None:
+
+ _query_params.append(('iso3', iso3))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/EconomicData/IndicatorList',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.economic_data_indicator_list_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def economic_data_indicator_name_get(
self,
- indicator_name,
- **kwargs
- ):
- """Returns the time series of values for different indicators. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.economic_data_indicator_name_get(indicator_name, async_req=True)
- >>> result = thread.get()
-
- Args:
- indicator_name (str): Name of the indicator as found in /EconomicData/IndicatorList.
-
- Keyword Args:
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- iso3 (str): The code to identify the country. Must be a ISO-3166 Alpha 3 code.. [optional] if omitted the server will use the default value of ""
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- file_type
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ indicator_name: Annotated[StrictStr, Field(description="Name of the indicator as found in /EconomicData/IndicatorList.")],
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedEconomicDataDTO:
+ """Returns the time series of values for different indicators.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param indicator_name: Name of the indicator as found in /EconomicData/IndicatorList. (required)
+ :type indicator_name: str
+ :param page: Page number for paged results
+ :type page: int
+ :param iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type iso3: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._economic_data_indicator_name_get_serialize(
+ indicator_name=indicator_name,
+ page=page,
+ iso3=iso3,
+ start_date=start_date,
+ end_date=end_date,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedEconomicDataDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def economic_data_indicator_name_get_with_http_info(
+ self,
+ indicator_name: Annotated[StrictStr, Field(description="Name of the indicator as found in /EconomicData/IndicatorList.")],
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedEconomicDataDTO]:
+ """Returns the time series of values for different indicators.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param indicator_name: Name of the indicator as found in /EconomicData/IndicatorList. (required)
+ :type indicator_name: str
+ :param page: Page number for paged results
+ :type page: int
+ :param iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type iso3: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._economic_data_indicator_name_get_serialize(
+ indicator_name=indicator_name,
+ page=page,
+ iso3=iso3,
+ start_date=start_date,
+ end_date=end_date,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedEconomicDataDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def economic_data_indicator_name_get_without_preload_content(
+ self,
+ indicator_name: Annotated[StrictStr, Field(description="Name of the indicator as found in /EconomicData/IndicatorList.")],
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ iso3: Annotated[Optional[StrictStr], Field(description="The code to identify the country. Must be a ISO-3166 Alpha 3 code.")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns the time series of values for different indicators.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param indicator_name: Name of the indicator as found in /EconomicData/IndicatorList. (required)
+ :type indicator_name: str
+ :param page: Page number for paged results
+ :type page: int
+ :param iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code.
+ :type iso3: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._economic_data_indicator_name_get_serialize(
+ indicator_name=indicator_name,
+ page=page,
+ iso3=iso3,
+ start_date=start_date,
+ end_date=end_date,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedEconomicDataDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _economic_data_indicator_name_get_serialize(
+ self,
+ indicator_name,
+ page,
+ iso3,
+ start_date,
+ end_date,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ if indicator_name is not None:
+ _path_params['indicatorName'] = indicator_name
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if iso3 is not None:
+
+ _query_params.append(('iso3', iso3))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/EconomicData/{indicatorName}',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['indicator_name'] = \
- indicator_name
- return self.economic_data_indicator_name_get_endpoint.call_with_http_info(**kwargs)
+
diff --git a/data_bridges_client/api/food_security_api.py b/data_bridges_client/api/food_security_api.py
index 57ababd..3103373 100644
--- a/data_bridges_client/api/food_security_api.py
+++ b/data_bridges_client/api/food_security_api.py
@@ -1,189 +1,366 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-import re # noqa: F401
-import sys # noqa: F401
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.ipc_value_paged_result import IpcValuePagedResult
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictInt, StrictStr, field_validator
+from typing import Optional
-class FoodSecurityApi(object):
+from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class FoodSecurityApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.food_security_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (IpcValuePagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/FoodSecurity/List',
- 'operation_id': 'food_security_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'iso3',
- 'year',
- 'page',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'iso3':
- (str,),
- 'year':
- (int,),
- 'page':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'iso3': 'iso3',
- 'year': 'year',
- 'page': 'page',
- 'env': 'env',
- },
- 'location_map': {
- 'iso3': 'query',
- 'year': 'query',
- 'page': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def food_security_list_get(
self,
- **kwargs
- ):
- """food_security_list_get # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.food_security_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- iso3 (str): The country ISO3 code. [optional]
- year (int): [optional]
- page (int): [optional] if omitted the server will use the default value of 1
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- IpcValuePagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ iso3: Annotated[Optional[StrictStr], Field(description="The country ISO3 code")] = None,
+ year: Optional[StrictInt] = None,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> IpcValuePagedResult:
+ """food_security_list_get
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param iso3: The country ISO3 code
+ :type iso3: str
+ :param year:
+ :type year: int
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._food_security_list_get_serialize(
+ iso3=iso3,
+ year=year,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "IpcValuePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def food_security_list_get_with_http_info(
+ self,
+ iso3: Annotated[Optional[StrictStr], Field(description="The country ISO3 code")] = None,
+ year: Optional[StrictInt] = None,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[IpcValuePagedResult]:
+ """food_security_list_get
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param iso3: The country ISO3 code
+ :type iso3: str
+ :param year:
+ :type year: int
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._food_security_list_get_serialize(
+ iso3=iso3,
+ year=year,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "IpcValuePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def food_security_list_get_without_preload_content(
+ self,
+ iso3: Annotated[Optional[StrictStr], Field(description="The country ISO3 code")] = None,
+ year: Optional[StrictInt] = None,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """food_security_list_get
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param iso3: The country ISO3 code
+ :type iso3: str
+ :param year:
+ :type year: int
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._food_security_list_get_serialize(
+ iso3=iso3,
+ year=year,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "IpcValuePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _food_security_list_get_serialize(
+ self,
+ iso3,
+ year,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if iso3 is not None:
+
+ _query_params.append(('iso3', iso3))
+
+ if year is not None:
+
+ _query_params.append(('year', year))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/FoodSecurity/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.food_security_list_get_endpoint.call_with_http_info(**kwargs)
+
diff --git a/data_bridges_client/api/gorp_api.py b/data_bridges_client/api/gorp_api.py
index eccff14..e598cd4 100644
--- a/data_bridges_client/api/gorp_api.py
+++ b/data_bridges_client/api/gorp_api.py
@@ -1,314 +1,614 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+import io
+import warnings
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictInt, StrictStr, field_validator
-class GorpApi(object):
+from typing import Optional
+
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class GorpApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.gorp_latest_get_endpoint = _Endpoint(
- settings={
- 'response_type': (GorpValueWithChangesPagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Gorp/Latest',
- 'operation_id': 'gorp_latest_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'page',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'page':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'page': 'page',
- 'env': 'env',
- },
- 'location_map': {
- 'page': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def gorp_latest_get(
+ self,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GorpValueWithChangesPagedResult:
+ """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gorp_latest_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.gorp_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (GorpValueWithChangesPagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Gorp/List',
- 'operation_id': 'gorp_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'page',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'page':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'page': 'page',
- 'env': 'env',
- },
- 'location_map': {
- 'page': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GorpValueWithChangesPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def gorp_latest_get(
+
+ @validate_call
+ def gorp_latest_get_with_http_info(
self,
- **kwargs
- ):
- """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.gorp_latest_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- page (int): [optional] if omitted the server will use the default value of 1
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- GorpValueWithChangesPagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GorpValueWithChangesPagedResult]:
+ """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gorp_latest_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GorpValueWithChangesPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def gorp_latest_get_without_preload_content(
+ self,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gorp_latest_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GorpValueWithChangesPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _gorp_latest_get_serialize(
+ self,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Gorp/Latest',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.gorp_latest_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def gorp_list_get(
self,
- **kwargs
- ):
- """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.gorp_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- page (int): [optional] if omitted the server will use the default value of 1
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- GorpValueWithChangesPagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> GorpValueWithChangesPagedResult:
+ """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gorp_list_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GorpValueWithChangesPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def gorp_list_get_with_http_info(
+ self,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[GorpValueWithChangesPagedResult]:
+ """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gorp_list_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GorpValueWithChangesPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def gorp_list_get_without_preload_content(
+ self,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._gorp_list_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "GorpValueWithChangesPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.gorp_list_get_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _gorp_list_get_serialize(
+ self,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Gorp/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/incubation_api.py b/data_bridges_client/api/incubation_api.py
new file mode 100644
index 0000000..7d453c1
--- /dev/null
+++ b/data_bridges_client/api/incubation_api.py
@@ -0,0 +1,1627 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from datetime import datetime
+
+from pydantic import StrictInt, StrictStr, field_validator
+
+from typing import Optional
+
+from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class IncubationApi:
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None) -> None:
+ if api_client is None:
+ api_client = ApiClient.get_default()
+ self.api_client = api_client
+
+
+ @validate_call
+ def household_draft_internal_base_data_get(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-draftinternalbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_draft_internal_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def household_draft_internal_base_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-draftinternalbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_draft_internal_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def household_draft_internal_base_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-draftinternalbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_draft_internal_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _household_draft_internal_base_data_get_serialize(
+ self,
+ survey_id,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Household/DraftInternalBaseData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def household_full_data_get(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def household_full_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def household_full_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _household_full_data_get_serialize(
+ self,
+ survey_id,
+ format,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Household/FullData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def household_official_use_base_data_get(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-officialusebasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_official_use_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def household_official_use_base_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-officialusebasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_official_use_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def household_official_use_base_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-officialusebasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_official_use_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _household_official_use_base_data_get_serialize(
+ self,
+ survey_id,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Household/OfficialUseBaseData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def household_public_base_data_get(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-publicbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_public_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def household_public_base_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-publicbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_public_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def household_public_base_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-publicbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_public_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _household_public_base_data_get_serialize(
+ self,
+ survey_id,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Household/PublicBaseData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def household_surveys_get(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> HouseholdSurveyListDTOPagedResult:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "HouseholdSurveyListDTOPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def household_surveys_get_with_http_info(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[HouseholdSurveyListDTOPagedResult]:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "HouseholdSurveyListDTOPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def household_surveys_get_without_preload_content(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._household_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "HouseholdSurveyListDTOPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _household_surveys_get_serialize(
+ self,
+ adm0_code,
+ page,
+ start_date,
+ end_date,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0_code is not None:
+
+ _query_params.append(('adm0Code', adm0_code))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Household/Surveys',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
diff --git a/data_bridges_client/api/market_prices_api.py b/data_bridges_client/api/market_prices_api.py
index 41e76f1..90caf14 100644
--- a/data_bridges_client/api/market_prices_api.py
+++ b/data_bridges_client/api/market_prices_api.py
@@ -1,1028 +1,2405 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-import re # noqa: F401
-import sys # noqa: F401
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
-from data_bridges_client.model.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
-from data_bridges_client.model.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
-from data_bridges_client.model.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+from pydantic import Field
+from typing_extensions import Annotated
+from datetime import datetime
+from pydantic import StrictBool, StrictInt, StrictStr, field_validator
-class MarketPricesApi(object):
+from typing import Optional
+
+from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
+from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class MarketPricesApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.market_prices_alps_get_endpoint = _Endpoint(
- settings={
- 'response_type': (ViewExtendedAlpsValuePagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MarketPrices/Alps',
- 'operation_id': 'market_prices_alps_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'market_id',
- 'commodity_id',
- 'price_type_name',
- 'currency_id',
- 'price_flag',
- 'start_date',
- 'end_date',
- 'latest_value_only',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'market_id':
- (int,),
- 'commodity_id':
- (int,),
- 'price_type_name':
- (str,),
- 'currency_id':
- (int,),
- 'price_flag':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'latest_value_only':
- (bool,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'market_id': 'marketID',
- 'commodity_id': 'commodityID',
- 'price_type_name': 'priceTypeName',
- 'currency_id': 'currencyID',
- 'price_flag': 'priceFlag',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'latest_value_only': 'latestValueOnly',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'market_id': 'query',
- 'commodity_id': 'query',
- 'price_type_name': 'query',
- 'currency_id': 'query',
- 'price_flag': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'latest_value_only': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def market_prices_alps_get(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ViewExtendedAlpsValuePagedResult:
+ """Returns time series values of ALPS and PEWI.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_alps_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.market_prices_price_daily_get_endpoint = _Endpoint(
- settings={
- 'response_type': (ViewExtendedAggregatedPricePagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MarketPrices/PriceDaily',
- 'operation_id': 'market_prices_price_daily_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'market_id',
- 'commodity_id',
- 'price_type_name',
- 'currency_id',
- 'price_flag',
- 'start_date',
- 'end_date',
- 'latest_value_only',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'market_id':
- (int,),
- 'commodity_id':
- (int,),
- 'price_type_name':
- (str,),
- 'currency_id':
- (int,),
- 'price_flag':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'latest_value_only':
- (bool,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'market_id': 'marketID',
- 'commodity_id': 'commodityID',
- 'price_type_name': 'priceTypeName',
- 'currency_id': 'currencyID',
- 'price_flag': 'priceFlag',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'latest_value_only': 'latestValueOnly',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'market_id': 'query',
- 'commodity_id': 'query',
- 'price_type_name': 'query',
- 'currency_id': 'query',
- 'price_flag': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'latest_value_only': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAlpsValuePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- self.market_prices_price_monthly_get_endpoint = _Endpoint(
- settings={
- 'response_type': (ViewExtendedAggregatedPricePagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MarketPrices/PriceMonthly',
- 'operation_id': 'market_prices_price_monthly_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'market_id',
- 'commodity_id',
- 'price_type_name',
- 'currency_id',
- 'price_flag',
- 'start_date',
- 'end_date',
- 'latest_value_only',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'market_id':
- (int,),
- 'commodity_id':
- (int,),
- 'price_type_name':
- (str,),
- 'currency_id':
- (int,),
- 'price_flag':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'latest_value_only':
- (bool,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'market_id': 'marketID',
- 'commodity_id': 'commodityID',
- 'price_type_name': 'priceTypeName',
- 'currency_id': 'currencyID',
- 'price_flag': 'priceFlag',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'latest_value_only': 'latestValueOnly',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'market_id': 'query',
- 'commodity_id': 'query',
- 'price_type_name': 'query',
- 'currency_id': 'query',
- 'price_flag': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'latest_value_only': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def market_prices_alps_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ViewExtendedAlpsValuePagedResult]:
+ """Returns time series values of ALPS and PEWI.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_alps_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.market_prices_price_raw_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCommodityPriceListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MarketPrices/PriceRaw',
- 'operation_id': 'market_prices_price_raw_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'market_id',
- 'commodity_id',
- 'price_type_name',
- 'currency_id',
- 'price_flag',
- 'start_date',
- 'end_date',
- 'latest_value_only',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'market_id':
- (int,),
- 'commodity_id':
- (int,),
- 'price_type_name':
- (str,),
- 'currency_id':
- (int,),
- 'price_flag':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'latest_value_only':
- (bool,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'market_id': 'marketID',
- 'commodity_id': 'commodityID',
- 'price_type_name': 'priceTypeName',
- 'currency_id': 'currencyID',
- 'price_flag': 'priceFlag',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'latest_value_only': 'latestValueOnly',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'market_id': 'query',
- 'commodity_id': 'query',
- 'price_type_name': 'query',
- 'currency_id': 'query',
- 'price_flag': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'latest_value_only': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAlpsValuePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- self.market_prices_price_weekly_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedCommodityWeeklyAggregatedPriceListDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MarketPrices/PriceWeekly',
- 'operation_id': 'market_prices_price_weekly_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'market_id',
- 'commodity_id',
- 'price_type_name',
- 'currency_id',
- 'price_flag',
- 'start_date',
- 'end_date',
- 'latest_value_only',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'market_id':
- (int,),
- 'commodity_id':
- (int,),
- 'price_type_name':
- (str,),
- 'currency_id':
- (int,),
- 'price_flag':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'latest_value_only':
- (bool,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'market_id': 'marketID',
- 'commodity_id': 'commodityID',
- 'price_type_name': 'priceTypeName',
- 'currency_id': 'currencyID',
- 'price_flag': 'priceFlag',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'latest_value_only': 'latestValueOnly',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'market_id': 'query',
- 'commodity_id': 'query',
- 'price_type_name': 'query',
- 'currency_id': 'query',
- 'price_flag': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'latest_value_only': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- def market_prices_alps_get(
+
+ @validate_call
+ def market_prices_alps_get_without_preload_content(
self,
- **kwargs
- ):
- """Returns time series values of ALPS and PEWI. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.market_prices_alps_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- market_id (int): Unique ID of a Market, as found in /Markets/GeoJSONList. [optional] if omitted the server will use the default value of 0
- commodity_id (int): The exact ID of a Commodity, as found in /Commodities/List. [optional] if omitted the server will use the default value of 0
- price_type_name (str): Price type: [retail|wholesale|farmgate]. [optional] if omitted the server will use the default value of ""
- currency_id (int): The exact ID of a currency, as found in /Currency/List. [optional] if omitted the server will use the default value of 0
- price_flag (str): Type of price data: [actual|aggregate|estimated|forecasted]. [optional] if omitted the server will use the default value of ""
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- latest_value_only (bool): [TRUE|FALSE]. [optional] if omitted the server will use the default value of False
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- ViewExtendedAlpsValuePagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns time series values of ALPS and PEWI.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_alps_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAlpsValuePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+ return response_data.response
+
+
+ def _market_prices_alps_get_serialize(
+ self,
+ country_code,
+ market_id,
+ commodity_id,
+ price_type_name,
+ currency_id,
+ price_flag,
+ start_date,
+ end_date,
+ latest_value_only,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if market_id is not None:
+
+ _query_params.append(('marketID', market_id))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if price_type_name is not None:
+
+ _query_params.append(('priceTypeName', price_type_name))
+
+ if currency_id is not None:
+
+ _query_params.append(('currencyID', currency_id))
+
+ if price_flag is not None:
+
+ _query_params.append(('priceFlag', price_flag))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if latest_value_only is not None:
+
+ _query_params.append(('latestValueOnly', latest_value_only))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MarketPrices/Alps',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+
+
+ @validate_call
+ def market_prices_price_daily_get(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ViewExtendedAggregatedPricePagedResult:
+ """Returns a daily time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_daily_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAggregatedPricePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.market_prices_alps_get_endpoint.call_with_http_info(**kwargs)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def market_prices_price_daily_get(
+
+ @validate_call
+ def market_prices_price_daily_get_with_http_info(
self,
- **kwargs
- ):
- """Returns a daily time series of commodity market prices. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.market_prices_price_daily_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- market_id (int): Unique ID of a Market, as found in /Markets/GeoJSONList. [optional] if omitted the server will use the default value of 0
- commodity_id (int): The exact ID of a Commodity, as found in /Commodities/List. [optional] if omitted the server will use the default value of 0
- price_type_name (str): Price type: [retail|wholesale|farmgate]. [optional] if omitted the server will use the default value of ""
- currency_id (int): The exact ID of a currency, as found in /Currency/List. [optional] if omitted the server will use the default value of 0
- price_flag (str): Type of price data: [actual|aggregate|estimated|forecasted]. [optional] if omitted the server will use the default value of ""
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- latest_value_only (bool): [TRUE|FALSE]. [optional] if omitted the server will use the default value of False
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- ViewExtendedAggregatedPricePagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ViewExtendedAggregatedPricePagedResult]:
+ """Returns a daily time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_daily_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAggregatedPricePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def market_prices_price_daily_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns a daily time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_daily_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAggregatedPricePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _market_prices_price_daily_get_serialize(
+ self,
+ country_code,
+ market_id,
+ commodity_id,
+ price_type_name,
+ currency_id,
+ price_flag,
+ start_date,
+ end_date,
+ latest_value_only,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if market_id is not None:
+
+ _query_params.append(('marketID', market_id))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if price_type_name is not None:
+
+ _query_params.append(('priceTypeName', price_type_name))
+
+ if currency_id is not None:
+
+ _query_params.append(('currencyID', currency_id))
+
+ if price_flag is not None:
+
+ _query_params.append(('priceFlag', price_flag))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if latest_value_only is not None:
+
+ _query_params.append(('latestValueOnly', latest_value_only))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MarketPrices/PriceDaily',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.market_prices_price_daily_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def market_prices_price_monthly_get(
self,
- **kwargs
- ):
- """Returns a monthly time series of commodity market prices. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.market_prices_price_monthly_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- market_id (int): Unique ID of a Market, as found in /Markets/GeoJSONList. [optional] if omitted the server will use the default value of 0
- commodity_id (int): The exact ID of a Commodity, as found in /Commodities/List. [optional] if omitted the server will use the default value of 0
- price_type_name (str): Price type: [retail|wholesale|farmgate]. [optional] if omitted the server will use the default value of ""
- currency_id (int): The exact ID of a currency, as found in /Currency/List. [optional] if omitted the server will use the default value of 0
- price_flag (str): Type of price data: [actual|aggregate|estimated|forecasted]. [optional] if omitted the server will use the default value of ""
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- latest_value_only (bool): [TRUE|FALSE]. [optional] if omitted the server will use the default value of False
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- ViewExtendedAggregatedPricePagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ViewExtendedAggregatedPricePagedResult:
+ """Returns a monthly time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_monthly_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAggregatedPricePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def market_prices_price_monthly_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[ViewExtendedAggregatedPricePagedResult]:
+ """Returns a monthly time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_monthly_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAggregatedPricePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def market_prices_price_monthly_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns a monthly time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_monthly_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ViewExtendedAggregatedPricePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.market_prices_price_monthly_get_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _market_prices_price_monthly_get_serialize(
+ self,
+ country_code,
+ market_id,
+ commodity_id,
+ price_type_name,
+ currency_id,
+ price_flag,
+ start_date,
+ end_date,
+ latest_value_only,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if market_id is not None:
+
+ _query_params.append(('marketID', market_id))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if price_type_name is not None:
+
+ _query_params.append(('priceTypeName', price_type_name))
+
+ if currency_id is not None:
+
+ _query_params.append(('currencyID', currency_id))
+
+ if price_flag is not None:
+
+ _query_params.append(('priceFlag', price_flag))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if latest_value_only is not None:
+
+ _query_params.append(('latestValueOnly', latest_value_only))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MarketPrices/PriceMonthly',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+ @validate_call
def market_prices_price_raw_get(
self,
- **kwargs
- ):
- """Returns original commodity market prices # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceraw_get\" Restricted endpoint. Returns the original data with the entire Commodity Price Metadata as inserted by the focal point, which might contain sensitive or personal informatio. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.market_prices_price_raw_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- market_id (int): Unique ID of a Market, as found in /Markets/GeoJSONList. [optional] if omitted the server will use the default value of 0
- commodity_id (int): The exact ID of a Commodity, as found in /Commodities/List. [optional] if omitted the server will use the default value of 0
- price_type_name (str): Price type: [retail|wholesale|farmgate]. [optional] if omitted the server will use the default value of ""
- currency_id (int): The exact ID of a currency, as found in /Currency/List. [optional] if omitted the server will use the default value of 0
- price_flag (str): Type of price data: [actual|aggregate|estimated|forecasted]. [optional] if omitted the server will use the default value of ""
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- latest_value_only (bool): [TRUE|FALSE]. [optional] if omitted the server will use the default value of False
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCommodityPriceListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCommodityPriceListDTO:
+ """Returns original commodity market prices
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceraw_get\" Restricted endpoint. Returns the original data with the entire Commodity Price Metadata as inserted by the focal point, which might contain sensitive or personal informatio. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_raw_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityPriceListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def market_prices_price_raw_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCommodityPriceListDTO]:
+ """Returns original commodity market prices
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceraw_get\" Restricted endpoint. Returns the original data with the entire Commodity Price Metadata as inserted by the focal point, which might contain sensitive or personal informatio. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_raw_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityPriceListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def market_prices_price_raw_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns original commodity market prices
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceraw_get\" Restricted endpoint. Returns the original data with the entire Commodity Price Metadata as inserted by the focal point, which might contain sensitive or personal informatio. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_raw_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityPriceListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _market_prices_price_raw_get_serialize(
+ self,
+ country_code,
+ market_id,
+ commodity_id,
+ price_type_name,
+ currency_id,
+ price_flag,
+ start_date,
+ end_date,
+ latest_value_only,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if market_id is not None:
+
+ _query_params.append(('marketID', market_id))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if price_type_name is not None:
+
+ _query_params.append(('priceTypeName', price_type_name))
+
+ if currency_id is not None:
+
+ _query_params.append(('currencyID', currency_id))
+
+ if price_flag is not None:
+
+ _query_params.append(('priceFlag', price_flag))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if latest_value_only is not None:
+
+ _query_params.append(('latestValueOnly', latest_value_only))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MarketPrices/PriceRaw',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.market_prices_price_raw_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def market_prices_price_weekly_get(
self,
- **kwargs
- ):
- """Returns a weekly time series of commodity market prices. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.market_prices_price_weekly_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.. [optional]
- market_id (int): Unique ID of a Market, as found in /Markets/GeoJSONList. [optional] if omitted the server will use the default value of 0
- commodity_id (int): The exact ID of a Commodity, as found in /Commodities/List. [optional] if omitted the server will use the default value of 0
- price_type_name (str): Price type: [retail|wholesale|farmgate]. [optional] if omitted the server will use the default value of ""
- currency_id (int): The exact ID of a currency, as found in /Currency/List. [optional] if omitted the server will use the default value of 0
- price_flag (str): Type of price data: [actual|aggregate|estimated|forecasted]. [optional] if omitted the server will use the default value of ""
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24). [optional]
- latest_value_only (bool): [TRUE|FALSE]. [optional] if omitted the server will use the default value of False
- page (int): Page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedCommodityWeeklyAggregatedPriceListDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedCommodityWeeklyAggregatedPriceListDTO:
+ """Returns a weekly time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_weekly_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityWeeklyAggregatedPriceListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def market_prices_price_weekly_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedCommodityWeeklyAggregatedPriceListDTO]:
+ """Returns a weekly time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_weekly_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityWeeklyAggregatedPriceListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def market_prices_price_weekly_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="Unique ID of a Market, as found in /Markets/GeoJSONList")] = None,
+ commodity_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a Commodity, as found in /Commodities/List")] = None,
+ price_type_name: Annotated[Optional[StrictStr], Field(description="Price type: [retail|wholesale|farmgate]")] = None,
+ currency_id: Annotated[Optional[StrictInt], Field(description="The exact ID of a currency, as found in /Currency/List")] = None,
+ price_flag: Annotated[Optional[StrictStr], Field(description="Type of price data: [actual|aggregate|estimated|forecasted]")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)")] = None,
+ latest_value_only: Annotated[Optional[StrictBool], Field(description="[TRUE|FALSE]")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="Page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Returns a weekly time series of commodity market prices.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code.
+ :type country_code: str
+ :param market_id: Unique ID of a Market, as found in /Markets/GeoJSONList
+ :type market_id: int
+ :param commodity_id: The exact ID of a Commodity, as found in /Commodities/List
+ :type commodity_id: int
+ :param price_type_name: Price type: [retail|wholesale|farmgate]
+ :type price_type_name: str
+ :param currency_id: The exact ID of a currency, as found in /Currency/List
+ :type currency_id: int
+ :param price_flag: Type of price data: [actual|aggregate|estimated|forecasted]
+ :type price_flag: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param latest_value_only: [TRUE|FALSE]
+ :type latest_value_only: bool
+ :param page: Page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._market_prices_price_weekly_get_serialize(
+ country_code=country_code,
+ market_id=market_id,
+ commodity_id=commodity_id,
+ price_type_name=price_type_name,
+ currency_id=currency_id,
+ price_flag=price_flag,
+ start_date=start_date,
+ end_date=end_date,
+ latest_value_only=latest_value_only,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedCommodityWeeklyAggregatedPriceListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _market_prices_price_weekly_get_serialize(
+ self,
+ country_code,
+ market_id,
+ commodity_id,
+ price_type_name,
+ currency_id,
+ price_flag,
+ start_date,
+ end_date,
+ latest_value_only,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if market_id is not None:
+
+ _query_params.append(('marketID', market_id))
+
+ if commodity_id is not None:
+
+ _query_params.append(('commodityID', commodity_id))
+
+ if price_type_name is not None:
+
+ _query_params.append(('priceTypeName', price_type_name))
+
+ if currency_id is not None:
+
+ _query_params.append(('currencyID', currency_id))
+
+ if price_flag is not None:
+
+ _query_params.append(('priceFlag', price_flag))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if latest_value_only is not None:
+
+ _query_params.append(('latestValueOnly', latest_value_only))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MarketPrices/PriceWeekly',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.market_prices_price_weekly_get_endpoint.call_with_http_info(**kwargs)
+
diff --git a/data_bridges_client/api/markets_api.py b/data_bridges_client/api/markets_api.py
index b610cb1..4d0138b 100644
--- a/data_bridges_client/api/markets_api.py
+++ b/data_bridges_client/api/markets_api.py
@@ -1,615 +1,1255 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-import re # noqa: F401
-import sys # noqa: F401
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.i_feature import IFeature
-from data_bridges_client.model.nearby_markets_dto import NearbyMarketsDTO
+from pydantic import Field
+from typing_extensions import Annotated
+from pydantic import StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
+from typing import List, Optional, Union
-class MarketsApi(object):
+from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot
+from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO
+from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class MarketsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.markets_geo_json_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([IFeature],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Markets/GeoJSONList',
- 'operation_id': 'markets_geo_json_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0code',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0code':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0code': 'adm0code',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0code': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/geo+json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.markets_list_get_endpoint = _Endpoint(
- settings={
- 'response_type': (file_type,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Markets/List',
- 'operation_id': 'markets_list_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'country_code',
- 'page',
- 'format',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'country_code':
- (str,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'country_code': 'countryCode',
- 'page': 'page',
- 'format': 'format',
- 'env': 'env',
- },
- 'location_map': {
- 'country_code': 'query',
- 'page': 'query',
- 'format': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.markets_markets_as_csv_get_endpoint = _Endpoint(
- settings={
- 'response_type': (file_type,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Markets/MarketsAsCSV',
- 'operation_id': 'markets_markets_as_csv_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0code',
- 'local_names',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0code':
- (int,),
- 'local_names':
- (bool,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0code': 'adm0code',
- 'local_names': 'localNames',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0code': 'query',
- 'local_names': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.markets_nearby_markets_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([NearbyMarketsDTO],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Markets/NearbyMarkets',
- 'operation_id': 'markets_nearby_markets_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0code',
- 'lat',
- 'lng',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0code':
- (int,),
- 'lat':
- (float,),
- 'lng':
- (float,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0code': 'adm0code',
- 'lat': 'lat',
- 'lng': 'lng',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0code': 'query',
- 'lat': 'query',
- 'lng': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def markets_geo_json_list_get(
self,
- **kwargs
- ):
- """Provide a list of geo referenced markets in a specific country # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.markets_geo_json_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0code (int): The admin code of the country. [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [IFeature]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.markets_geo_json_list_get_endpoint.call_with_http_info(**kwargs)
+ adm0code: Annotated[Optional[StrictInt], Field(description="The admin code of the country")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> MarketGeoJsonRoot:
+ """Provide a list of geo referenced markets in a specific country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+ :param adm0code: The admin code of the country
+ :type adm0code: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_geo_json_list_get_serialize(
+ adm0code=adm0code,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MarketGeoJsonRoot",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def markets_geo_json_list_get_with_http_info(
+ self,
+ adm0code: Annotated[Optional[StrictInt], Field(description="The admin code of the country")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[MarketGeoJsonRoot]:
+ """Provide a list of geo referenced markets in a specific country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: The admin code of the country
+ :type adm0code: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_geo_json_list_get_serialize(
+ adm0code=adm0code,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MarketGeoJsonRoot",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def markets_geo_json_list_get_without_preload_content(
+ self,
+ adm0code: Annotated[Optional[StrictInt], Field(description="The admin code of the country")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Provide a list of geo referenced markets in a specific country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: The admin code of the country
+ :type adm0code: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_geo_json_list_get_serialize(
+ adm0code=adm0code,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "MarketGeoJsonRoot",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _markets_geo_json_list_get_serialize(
+ self,
+ adm0code,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0code is not None:
+
+ _query_params.append(('adm0code', adm0code))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/geo+json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Markets/GeoJSONList',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def markets_list_get(
self,
- **kwargs
- ):
- """Get a complete list of markets in a country # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.markets_list_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- country_code (str): The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. [optional]
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- file_type
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.markets_list_get_endpoint.call_with_http_info(**kwargs)
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedMarketListDTO:
+ """Get a complete list of markets in a country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_list_get_serialize(
+ country_code=country_code,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedMarketListDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def markets_list_get_with_http_info(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedMarketListDTO]:
+ """Get a complete list of markets in a country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_list_get_serialize(
+ country_code=country_code,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedMarketListDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def markets_list_get_without_preload_content(
+ self,
+ country_code: Annotated[Optional[StrictStr], Field(description="The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a complete list of markets in a country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code
+ :type country_code: str
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_list_get_serialize(
+ country_code=country_code,
+ page=page,
+ format=format,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedMarketListDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _markets_list_get_serialize(
+ self,
+ country_code,
+ page,
+ format,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if country_code is not None:
+
+ _query_params.append(('countryCode', country_code))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Markets/List',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def markets_markets_as_csv_get(
self,
- **kwargs
- ):
- """Get a complete list of markets in a country # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.markets_markets_as_csv_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0code (int): The admin code of the country. [optional]
- local_names (bool): If true the name of markets and regions will be localized if available. [optional] if omitted the server will use the default value of False
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- file_type
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.markets_markets_as_csv_get_endpoint.call_with_http_info(**kwargs)
+ adm0code: Annotated[Optional[StrictInt], Field(description="The admin code of the country")] = None,
+ local_names: Annotated[Optional[StrictBool], Field(description="If true the name of markets and regions will be localized if available")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> bytearray:
+ """Get a complete list of markets in a country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: The admin code of the country
+ :type adm0code: int
+ :param local_names: If true the name of markets and regions will be localized if available
+ :type local_names: bool
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_markets_as_csv_get_serialize(
+ adm0code=adm0code,
+ local_names=local_names,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "bytearray",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def markets_markets_as_csv_get_with_http_info(
+ self,
+ adm0code: Annotated[Optional[StrictInt], Field(description="The admin code of the country")] = None,
+ local_names: Annotated[Optional[StrictBool], Field(description="If true the name of markets and regions will be localized if available")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[bytearray]:
+ """Get a complete list of markets in a country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: The admin code of the country
+ :type adm0code: int
+ :param local_names: If true the name of markets and regions will be localized if available
+ :type local_names: bool
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_markets_as_csv_get_serialize(
+ adm0code=adm0code,
+ local_names=local_names,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "bytearray",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def markets_markets_as_csv_get_without_preload_content(
+ self,
+ adm0code: Annotated[Optional[StrictInt], Field(description="The admin code of the country")] = None,
+ local_names: Annotated[Optional[StrictBool], Field(description="If true the name of markets and regions will be localized if available")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a complete list of markets in a country
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: The admin code of the country
+ :type adm0code: int
+ :param local_names: If true the name of markets and regions will be localized if available
+ :type local_names: bool
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_markets_as_csv_get_serialize(
+ adm0code=adm0code,
+ local_names=local_names,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "bytearray",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _markets_markets_as_csv_get_serialize(
+ self,
+ adm0code,
+ local_names,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0code is not None:
+
+ _query_params.append(('adm0code', adm0code))
+
+ if local_names is not None:
+
+ _query_params.append(('localNames', local_names))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Markets/MarketsAsCSV',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+ @validate_call
def markets_nearby_markets_get(
self,
- **kwargs
- ):
- """Find markets near a given location by longitude and latitude within a 15Km distance # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.markets_nearby_markets_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0code (int): code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional]
- lat (float): latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal. [optional]
- lng (float): longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal. [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [NearbyMarketsDTO]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.markets_nearby_markets_get_endpoint.call_with_http_info(**kwargs)
+ adm0code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal")] = None,
+ lng: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[NearbyMarketsDTO]:
+ """Find markets near a given location by longitude and latitude within a 15Km distance
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0code: int
+ :param lat: latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal
+ :type lat: float
+ :param lng: longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal
+ :type lng: float
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_nearby_markets_get_serialize(
+ adm0code=adm0code,
+ lat=lat,
+ lng=lng,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[NearbyMarketsDTO]",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def markets_nearby_markets_get_with_http_info(
+ self,
+ adm0code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal")] = None,
+ lng: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[NearbyMarketsDTO]]:
+ """Find markets near a given location by longitude and latitude within a 15Km distance
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0code: int
+ :param lat: latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal
+ :type lat: float
+ :param lng: longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal
+ :type lng: float
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_nearby_markets_get_serialize(
+ adm0code=adm0code,
+ lat=lat,
+ lng=lng,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[NearbyMarketsDTO]",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def markets_nearby_markets_get_without_preload_content(
+ self,
+ adm0code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ lat: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal")] = None,
+ lng: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Find markets near a given location by longitude and latitude within a 15Km distance
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0code: int
+ :param lat: latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal
+ :type lat: float
+ :param lng: longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal
+ :type lng: float
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._markets_nearby_markets_get_serialize(
+ adm0code=adm0code,
+ lat=lat,
+ lng=lng,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[NearbyMarketsDTO]",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _markets_nearby_markets_get_serialize(
+ self,
+ adm0code,
+ lat,
+ lng,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0code is not None:
+
+ _query_params.append(('adm0code', adm0code))
+
+ if lat is not None:
+
+ _query_params.append(('lat', lat))
+
+ if lng is not None:
+
+ _query_params.append(('lng', lng))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Markets/NearbyMarkets',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/rpme_api.py b/data_bridges_client/api/rpme_api.py
index 1321d15..aeca625 100644
--- a/data_bridges_client/api/rpme_api.py
+++ b/data_bridges_client/api/rpme_api.py
@@ -1,655 +1,2026 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from datetime import datetime
+from pydantic import StrictInt, StrictStr, field_validator
-import re # noqa: F401
-import sys # noqa: F401
+from typing import Optional
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_survey_list_dto import PagedSurveyListDTO
-from data_bridges_client.model.paged_xls_form_list_dto import PagedXlsFormListDTO
-from data_bridges_client.model.rpme_assessment_paged_result import RpmeAssessmentPagedResult
-from data_bridges_client.model.rpme_variable_paged_result import RpmeVariablePagedResult
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
-class RpmeApi(object):
+
+class RpmeApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.rpme_output_values_get_endpoint = _Endpoint(
- settings={
- 'response_type': (RpmeAssessmentPagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Rpme/OutputValues',
- 'operation_id': 'rpme_output_values_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'page',
- 'adm0_code',
- 'survey_id',
- 'shop_id',
- 'market_id',
- 'adm0_code_dots',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'page':
- (int,),
- 'adm0_code':
- (int,),
- 'survey_id':
- (int,),
- 'shop_id':
- (int,),
- 'market_id':
- (int,),
- 'adm0_code_dots':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'page': 'page',
- 'adm0_code': 'adm0Code',
- 'survey_id': 'surveyId',
- 'shop_id': 'shopId',
- 'market_id': 'marketId',
- 'adm0_code_dots': 'adm0CodeDots',
- 'env': 'env',
- },
- 'location_map': {
- 'page': 'query',
- 'adm0_code': 'query',
- 'survey_id': 'query',
- 'shop_id': 'query',
- 'market_id': 'query',
- 'adm0_code_dots': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.rpme_surveys_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([PagedSurveyListDTO],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Rpme/Surveys',
- 'operation_id': 'rpme_surveys_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0_code',
- 'page',
- 'start_date',
- 'end_date',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0_code':
- (int,),
- 'page':
- (int,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0_code': 'adm0Code',
- 'page': 'page',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0_code': 'query',
- 'page': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.rpme_variables_get_endpoint = _Endpoint(
- settings={
- 'response_type': (RpmeVariablePagedResult,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Rpme/Variables',
- 'operation_id': 'rpme_variables_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'page',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'page':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'page': 'page',
- 'env': 'env',
- },
- 'location_map': {
- 'page': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.rpme_xls_forms_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([PagedXlsFormListDTO],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/Rpme/XLSForms',
- 'operation_id': 'rpme_xls_forms_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0_code',
- 'page',
- 'start_date',
- 'end_date',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0_code':
- (int,),
- 'page':
- (int,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0_code': 'adm0Code',
- 'page': 'page',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0_code': 'query',
- 'page': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def rpme_base_data_get(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get data that includes the core RPME fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def rpme_base_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get data that includes the core RPME fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def rpme_base_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get data that includes the core RPME fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _rpme_base_data_get_serialize(
+ self,
+ survey_id,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Rpme/BaseData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
+ def rpme_full_data_get(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def rpme_full_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def rpme_full_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _rpme_full_data_get_serialize(
+ self,
+ survey_id,
+ format,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Rpme/FullData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def rpme_output_values_get(
self,
- **kwargs
- ):
- """Processed values for each variable used in the assessments # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.rpme_output_values_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- adm0_code (int): Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional]
- survey_id (int): The ID of the survey. [optional]
- shop_id (int): The ID of the shop. [optional]
- market_id (int): The ID of the market. [optional]
- adm0_code_dots (str): [optional] if omitted the server will use the default value of ""
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- RpmeAssessmentPagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.rpme_output_values_get_endpoint.call_with_http_info(**kwargs)
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None,
+ shop_id: Annotated[Optional[StrictInt], Field(description="The ID of the shop")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="The ID of the market")] = None,
+ adm0_code_dots: Optional[StrictStr] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RpmeAssessmentPagedResult:
+ """Processed values for each variable used in the assessments
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page: page number for paged results
+ :type page: int
+ :param adm0_code: Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param survey_id: The ID of the survey
+ :type survey_id: int
+ :param shop_id: The ID of the shop
+ :type shop_id: int
+ :param market_id: The ID of the market
+ :type market_id: int
+ :param adm0_code_dots:
+ :type adm0_code_dots: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_output_values_get_serialize(
+ page=page,
+ adm0_code=adm0_code,
+ survey_id=survey_id,
+ shop_id=shop_id,
+ market_id=market_id,
+ adm0_code_dots=adm0_code_dots,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RpmeAssessmentPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def rpme_output_values_get_with_http_info(
+ self,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None,
+ shop_id: Annotated[Optional[StrictInt], Field(description="The ID of the shop")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="The ID of the market")] = None,
+ adm0_code_dots: Optional[StrictStr] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RpmeAssessmentPagedResult]:
+ """Processed values for each variable used in the assessments
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page: page number for paged results
+ :type page: int
+ :param adm0_code: Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param survey_id: The ID of the survey
+ :type survey_id: int
+ :param shop_id: The ID of the shop
+ :type shop_id: int
+ :param market_id: The ID of the market
+ :type market_id: int
+ :param adm0_code_dots:
+ :type adm0_code_dots: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_output_values_get_serialize(
+ page=page,
+ adm0_code=adm0_code,
+ survey_id=survey_id,
+ shop_id=shop_id,
+ market_id=market_id,
+ adm0_code_dots=adm0_code_dots,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RpmeAssessmentPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def rpme_output_values_get_without_preload_content(
+ self,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None,
+ shop_id: Annotated[Optional[StrictInt], Field(description="The ID of the shop")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="The ID of the market")] = None,
+ adm0_code_dots: Optional[StrictStr] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Processed values for each variable used in the assessments
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page: page number for paged results
+ :type page: int
+ :param adm0_code: Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param survey_id: The ID of the survey
+ :type survey_id: int
+ :param shop_id: The ID of the shop
+ :type shop_id: int
+ :param market_id: The ID of the market
+ :type market_id: int
+ :param adm0_code_dots:
+ :type adm0_code_dots: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_output_values_get_serialize(
+ page=page,
+ adm0_code=adm0_code,
+ survey_id=survey_id,
+ shop_id=shop_id,
+ market_id=market_id,
+ adm0_code_dots=adm0_code_dots,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RpmeAssessmentPagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _rpme_output_values_get_serialize(
+ self,
+ page,
+ adm0_code,
+ survey_id,
+ shop_id,
+ market_id,
+ adm0_code_dots,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if adm0_code is not None:
+
+ _query_params.append(('adm0Code', adm0_code))
+
+ if survey_id is not None:
+
+ _query_params.append(('surveyId', survey_id))
+
+ if shop_id is not None:
+
+ _query_params.append(('shopId', shop_id))
+
+ if market_id is not None:
+
+ _query_params.append(('marketId', market_id))
+
+ if adm0_code_dots is not None:
+
+ _query_params.append(('adm0CodeDots', adm0_code_dots))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Rpme/OutputValues',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+ @validate_call
def rpme_surveys_get(
self,
- **kwargs
- ):
- """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.rpme_surveys_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0_code (int): code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- start_date (datetime): starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [PagedSurveyListDTO]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.rpme_surveys_get_endpoint.call_with_http_info(**kwargs)
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyListDTO:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def rpme_surveys_get_with_http_info(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyListDTO]:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def rpme_surveys_get_without_preload_content(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _rpme_surveys_get_serialize(
+ self,
+ adm0_code,
+ page,
+ start_date,
+ end_date,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0_code is not None:
+
+ _query_params.append(('adm0Code', adm0_code))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Rpme/Surveys',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+ @validate_call
def rpme_variables_get(
self,
- **kwargs
- ):
- """List of variables # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.rpme_variables_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- page (int): [optional] if omitted the server will use the default value of 1
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- RpmeVariablePagedResult
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.rpme_variables_get_endpoint.call_with_http_info(**kwargs)
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RpmeVariablePagedResult:
+ """List of variables
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_variables_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RpmeVariablePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def rpme_variables_get_with_http_info(
+ self,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[RpmeVariablePagedResult]:
+ """List of variables
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_variables_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RpmeVariablePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def rpme_variables_get_without_preload_content(
+ self,
+ page: Optional[StrictInt] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """List of variables
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param page:
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_variables_get_serialize(
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "RpmeVariablePagedResult",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _rpme_variables_get_serialize(
+ self,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Rpme/Variables',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def rpme_xls_forms_get(
self,
- **kwargs
- ):
- """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.rpme_xls_forms_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0_code (int): code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- start_date (datetime): starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [PagedXlsFormListDTO]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.rpme_xls_forms_get_endpoint.call_with_http_info(**kwargs)
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedXlsFormListDTO:
+ """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_xls_forms_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedXlsFormListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def rpme_xls_forms_get_with_http_info(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedXlsFormListDTO]:
+ """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_xls_forms_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedXlsFormListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def rpme_xls_forms_get_without_preload_content(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._rpme_xls_forms_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedXlsFormListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _rpme_xls_forms_get_serialize(
+ self,
+ adm0_code,
+ page,
+ start_date,
+ end_date,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0_code is not None:
+
+ _query_params.append(('adm0Code', adm0_code))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/Rpme/XLSForms',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/surveys_api.py b/data_bridges_client/api/surveys_api.py
index fb99e70..30b33c8 100644
--- a/data_bridges_client/api/surveys_api.py
+++ b/data_bridges_client/api/surveys_api.py
@@ -1,667 +1,1443 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
-import re # noqa: F401
-import sys # noqa: F401
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_processed_data_dto import PagedProcessedDataDTO
-from data_bridges_client.model.paged_survey_list_dto import PagedSurveyListDTO
-from data_bridges_client.model.problem_details import ProblemDetails
-from data_bridges_client.model.survey_details_dto import SurveyDetailsDTO
+from pydantic import Field
+from typing_extensions import Annotated
+from datetime import datetime
+from pydantic import StrictInt, StrictStr, field_validator
-class SurveysApi(object):
+from typing import Optional
+
+from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
+
+
+class SurveysApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.m_fi_surveys_base_data_get_endpoint = _Endpoint(
- settings={
- 'response_type': (SurveyDetailsDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MFI/Surveys/BaseData',
- 'operation_id': 'm_fi_surveys_base_data_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'survey_id',
- 'page',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'survey_id':
- (int,),
- 'page':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'survey_id': 'surveyID',
- 'page': 'page',
- 'env': 'env',
- },
- 'location_map': {
- 'survey_id': 'query',
- 'page': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.m_fi_surveys_full_data_get_endpoint = _Endpoint(
- settings={
- 'response_type': (SurveyDetailsDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MFI/Surveys/FullData',
- 'operation_id': 'm_fi_surveys_full_data_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'survey_id',
- 'format',
- 'page',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'survey_id':
- (int,),
- 'format':
- (str,),
- 'page':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'survey_id': 'surveyID',
- 'format': 'format',
- 'page': 'page',
- 'env': 'env',
- },
- 'location_map': {
- 'survey_id': 'query',
- 'format': 'query',
- 'page': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.m_fi_surveys_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([PagedSurveyListDTO],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MFI/Surveys',
- 'operation_id': 'm_fi_surveys_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0_code',
- 'page',
- 'start_date',
- 'end_date',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0_code':
- (int,),
- 'page':
- (int,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0_code': 'adm0Code',
- 'page': 'page',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0_code': 'query',
- 'page': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.m_fi_surveys_processed_data_get_endpoint = _Endpoint(
- settings={
- 'response_type': (PagedProcessedDataDTO,),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MFI/Surveys/ProcessedData',
- 'operation_id': 'm_fi_surveys_processed_data_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'survey_id',
- 'page',
- 'format',
- 'start_date',
- 'end_date',
- 'adm0_codes',
- 'market_id',
- 'survey_type',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'survey_id':
- (int,),
- 'page':
- (int,),
- 'format':
- (str,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'adm0_codes':
- (str,),
- 'market_id':
- (int,),
- 'survey_type':
- (str,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'survey_id': 'surveyID',
- 'page': 'page',
- 'format': 'format',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'adm0_codes': 'adm0Codes',
- 'market_id': 'marketID',
- 'survey_type': 'surveyType',
- 'env': 'env',
- },
- 'location_map': {
- 'survey_id': 'query',
- 'page': 'query',
- 'format': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'adm0_codes': 'query',
- 'market_id': 'query',
- 'survey_type': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def m_fi_surveys_base_data_get(
self,
- **kwargs
- ):
- """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.m_fi_surveys_base_data_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- survey_id (int): unique identifier for the collected data, as retrieved from /Surveys API.. [optional]
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- SurveyDetailsDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.m_fi_surveys_base_data_get_endpoint.call_with_http_info(**kwargs)
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def m_fi_surveys_base_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def m_fi_surveys_base_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_base_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _m_fi_surveys_base_data_get_serialize(
+ self,
+ survey_id,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MFI/Surveys/BaseData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def m_fi_surveys_full_data_get(
self,
- **kwargs
- ):
- """Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.m_fi_surveys_full_data_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- survey_id (int): unique identifier for the collected data, as retrieved from /Surveys API.. [optional]
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- SurveyDetailsDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.m_fi_surveys_full_data_get_endpoint.call_with_http_info(**kwargs)
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyResponsesDTO:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def m_fi_surveys_full_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyResponsesDTO]:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def m_fi_surveys_full_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API.
+ :type survey_id: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param page: page number for paged results
+ :type page: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_full_data_get_serialize(
+ survey_id=survey_id,
+ format=format,
+ page=page,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyResponsesDTO",
+ '400': "BadRequestDTO",
+ '404': "ProblemDetails",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _m_fi_surveys_full_data_get_serialize(
+ self,
+ survey_id,
+ format,
+ page,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MFI/Surveys/FullData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def m_fi_surveys_get(
self,
- **kwargs
- ):
- """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.m_fi_surveys_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0_code (int): code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- start_date (datetime): starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [PagedSurveyListDTO]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.m_fi_surveys_get_endpoint.call_with_http_info(**kwargs)
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedSurveyListDTO:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def m_fi_surveys_get_with_http_info(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedSurveyListDTO]:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+ @validate_call
+ def m_fi_surveys_get_without_preload_content(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedSurveyListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _m_fi_surveys_get_serialize(
+ self,
+ adm0_code,
+ page,
+ start_date,
+ end_date,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0_code is not None:
+
+ _query_params.append(('adm0Code', adm0_code))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MFI/Surveys',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
+
+
+
+ @validate_call
def m_fi_surveys_processed_data_get(
self,
- **kwargs
- ):
- """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.m_fi_surveys_processed_data_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- survey_id (int): The ID of the survey. [optional]
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- format (str): Output format: [JSON|CSV] Json is the default value. [optional] if omitted the server will use the default value of "json"
- start_date (datetime): Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- adm0_codes (str): Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional]
- market_id (int): The ID of the market. [optional]
- survey_type (str): The survey type. [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- PagedProcessedDataDTO
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.m_fi_surveys_processed_data_get_endpoint.call_with_http_info(**kwargs)
+ survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ adm0_codes: Annotated[Optional[StrictStr], Field(description="Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="The ID of the market")] = None,
+ survey_type: Annotated[Optional[StrictStr], Field(description="The survey type")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedProcessedDataDTO:
+ """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: The ID of the survey
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param adm0_codes: Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_codes: str
+ :param market_id: The ID of the market
+ :type market_id: int
+ :param survey_type: The survey type
+ :type survey_type: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_processed_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ format=format,
+ start_date=start_date,
+ end_date=end_date,
+ adm0_codes=adm0_codes,
+ market_id=market_id,
+ survey_type=survey_type,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedProcessedDataDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def m_fi_surveys_processed_data_get_with_http_info(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ adm0_codes: Annotated[Optional[StrictStr], Field(description="Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="The ID of the market")] = None,
+ survey_type: Annotated[Optional[StrictStr], Field(description="The survey type")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedProcessedDataDTO]:
+ """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: The ID of the survey
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param adm0_codes: Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_codes: str
+ :param market_id: The ID of the market
+ :type market_id: int
+ :param survey_type: The survey type
+ :type survey_type: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_processed_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ format=format,
+ start_date=start_date,
+ end_date=end_date,
+ adm0_codes=adm0_codes,
+ market_id=market_id,
+ survey_type=survey_type,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedProcessedDataDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ )
+
+
+ @validate_call
+ def m_fi_surveys_processed_data_get_without_preload_content(
+ self,
+ survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ adm0_codes: Annotated[Optional[StrictStr], Field(description="Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ market_id: Annotated[Optional[StrictInt], Field(description="The ID of the market")] = None,
+ survey_type: Annotated[Optional[StrictStr], Field(description="The survey type")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param survey_id: The ID of the survey
+ :type survey_id: int
+ :param page: page number for paged results
+ :type page: int
+ :param format: Output format: [JSON|CSV] Json is the default value
+ :type format: str
+ :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param adm0_codes: Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_codes: str
+ :param market_id: The ID of the market
+ :type market_id: int
+ :param survey_type: The survey type
+ :type survey_type: str
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_surveys_processed_data_get_serialize(
+ survey_id=survey_id,
+ page=page,
+ format=format,
+ start_date=start_date,
+ end_date=end_date,
+ adm0_codes=adm0_codes,
+ market_id=market_id,
+ survey_type=survey_type,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedProcessedDataDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _m_fi_surveys_processed_data_get_serialize(
+ self,
+ survey_id,
+ page,
+ format,
+ start_date,
+ end_date,
+ adm0_codes,
+ market_id,
+ survey_type,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if survey_id is not None:
+
+ _query_params.append(('surveyID', survey_id))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if format is not None:
+
+ _query_params.append(('format', format))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if adm0_codes is not None:
+
+ _query_params.append(('adm0Codes', adm0_codes))
+
+ if market_id is not None:
+
+ _query_params.append(('marketID', market_id))
+
+ if survey_type is not None:
+
+ _query_params.append(('surveyType', survey_type))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'text/plain',
+ 'application/json',
+ 'text/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MFI/Surveys/ProcessedData',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api/xls_forms_api.py b/data_bridges_client/api/xls_forms_api.py
index eba830d..646beae 100644
--- a/data_bridges_client/api/xls_forms_api.py
+++ b/data_bridges_client/api/xls_forms_api.py
@@ -1,329 +1,682 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import io
+import warnings
+
+from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
+from typing import Dict, List, Optional, Tuple, Union, Any
+
+try:
+ from typing import Annotated
+except ImportError:
+ from typing_extensions import Annotated
+
+from pydantic import Field
+from typing_extensions import Annotated
+from datetime import datetime
+
+from pydantic import StrictInt, StrictStr, field_validator
+from typing import List, Optional
-import re # noqa: F401
-import sys # noqa: F401
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
-from data_bridges_client.api_client import ApiClient, Endpoint as _Endpoint
-from data_bridges_client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_xls_form_list_dto import PagedXlsFormListDTO
-from data_bridges_client.model.xls_form_definition_dto import XlsFormDefinitionDTO
+from data_bridges_client.api_client import ApiClient
+from data_bridges_client.api_response import ApiResponse
+from data_bridges_client.rest import RESTResponseType
-class XlsFormsApi(object):
+class XlsFormsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
- def __init__(self, api_client=None):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.m_fi_xls_forms_definition_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([XlsFormDefinitionDTO],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MFI/XlsForms/definition',
- 'operation_id': 'm_fi_xls_forms_definition_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'xls_form_id',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'xls_form_id':
- (int,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'xls_form_id': 'xlsFormId',
- 'env': 'env',
- },
- 'location_map': {
- 'xls_form_id': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+
+ @validate_call
+ def m_fi_xls_forms_definition_get(
+ self,
+ xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> List[XlsFormDefinitionDTO]:
+ """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms
+ :type xls_form_id: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_xls_forms_definition_get_serialize(
+ xls_form_id=xls_form_id,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- self.m_fi_xls_forms_get_endpoint = _Endpoint(
- settings={
- 'response_type': ([PagedXlsFormListDTO],),
- 'auth': [
- 'default'
- ],
- 'endpoint_path': '/MFI/XlsForms',
- 'operation_id': 'm_fi_xls_forms_get',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'adm0_code',
- 'page',
- 'start_date',
- 'end_date',
- 'env',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- 'env',
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- ('env',): {
-
- "PROD": "prod",
- "DEV": "dev"
- },
- },
- 'openapi_types': {
- 'adm0_code':
- (int,),
- 'page':
- (int,),
- 'start_date':
- (datetime,),
- 'end_date':
- (datetime,),
- 'env':
- (str,),
- },
- 'attribute_map': {
- 'adm0_code': 'adm0Code',
- 'page': 'page',
- 'start_date': 'startDate',
- 'end_date': 'endDate',
- 'env': 'env',
- },
- 'location_map': {
- 'adm0_code': 'query',
- 'page': 'query',
- 'start_date': 'query',
- 'end_date': 'query',
- 'env': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[XlsFormDefinitionDTO]",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
- def m_fi_xls_forms_definition_get(
+
+ @validate_call
+ def m_fi_xls_forms_definition_get_with_http_info(
self,
- **kwargs
- ):
- """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.m_fi_xls_forms_definition_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- xls_form_id (int): unique identifier for the XLS Form, as retrieved from /XLSForms. [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [XlsFormDefinitionDTO]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[List[XlsFormDefinitionDTO]]:
+ """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms
+ :type xls_form_id: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_xls_forms_definition_get_serialize(
+ xls_form_id=xls_form_id,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[XlsFormDefinitionDTO]",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+
+ @validate_call
+ def m_fi_xls_forms_definition_get_without_preload_content(
+ self,
+ xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms
+ :type xls_form_id: int
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_xls_forms_definition_get_serialize(
+ xls_form_id=xls_form_id,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "List[XlsFormDefinitionDTO]",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+ return response_data.response
+
+
+ def _m_fi_xls_forms_definition_get_serialize(
+ self,
+ xls_form_id,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if xls_form_id is not None:
+
+ _query_params.append(('xlsFormId', xls_form_id))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MFI/XlsForms/definition',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.m_fi_xls_forms_definition_get_endpoint.call_with_http_info(**kwargs)
+
+
+
+ @validate_call
def m_fi_xls_forms_get(
self,
- **kwargs
- ):
- """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. # noqa: E501
-
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.m_fi_xls_forms_get(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- adm0_code (int): code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion. [optional] if omitted the server will use the default value of 0
- page (int): page number for paged results. [optional] if omitted the server will use the default value of 1
- start_date (datetime): starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- end_date (datetime): ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24). [optional]
- env (str): Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _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)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- [PagedXlsFormListDTO]
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> PagedXlsFormListDTO:
+ """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_xls_forms_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedXlsFormListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def m_fi_xls_forms_get_with_http_info(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> ApiResponse[PagedXlsFormListDTO]:
+ """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_xls_forms_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedXlsFormListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def m_fi_xls_forms_get_without_preload_content(
+ self,
+ adm0_code: Annotated[Optional[StrictInt], Field(description="code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion")] = None,
+ page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None,
+ start_date: Annotated[Optional[datetime], Field(description="starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ end_date: Annotated[Optional[datetime], Field(description="ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None,
+ env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None,
+ _request_timeout: Union[
+ None,
+ Annotated[StrictFloat, Field(gt=0)],
+ Tuple[
+ Annotated[StrictFloat, Field(gt=0)],
+ Annotated[StrictFloat, Field(gt=0)]
+ ]
+ ] = None,
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
+ _content_type: Optional[StrictStr] = None,
+ _headers: Optional[Dict[StrictStr, Any]] = None,
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
+ ) -> RESTResponseType:
+ """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion
+ :type adm0_code: int
+ :param page: page number for paged results
+ :type page: int
+ :param start_date: starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type start_date: datetime
+ :param end_date: ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)
+ :type end_date: datetime
+ :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org
+ :type env: str
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :type _request_timeout: int, tuple(int, int), optional
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the
+ authentication in the spec for a single request.
+ :type _request_auth: dict, optional
+ :param _content_type: force content-type for the request.
+ :type _content_type: str, Optional
+ :param _headers: set to override the headers for a single
+ request; this effectively ignores the headers
+ in the spec for a single request.
+ :type _headers: dict, optional
+ :param _host_index: set to override the host_index for a single
+ request; this effectively ignores the host_index
+ in the spec for a single request.
+ :type _host_index: int, optional
+ :return: Returns the result object.
+ """ # noqa: E501
+
+ _param = self._m_fi_xls_forms_get_serialize(
+ adm0_code=adm0_code,
+ page=page,
+ start_date=start_date,
+ end_date=end_date,
+ env=env,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "PagedXlsFormListDTO",
+ '400': "BadRequestDTO",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.m_fi_xls_forms_get_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
+
+ def _m_fi_xls_forms_get_serialize(
+ self,
+ adm0_code,
+ page,
+ start_date,
+ end_date,
+ env,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> Tuple:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ }
+
+ _path_params: Dict[str, str] = {}
+ _query_params: List[Tuple[str, str]] = []
+ _header_params: Dict[str, Optional[str]] = _headers or {}
+ _form_params: List[Tuple[str, str]] = []
+ _files: Dict[str, str] = {}
+ _body_params: Optional[bytes] = None
+
+ # process the path parameters
+ # process the query parameters
+ if adm0_code is not None:
+
+ _query_params.append(('adm0Code', adm0_code))
+
+ if page is not None:
+
+ _query_params.append(('page', page))
+
+ if start_date is not None:
+ if isinstance(start_date, datetime):
+ _query_params.append(
+ (
+ 'startDate',
+ start_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('startDate', start_date))
+
+ if end_date is not None:
+ if isinstance(end_date, datetime):
+ _query_params.append(
+ (
+ 'endDate',
+ end_date.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('endDate', end_date))
+
+ if env is not None:
+
+ _query_params.append(('env', env))
+
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+
+
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
+ 'application/json'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'default'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/MFI/XlsForms',
+ path_params=_path_params,
+ query_params=_query_params,
+ header_params=_header_params,
+ body=_body_params,
+ post_params=_form_params,
+ files=_files,
+ auth_settings=_auth_settings,
+ collection_formats=_collection_formats,
+ _host=_host,
+ _request_auth=_request_auth
+ )
+
diff --git a/data_bridges_client/api_client.py b/data_bridges_client/api_client.py
index 5085a3c..3f9c8d3 100644
--- a/data_bridges_client/api_client.py
+++ b/data_bridges_client/api_client.py
@@ -1,46 +1,46 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-import json
import atexit
+import datetime
+from dateutil.parser import parse
+import json
import mimetypes
-from multiprocessing.pool import ThreadPool
-import io
import os
import re
-import typing
-from urllib.parse import quote
-from urllib3.fields import RequestField
+import tempfile
+from urllib.parse import quote
+from typing import Tuple, Optional, List
-from data_bridges_client import rest
from data_bridges_client.configuration import Configuration
-from data_bridges_client.exceptions import ApiTypeError, ApiValueError, ApiException
-from data_bridges_client.model_utils import (
- ModelNormal,
- ModelSimple,
- ModelComposed,
- check_allowed_values,
- check_validations,
- date,
- datetime,
- deserialize_file,
- file_type,
- model_to_dict,
- none_type,
- validate_and_convert_types
+from data_bridges_client.api_response import ApiResponse
+import data_bridges_client.models
+from data_bridges_client import rest
+from data_bridges_client.exceptions import (
+ ApiValueError,
+ ApiException,
+ BadRequestException,
+ UnauthorizedException,
+ ForbiddenException,
+ NotFoundException,
+ ServiceException
)
-class ApiClient(object):
+class ApiClient:
"""Generic API client for OpenAPI client library builds.
OpenAPI generic API client. This client handles the client-
@@ -48,28 +48,38 @@ class ApiClient(object):
the methods and models for each application are generated from the OpenAPI
templates.
- NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
-
:param configuration: .Configuration object for this client
:param header_name: a header to pass when making calls to the API.
:param header_value: a header value to pass when making calls to
the API.
:param cookie: a cookie to include in the header when making calls
to the API
- :param pool_threads: The number of threads to use for async requests
- to the API. More threads means more concurrent API requests.
"""
+ PRIMITIVE_TYPES = (float, bool, bytes, str, int)
+ NATIVE_TYPES_MAPPING = {
+ 'int': int,
+ 'long': int, # TODO remove as only py3 is supported?
+ 'float': float,
+ 'str': str,
+ 'bool': bool,
+ 'date': datetime.date,
+ 'datetime': datetime.datetime,
+ 'object': object,
+ }
_pool = None
- def __init__(self, configuration=None, header_name=None, header_value=None,
- cookie=None, pool_threads=1):
+ def __init__(
+ self,
+ configuration=None,
+ header_name=None,
+ header_value=None,
+ cookie=None
+ ) -> None:
+ # use default configuration if none is provided
if configuration is None:
- configuration = Configuration.get_default_copy()
+ configuration = Configuration.get_default()
self.configuration = configuration
- self.pool_threads = pool_threads
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {}
@@ -78,30 +88,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
+ self.client_side_validation = configuration.client_side_validation
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
- self.close()
-
- def close(self):
- if self._pool:
- self._pool.close()
- self._pool.join()
- self._pool = None
- if hasattr(atexit, 'unregister'):
- atexit.unregister(self.close)
-
- @property
- def pool(self):
- """Create thread pool on first request
- avoids instantiating unused threadpool for blocking clients.
- """
- if self._pool is None:
- atexit.register(self.close)
- self._pool = ThreadPool(self.pool_threads)
- return self._pool
+ pass
@property
def user_agent(self):
@@ -115,26 +108,69 @@ def user_agent(self, value):
def set_default_header(self, header_name, header_value):
self.default_headers[header_name] = header_value
- def __call_api(
+
+ _default = None
+
+ @classmethod
+ def get_default(cls):
+ """Return new instance of ApiClient.
+
+ This method returns newly created, based on default constructor,
+ object of ApiClient class or returns a copy of default
+ ApiClient.
+
+ :return: The ApiClient object.
+ """
+ if cls._default is None:
+ cls._default = ApiClient()
+ return cls._default
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of ApiClient.
+
+ It stores default ApiClient.
+
+ :param default: object of ApiClient.
+ """
+ cls._default = default
+
+ def param_serialize(
self,
- resource_path: str,
- method: str,
- path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- body: typing.Optional[typing.Any] = None,
- post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
- response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
- auth_settings: typing.Optional[typing.List[str]] = None,
- _return_http_data_only: typing.Optional[bool] = None,
- collection_formats: typing.Optional[typing.Dict[str, str]] = None,
- _preload_content: bool = True,
- _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
- _host: typing.Optional[str] = None,
- _check_type: typing.Optional[bool] = None,
- _content_type: typing.Optional[str] = None
- ):
+ method,
+ resource_path,
+ path_params=None,
+ query_params=None,
+ header_params=None,
+ body=None,
+ post_params=None,
+ files=None, auth_settings=None,
+ collection_formats=None,
+ _host=None,
+ _request_auth=None
+ ) -> Tuple:
+
+ """Builds the HTTP request params needed by the request.
+ :param method: Method to call.
+ :param resource_path: Path to method endpoint.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :param _request_auth: set to override the auth_settings for an a single
+ request; this effectively ignores the authentication
+ in the spec for a single request.
+ :return: tuple of form (path, http_method, query_params, header_params,
+ body, post_params, files)
+ """
config = self.configuration
@@ -145,14 +181,17 @@ def __call_api(
header_params['Cookie'] = self.cookie
if header_params:
header_params = self.sanitize_for_serialization(header_params)
- header_params = dict(self.parameters_to_tuples(header_params,
- collection_formats))
+ header_params = dict(
+ self.parameters_to_tuples(header_params,collection_formats)
+ )
# path parameters
if path_params:
path_params = self.sanitize_for_serialization(path_params)
- path_params = self.parameters_to_tuples(path_params,
- collection_formats)
+ path_params = self.parameters_to_tuples(
+ path_params,
+ collection_formats
+ )
for k, v in path_params:
# specified safe chars, encode everything
resource_path = resource_path.replace(
@@ -160,31 +199,31 @@ def __call_api(
quote(str(v), safe=config.safe_chars_for_path_param)
)
- # query parameters
- if query_params:
- query_params = self.sanitize_for_serialization(query_params)
- query_params = self.parameters_to_tuples(query_params,
- collection_formats)
-
# post parameters
if post_params or files:
post_params = post_params if post_params else []
post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(post_params,
- collection_formats)
+ post_params = self.parameters_to_tuples(
+ post_params,
+ collection_formats
+ )
post_params.extend(self.files_parameters(files))
- if header_params['Content-Type'].startswith("multipart"):
- post_params = self.parameters_to_multipart(post_params,
- (dict) )
+
+ # auth setting
+ self.update_params_for_auth(
+ header_params,
+ query_params,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=_request_auth
+ )
# body
if body:
body = self.sanitize_for_serialization(body)
- # auth setting
- self.update_params_for_auth(header_params, query_params,
- auth_settings, resource_path, method, body)
-
# request url
if _host is None:
url = self.configuration.host + resource_path
@@ -192,73 +231,106 @@ def __call_api(
# use server/host defined in path or operation instead
url = _host + resource_path
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ url_query = self.parameters_to_url_query(
+ query_params,
+ collection_formats
+ )
+ url += "?" + url_query
+
+ return method, url, header_params, body, post_params
+
+
+ def call_api(
+ self,
+ method,
+ url,
+ header_params=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ) -> rest.RESTResponse:
+ """Makes the HTTP request (synchronous)
+ :param method: Method to call.
+ :param url: Path to method endpoint.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param _request_timeout: timeout setting for this request.
+ :return: RESTResponse
+ """
+
try:
# perform request and return response
- response_data = self.request(
- method, url, query_params=query_params, headers=header_params,
- post_params=post_params, body=body,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout)
+ response_data = self.rest_client.request(
+ method, url,
+ headers=header_params,
+ body=body, post_params=post_params,
+ _request_timeout=_request_timeout
+ )
+
except ApiException as e:
- e.body = e.body.decode('utf-8')
+ if e.body:
+ e.body = e.body.decode('utf-8')
raise e
- self.last_response = response_data
+ return response_data
+
+ def response_deserialize(
+ self,
+ response_data: rest.RESTResponse = None,
+ response_types_map=None
+ ) -> ApiResponse:
+ """Deserializes response into an object.
+ :param response_data: RESTResponse object to be deserialized.
+ :param response_types_map: dict of response types.
+ :return: ApiResponse
+ """
- return_data = response_data
- if not _preload_content:
- return (return_data)
- return return_data
+ response_type = response_types_map.get(str(response_data.status), None)
+ if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
+ # if not found, look for '1XX', '2XX', etc.
+ response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
# deserialize response data
- if response_type:
- if response_type != (file_type,):
- encoding = "utf-8"
+ response_text = None
+ return_data = None
+ try:
+ if response_type == "bytearray":
+ return_data = response_data.data
+ elif response_type == "file":
+ return_data = self.__deserialize_file(response_data)
+ elif response_type is not None:
+ match = None
content_type = response_data.getheader('content-type')
if content_type is not None:
- match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
- if match:
- encoding = match.group(1)
- response_data.data = response_data.data.decode(encoding)
-
- return_data = self.deserialize(
- response_data,
- response_type,
- _check_type
- )
- else:
- return_data = None
-
- if _return_http_data_only:
- return (return_data)
- else:
- return (return_data, response_data.status,
- response_data.getheaders())
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
+ encoding = match.group(1) if match else "utf-8"
+ response_text = response_data.data.decode(encoding)
+ return_data = self.deserialize(response_text, response_type)
+ finally:
+ if not 200 <= response_data.status <= 299:
+ raise ApiException.from_response(
+ http_resp=response_data,
+ body=response_text,
+ data=return_data,
+ )
- def parameters_to_multipart(self, params, collection_types):
- """Get parameters as list of tuples, formatting as json if value is collection_types
+ return ApiResponse(
+ status_code = response_data.status,
+ data = return_data,
+ headers = response_data.getheaders(),
+ raw_data = response_data.data
+ )
- :param params: Parameters as list of two-tuples
- :param dict collection_types: Parameter collection types
- :return: Parameters as list of tuple or urllib3.fields.RequestField
- """
- new_params = []
- if collection_types is None:
- collection_types = (dict)
- for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
- if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json
- v = json.dumps(v, ensure_ascii=False).encode("utf-8")
- field = RequestField(k, v)
- field.make_multipart(content_type="application/json; charset=utf-8")
- new_params.append(field)
- else:
- new_params.append((k, v))
- return new_params
+ def sanitize_for_serialization(self, obj):
+ """Builds a JSON POST object.
- @classmethod
- def sanitize_for_serialization(cls, obj):
- """Prepares data for transmission before it is sent with the rest client
If obj is None, return None.
If obj is str, int, long, float, bool, return directly.
If obj is datetime.datetime, datetime.date
@@ -266,228 +338,96 @@ def sanitize_for_serialization(cls, obj):
If obj is list, sanitize each element in the list.
If obj is dict, return the dict.
If obj is OpenAPI model, return the properties dict.
- If obj is io.IOBase, return the bytes
+
:param obj: The data to serialize.
:return: The serialized form of data.
"""
- if isinstance(obj, (ModelNormal, ModelComposed)):
- return {
- key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()
- }
- elif isinstance(obj, io.IOBase):
- return cls.get_file_data_and_close_file(obj)
- elif isinstance(obj, (str, int, float, none_type, bool)):
+ if obj is None:
+ return None
+ elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
- elif isinstance(obj, (datetime, date)):
+ elif isinstance(obj, list):
+ return [
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ ]
+ elif isinstance(obj, tuple):
+ return tuple(
+ self.sanitize_for_serialization(sub_obj) for sub_obj in obj
+ )
+ elif isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()
- elif isinstance(obj, ModelSimple):
- return cls.sanitize_for_serialization(obj.value)
- elif isinstance(obj, (list, tuple)):
- return [cls.sanitize_for_serialization(item) for item in obj]
- if isinstance(obj, dict):
- return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()}
- raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__))
-
- def deserialize(self, response, response_type, _check_type):
+
+ elif isinstance(obj, dict):
+ obj_dict = obj
+ else:
+ # Convert model obj to dict except
+ # attributes `openapi_types`, `attribute_map`
+ # and attributes which value is not None.
+ # Convert attribute name to json key in
+ # model definition for request.
+ obj_dict = obj.to_dict()
+
+ return {
+ key: self.sanitize_for_serialization(val)
+ for key, val in obj_dict.items()
+ }
+
+ def deserialize(self, response_text, response_type):
"""Deserializes response into an object.
:param response: RESTResponse object to be deserialized.
- :param response_type: For the response, a tuple containing:
- valid classes
- a list containing valid classes (for list schemas)
- a dict containing a tuple of valid classes as the value
- Example values:
- (str,)
- (Pet,)
- (float, none_type)
- ([int, none_type],)
- ({str: (bool, str, int, float, date, datetime, str, none_type)},)
- :param _check_type: boolean, whether to check the types of the data
- received from the server
- :type _check_type: bool
+ :param response_type: class literal for
+ deserialized object, or string of class name.
:return: deserialized object.
"""
- # handle file downloading
- # save response body into a tmp file and return the instance
- if response_type == (file_type,):
- content_disposition = response.getheader("Content-Disposition")
- return deserialize_file(response.data, self.configuration,
- content_disposition=content_disposition)
# fetch data from response object
try:
- received_data = json.loads(response.data)
+ data = json.loads(response_text)
except ValueError:
- received_data = response.data
-
- # store our data under the key of 'received_data' so users have some
- # context if they are deserializing a string and the data type is wrong
- deserialized_data = validate_and_convert_types(
- received_data,
- response_type,
- ['received_data'],
- True,
- _check_type,
- configuration=self.configuration
- )
- return deserialized_data
+ data = response_text
- def call_api(
- self,
- resource_path: str,
- method: str,
- path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
- body: typing.Optional[typing.Any] = None,
- post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
- files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
- response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
- auth_settings: typing.Optional[typing.List[str]] = None,
- async_req: typing.Optional[bool] = None,
- _return_http_data_only: typing.Optional[bool] = None,
- collection_formats: typing.Optional[typing.Dict[str, str]] = None,
- _preload_content: bool = True,
- _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None,
- _host: typing.Optional[str] = None,
- _check_type: typing.Optional[bool] = None
- ):
- """Makes the HTTP request (synchronous) and returns deserialized data.
-
- To make an async_req request, set the async_req parameter.
+ return self.__deserialize(data, response_type)
- :param resource_path: Path to method endpoint.
- :param method: Method to call.
- :param path_params: Path parameters in the url.
- :param query_params: Query parameters in the url.
- :param header_params: Header parameters to be
- placed in the request header.
- :param body: Request body.
- :param post_params dict: Request post form parameters,
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
- :param auth_settings list: Auth Settings names for the request.
- :param response_type: For the response, a tuple containing:
- valid classes
- a list containing valid classes (for list schemas)
- a dict containing a tuple of valid classes as the value
- Example values:
- (str,)
- (Pet,)
- (float, none_type)
- ([int, none_type],)
- ({str: (bool, str, int, float, date, datetime, str, none_type)},)
- :param files: key -> field name, value -> a list of open file
- objects for `multipart/form-data`.
- :type files: dict
- :param async_req bool: execute request asynchronously
- :type async_req: bool, optional
- :param _return_http_data_only: response data without head status code
- and headers
- :type _return_http_data_only: bool, optional
- :param collection_formats: dict of collection formats for path, query,
- header, and post parameters.
- :type collection_formats: dict, optional
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :type _preload_content: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _check_type: boolean describing if the data back from the server
- should have its type checked.
- :type _check_type: bool, optional
- :return:
- If async_req parameter is True,
- the request will be called asynchronously.
- The method will return the request thread.
- If parameter async_req is False or missing,
- then the method will return the response directly.
+ def __deserialize(self, data, klass):
+ """Deserializes dict, list, str into an object.
+
+ :param data: dict, list or str.
+ :param klass: class literal, or string of class name.
+
+ :return: object.
"""
- if not async_req:
- return self.__call_api(resource_path, method,
- path_params, query_params, header_params,
- body, post_params, files,
- response_type, auth_settings,
- _return_http_data_only, collection_formats,
- _preload_content, _request_timeout, _host,
- _check_type)
-
- return self.pool.apply_async(self.__call_api, (resource_path,
- method, path_params,
- query_params,
- header_params, body,
- post_params, files,
- response_type,
- auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- _host, _check_type))
-
- def request(self, method, url, query_params=None, headers=None,
- post_params=None, body=None, _preload_content=True,
- _request_timeout=None):
- """Makes the HTTP request using RESTClient."""
- if method == "GET":
- return self.rest_client.GET(url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers)
- elif method == "HEAD":
- return self.rest_client.HEAD(url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers)
- elif method == "OPTIONS":
- return self.rest_client.OPTIONS(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "POST":
- return self.rest_client.POST(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "PUT":
- return self.rest_client.PUT(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "PATCH":
- return self.rest_client.PATCH(url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
- elif method == "DELETE":
- return self.rest_client.DELETE(url,
- query_params=query_params,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
+ if data is None:
+ return None
+
+ if isinstance(klass, str):
+ if klass.startswith('List['):
+ sub_kls = re.match(r'List\[(.*)]', klass).group(1)
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
+
+ if klass.startswith('Dict['):
+ sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2)
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in data.items()}
+
+ # convert str to class
+ if klass in self.NATIVE_TYPES_MAPPING:
+ klass = self.NATIVE_TYPES_MAPPING[klass]
+ else:
+ klass = getattr(data_bridges_client.models, klass)
+
+ if klass in self.PRIMITIVE_TYPES:
+ return self.__deserialize_primitive(data, klass)
+ elif klass == object:
+ return self.__deserialize_object(data)
+ elif klass == datetime.date:
+ return self.__deserialize_date(data)
+ elif klass == datetime.datetime:
+ return self.__deserialize_datetime(data)
else:
- raise ApiValueError(
- "http method must be `GET`, `HEAD`, `OPTIONS`,"
- " `POST`, `PATCH`, `PUT` or `DELETE`."
- )
+ return self.__deserialize_model(data, klass)
def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
@@ -499,7 +439,7 @@ def parameters_to_tuples(self, params, collection_formats):
new_params = []
if collection_formats is None:
collection_formats = {}
- for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
+ for k, v in params.items() if isinstance(params, dict) else params:
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
@@ -519,349 +459,274 @@ def parameters_to_tuples(self, params, collection_formats):
new_params.append((k, v))
return new_params
- @staticmethod
- def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes:
- file_data = file_instance.read()
- file_instance.close()
- return file_data
+ def parameters_to_url_query(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: URL query string (e.g. a=Hello%20World&b=123)
+ """
+ new_params = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params:
+ if isinstance(v, bool):
+ v = str(v).lower()
+ if isinstance(v, (int, float)):
+ v = str(v)
+ if isinstance(v, dict):
+ v = json.dumps(v)
+
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(quote(str(value)) for value in v))
+ )
+ else:
+ new_params.append((k, quote(str(v))))
+
+ return "&".join(["=".join(item) for item in new_params])
- def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None):
+ def files_parameters(self, files=None):
"""Builds form parameters.
- :param files: None or a dict with key=param_name and
- value is a list of open file objects
- :return: List of tuples of form parameters with file data
+ :param files: File parameters.
+ :return: Form parameters with files.
"""
- if files is None:
- return []
-
params = []
- for param_name, file_instances in files.items():
- if file_instances is None:
- # if the file field is nullable, skip None values
- continue
- for file_instance in file_instances:
- if file_instance is None:
- # if the file field is nullable, skip None values
+
+ if files:
+ for k, v in files.items():
+ if not v:
continue
- if file_instance.closed is True:
- raise ApiValueError(
- "Cannot read a closed file. The passed in file_type "
- "for %s must be open." % param_name
- )
- filename = os.path.basename(file_instance.name)
- filedata = self.get_file_data_and_close_file(file_instance)
- mimetype = (mimetypes.guess_type(filename)[0] or
- 'application/octet-stream')
- params.append(
- tuple([param_name, tuple([filename, filedata, mimetype])]))
+ file_names = v if type(v) is list else [v]
+ for n in file_names:
+ with open(n, 'rb') as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ mimetype = (
+ mimetypes.guess_type(filename)[0]
+ or 'application/octet-stream'
+ )
+ params.append(
+ tuple([k, tuple([filename, filedata, mimetype])])
+ )
return params
- def select_header_accept(self, accepts):
+ def select_header_accept(self, accepts: List[str]) -> Optional[str]:
"""Returns `Accept` based on an array of accepts provided.
:param accepts: List of headers.
:return: Accept (e.g. application/json).
"""
if not accepts:
- return
+ return None
- accepts = [x.lower() for x in accepts]
+ for accept in accepts:
+ if re.search('json', accept, re.IGNORECASE):
+ return accept
- if 'application/json' in accepts:
- return 'application/json'
- else:
- return ', '.join(accepts)
+ return accepts[0]
- def select_header_content_type(self, content_types, method=None, body=None):
+ def select_header_content_type(self, content_types):
"""Returns `Content-Type` based on an array of content_types provided.
:param content_types: List of content-types.
- :param method: http method (e.g. POST, PATCH).
- :param body: http body to send.
:return: Content-Type (e.g. application/json).
"""
if not content_types:
- return 'application/json'
-
- content_types = [x.lower() for x in content_types]
+ return None
- if (method == 'PATCH' and
- 'application/json-patch+json' in content_types and
- isinstance(body, list)):
- return 'application/json-patch+json'
+ for content_type in content_types:
+ if re.search('json', content_type, re.IGNORECASE):
+ return content_type
- if 'application/json' in content_types or '*/*' in content_types:
- return 'application/json'
- else:
- return content_types[0]
+ return content_types[0]
- def update_params_for_auth(self, headers, queries, auth_settings,
- resource_path, method, body):
+ def update_params_for_auth(
+ self,
+ headers,
+ queries,
+ auth_settings,
+ resource_path,
+ method,
+ body,
+ request_auth=None
+ ) -> None:
"""Updates header and query params based on authentication setting.
:param headers: Header parameters dict to be updated.
:param queries: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
- :param resource_path: A string representation of the HTTP request resource path.
- :param method: A string representation of the HTTP request method.
- :param body: A object representing the body of the HTTP request.
- The object type is the return value of _encoder.default().
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param request_auth: if set, the provided settings will
+ override the token in the configuration.
"""
if not auth_settings:
return
- for auth in auth_settings:
- auth_setting = self.configuration.auth_settings().get(auth)
- if auth_setting:
- if auth_setting['in'] == 'cookie':
- headers['Cookie'] = auth_setting['value']
- elif auth_setting['in'] == 'header':
- if auth_setting['type'] != 'http-signature':
- headers[auth_setting['key']] = auth_setting['value']
- elif auth_setting['in'] == 'query':
- queries.append((auth_setting['key'], auth_setting['value']))
- else:
- raise ApiValueError(
- 'Authentication token must be in `query` or `header`'
+ if request_auth:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ request_auth
+ )
+ else:
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ self._apply_auth_params(
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
)
+ def _apply_auth_params(
+ self,
+ headers,
+ queries,
+ resource_path,
+ method,
+ body,
+ auth_setting
+ ) -> None:
+ """Updates the request parameters based on a single auth_setting
-class Endpoint(object):
- def __init__(self, settings=None, params_map=None, root_map=None,
- headers_map=None, api_client=None, callable=None):
- """Creates an endpoint
-
- Args:
- settings (dict): see below key value pairs
- 'response_type' (tuple/None): response type
- 'auth' (list): a list of auth type keys
- 'endpoint_path' (str): the endpoint path
- 'operation_id' (str): endpoint string identifier
- 'http_method' (str): POST/PUT/PATCH/GET etc
- 'servers' (list): list of str servers that this endpoint is at
- params_map (dict): see below key value pairs
- 'all' (list): list of str endpoint parameter names
- 'required' (list): list of required parameter names
- 'nullable' (list): list of nullable parameter names
- 'enum' (list): list of parameters with enum values
- 'validation' (list): list of parameters with validations
- root_map
- 'validations' (dict): the dict mapping endpoint parameter tuple
- paths to their validation dictionaries
- 'allowed_values' (dict): the dict mapping endpoint parameter
- tuple paths to their allowed_values (enum) dictionaries
- 'openapi_types' (dict): param_name to openapi type
- 'attribute_map' (dict): param_name to camelCase name
- 'location_map' (dict): param_name to 'body', 'file', 'form',
- 'header', 'path', 'query'
- collection_format_map (dict): param_name to `csv` etc.
- headers_map (dict): see below key value pairs
- 'accept' (list): list of Accept header strings
- 'content_type' (list): list of Content-Type header strings
- api_client (ApiClient) api client instance
- callable (function): the function which is invoked when the
- Endpoint is called
+ :param headers: Header parameters dict to be updated.
+ :param queries: Query parameters tuple list to be updated.
+ :resource_path: A string representation of the HTTP request resource path.
+ :method: A string representation of the HTTP request method.
+ :body: A object representing the body of the HTTP request.
+ The object type is the return value of sanitize_for_serialization().
+ :param auth_setting: auth settings for the endpoint
"""
- self.settings = settings
- self.params_map = params_map
- self.params_map['all'].extend([
- 'async_req',
- '_host_index',
- '_preload_content',
- '_request_timeout',
- '_return_http_data_only',
- '_check_input_type',
- '_check_return_type',
- '_content_type',
- '_spec_property_naming'
- ])
- self.params_map['nullable'].extend(['_request_timeout'])
- self.validations = root_map['validations']
- self.allowed_values = root_map['allowed_values']
- self.openapi_types = root_map['openapi_types']
- extra_types = {
- 'async_req': (bool,),
- '_host_index': (none_type, int),
- '_preload_content': (bool,),
- '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]),
- '_return_http_data_only': (bool,),
- '_check_input_type': (bool,),
- '_check_return_type': (bool,),
- '_spec_property_naming': (bool,),
- '_content_type': (none_type, str)
- }
- self.openapi_types.update(extra_types)
- self.attribute_map = root_map['attribute_map']
- self.location_map = root_map['location_map']
- self.collection_format_map = root_map['collection_format_map']
- self.headers_map = headers_map
- self.api_client = api_client
- self.callable = callable
-
- def __validate_inputs(self, kwargs):
- for param in self.params_map['enum']:
- if param in kwargs:
- check_allowed_values(
- self.allowed_values,
- (param,),
- kwargs[param]
- )
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ queries.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
- for param in self.params_map['validation']:
- if param in kwargs:
- check_validations(
- self.validations,
- (param,),
- kwargs[param],
- configuration=self.api_client.configuration
- )
+ def __deserialize_file(self, response):
+ """Deserializes body to file
- if kwargs['_check_input_type'] is False:
- return
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
- for key, value in kwargs.items():
- fixed_val = validate_and_convert_types(
- value,
- self.openapi_types[key],
- [key],
- kwargs['_spec_property_naming'],
- kwargs['_check_input_type'],
- configuration=self.api_client.configuration
- )
- kwargs[key] = fixed_val
-
- def __gather_params(self, kwargs):
- params = {
- 'body': None,
- 'collection_format': {},
- 'file': {},
- 'form': [],
- 'header': {},
- 'path': {},
- 'query': []
- }
+ handle file downloading
+ save response body into a tmp file and return the instance
- for param_name, param_value in kwargs.items():
- param_location = self.location_map.get(param_name)
- if param_location is None:
- continue
- if param_location:
- if param_location == 'body':
- params['body'] = param_value
- continue
- base_name = self.attribute_map[param_name]
- if (param_location == 'form' and
- self.openapi_types[param_name] == (file_type,)):
- params['file'][base_name] = [param_value]
- elif (param_location == 'form' and
- self.openapi_types[param_name] == ([file_type],)):
- # param_value is already a list
- params['file'][base_name] = param_value
- elif param_location in {'form', 'query'}:
- param_value_full = (base_name, param_value)
- params[param_location].append(param_value_full)
- if param_location not in {'form', 'query'}:
- params[param_location][base_name] = param_value
- collection_format = self.collection_format_map.get(param_name)
- if collection_format:
- params['collection_format'][base_name] = collection_format
+ :param response: RESTResponse.
+ :return: file path.
+ """
+ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
- return params
+ content_disposition = response.getheader("Content-Disposition")
+ if content_disposition:
+ filename = re.search(
+ r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition
+ ).group(1)
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ f.write(response.data)
+
+ return path
+
+ def __deserialize_primitive(self, data, klass):
+ """Deserializes string to primitive type.
+
+ :param data: str.
+ :param klass: class literal.
- def __call__(self, *args, **kwargs):
- """ This method is invoked when endpoints are called
- Example:
+ :return: int, long, float, str, bool.
+ """
+ try:
+ return klass(data)
+ except UnicodeEncodeError:
+ return str(data)
+ except TypeError:
+ return data
- api_instance = CommoditiesApi()
- api_instance.commodities_categories_list_get # this is an instance of the class Endpoint
- api_instance.commodities_categories_list_get() # this invokes api_instance.commodities_categories_list_get.__call__()
- which then invokes the callable functions stored in that endpoint at
- api_instance.commodities_categories_list_get.callable or self.callable in this class
+ def __deserialize_object(self, value):
+ """Return an original value.
+ :return: object.
"""
- return self.callable(self, *args, **kwargs)
+ return value
- def call_with_http_info(self, **kwargs):
+ def __deserialize_date(self, string):
+ """Deserializes string to date.
+ :param string: str.
+ :return: date.
+ """
try:
- index = self.api_client.configuration.server_operation_index.get(
- self.settings['operation_id'], self.api_client.configuration.server_index
- ) if kwargs['_host_index'] is None else kwargs['_host_index']
- server_variables = self.api_client.configuration.server_operation_variables.get(
- self.settings['operation_id'], self.api_client.configuration.server_variables
- )
- _host = self.api_client.configuration.get_host_from_settings(
- index, variables=server_variables, servers=self.settings['servers']
+ return parse(string).date()
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
)
- except IndexError:
- if self.settings['servers']:
- raise ApiValueError(
- "Invalid host index. Must be 0 <= index < %s" %
- len(self.settings['servers'])
- )
- _host = None
-
- for key, value in kwargs.items():
- if key not in self.params_map['all']:
- raise ApiTypeError(
- "Got an unexpected parameter '%s'"
- " to method `%s`" %
- (key, self.settings['operation_id'])
- )
- # only throw this nullable ApiValueError if _check_input_type
- # is False, if _check_input_type==True we catch this case
- # in self.__validate_inputs
- if (key not in self.params_map['nullable'] and value is None
- and kwargs['_check_input_type'] is False):
- raise ApiValueError(
- "Value may not be None for non-nullable parameter `%s`"
- " when calling `%s`" %
- (key, self.settings['operation_id'])
- )
- for key in self.params_map['required']:
- if key not in kwargs.keys():
- raise ApiValueError(
- "Missing the required parameter `%s` when calling "
- "`%s`" % (key, self.settings['operation_id'])
- )
+ def __deserialize_datetime(self, string):
+ """Deserializes string to datetime.
- self.__validate_inputs(kwargs)
+ The string should be in iso8601 datetime format.
- params = self.__gather_params(kwargs)
+ :param string: str.
+ :return: datetime.
+ """
+ try:
+ return parse(string)
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
+ )
+ )
- accept_headers_list = self.headers_map['accept']
- if accept_headers_list:
- params['header']['Accept'] = self.api_client.select_header_accept(
- accept_headers_list)
+ def __deserialize_model(self, data, klass):
+ """Deserializes list or dict to model.
- if kwargs.get('_content_type'):
- params['header']['Content-Type'] = kwargs['_content_type']
- else:
- content_type_headers_list = self.headers_map['content_type']
- if content_type_headers_list:
- if params['body'] != "":
- header_list = self.api_client.select_header_content_type(
- content_type_headers_list, self.settings['http_method'],
- params['body'])
- params['header']['Content-Type'] = header_list
-
- return self.api_client.call_api(
- self.settings['endpoint_path'], self.settings['http_method'],
- params['path'],
- params['query'],
- params['header'],
- body=params['body'],
- post_params=params['form'],
- files=params['file'],
- response_type=self.settings['response_type'],
- auth_settings=self.settings['auth'],
- async_req=kwargs['async_req'],
- _check_type=kwargs['_check_return_type'],
- _return_http_data_only=kwargs['_return_http_data_only'],
- _preload_content=kwargs['_preload_content'],
- _request_timeout=kwargs['_request_timeout'],
- _host=_host,
- collection_formats=params['collection_format'])
+ :param data: dict, list.
+ :param klass: class literal.
+ :return: model object.
+ """
+
+ return klass.from_dict(data)
diff --git a/data_bridges_client/api_response.py b/data_bridges_client/api_response.py
new file mode 100644
index 0000000..2ac1ada
--- /dev/null
+++ b/data_bridges_client/api_response.py
@@ -0,0 +1,21 @@
+"""API response object."""
+
+from __future__ import annotations
+from typing import Any, Dict, Optional, Generic, TypeVar
+from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel
+
+T = TypeVar("T")
+
+class ApiResponse(BaseModel, Generic[T]):
+ """
+ API response object
+ """
+
+ status_code: StrictInt = Field(description="HTTP status code")
+ headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers")
+ data: T = Field(description="Deserialized data given the data type")
+ raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
+
+ model_config = {
+ "arbitrary_types_allowed": True
+ }
diff --git a/data_bridges_client/apis/__init__.py b/data_bridges_client/apis/__init__.py
deleted file mode 100644
index a732585..0000000
--- a/data_bridges_client/apis/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-
-# flake8: noqa
-
-# Import all APIs into this package.
-# If you have many APIs here with many many models used in each API this may
-# raise a `RecursionError`.
-# In order to avoid this, import only the API that you directly need like:
-#
-# from .api.commodities_api import CommoditiesApi
-#
-# or import this package, but before doing it, use:
-#
-# import sys
-# sys.setrecursionlimit(n)
-
-# Import APIs into API package:
-from data_bridges_client.api.commodities_api import CommoditiesApi
-from data_bridges_client.api.commodity_units_api import CommodityUnitsApi
-from data_bridges_client.api.currency_api import CurrencyApi
-from data_bridges_client.api.economic_data_api import EconomicDataApi
-from data_bridges_client.api.food_security_api import FoodSecurityApi
-from data_bridges_client.api.gorp_api import GorpApi
-from data_bridges_client.api.market_prices_api import MarketPricesApi
-from data_bridges_client.api.markets_api import MarketsApi
-from data_bridges_client.api.rpme_api import RpmeApi
-from data_bridges_client.api.surveys_api import SurveysApi
-from data_bridges_client.api.xls_forms_api import XlsFormsApi
diff --git a/data_bridges_client/configuration.py b/data_bridges_client/configuration.py
index fa60d3f..35b3376 100644
--- a/data_bridges_client/configuration.py
+++ b/data_bridges_client/configuration.py
@@ -1,12 +1,16 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import copy
@@ -15,9 +19,7 @@
import sys
import urllib3
-from http import client as http_client
-from data_bridges_client.exceptions import ApiValueError
-
+import http.client as httplib
JSON_SCHEMA_VALIDATION_KEYWORDS = {
'multipleOf', 'maximum', 'exclusiveMaximum',
@@ -25,46 +27,20 @@
'minLength', 'pattern', 'maxItems', 'minItems'
}
-class Configuration(object):
- """NOTE: This class is auto generated by OpenAPI Generator
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
+class Configuration:
+ """This class contains various settings of the API client.
- :param host: Base url
+ :param host: Base url.
:param api_key: Dict to store API key(s).
Each entry in the dict specifies an API key.
The dict key is the name of the security scheme in the OAS specification.
The dict value is the API key secret.
- :param api_key_prefix: Dict to store API prefix (e.g. Bearer)
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
The dict key is the name of the security scheme in the OAS specification.
The dict value is an API key prefix when generating the auth data.
- :param username: Username for HTTP basic authentication
- :param password: Password for HTTP basic authentication
- :param discard_unknown_keys: Boolean value indicating whether to discard
- unknown properties. A server may send a response that includes additional
- properties that are not known by the client in the following scenarios:
- 1. The OpenAPI document is incomplete, i.e. it does not match the server
- implementation.
- 2. The client was generated using an older version of the OpenAPI document
- and the server has been upgraded since then.
- If a schema in the OpenAPI document defines the additionalProperties attribute,
- then all undeclared properties received by the server are injected into the
- additional properties map. In that case, there are undeclared properties, and
- nothing to discard.
- :param disabled_client_side_validations (string): Comma-separated list of
- JSON schema validation keywords to disable JSON schema structural validation
- rules. The following keywords may be specified: multipleOf, maximum,
- exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
- maxItems, minItems.
- By default, the validation is performed for data generated locally by the client
- and data received from the server, independent of any validation performed by
- the server side. If the input data does not satisfy the JSON schema validation
- rules specified in the OpenAPI document, an exception is raised.
- If disabled_client_side_validations is set, structural validation is
- disabled. This can be useful to troubleshoot data validation problem, such as
- when the OpenAPI document validation rules do not match the actual API data
- received by the server.
+ :param username: Username for HTTP basic authentication.
+ :param password: Password for HTTP basic authentication.
+ :param access_token: Access token.
:param server_index: Index to servers configuration.
:param server_variables: Mapping with string values to replace variables in
templated server configuration. The validation of enums is performed for
@@ -73,47 +49,27 @@ class Configuration(object):
configuration.
:param server_operation_variables: Mapping from operation ID to a mapping with
string values to replace variables in templated server configuration.
- The validation of enums is performed for variables with defined enum values before.
+ The validation of enums is performed for variables with defined enum
+ values before.
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
- in PEM format
+ in PEM format.
:Example:
-
- API Key Authentication Example.
- Given the following security scheme in the OpenAPI specification:
- components:
- securitySchemes:
- cookieAuth: # name for the security scheme
- type: apiKey
- in: cookie
- name: JSESSIONID # cookie name
-
- You can programmatically set the cookie:
-
-conf = data_bridges_client.Configuration(
- api_key={'cookieAuth': 'abc123'}
- api_key_prefix={'cookieAuth': 'JSESSIONID'}
-)
-
- The following cookie will be added to the HTTP request:
- Cookie: JSESSIONID abc123
"""
_default = None
def __init__(self, host=None,
api_key=None, api_key_prefix=None,
- access_token=None,
username=None, password=None,
- discard_unknown_keys=False,
- disabled_client_side_validations="",
+ access_token=None,
server_index=None, server_variables=None,
server_operation_index=None, server_operation_variables=None,
ssl_ca_cert=None,
- ):
+ ) -> None:
"""Constructor
"""
- self._base_path = "https://api.wfp.org/vam-data-bridges/1.3.1" if host is None else host
+ self._base_path = "https://api.wfp.org/vam-data-bridges/2.0.0" if host is None else host
"""Default Base url
"""
self.server_index = 0 if server_index is None and host is None else server_index
@@ -128,7 +84,6 @@ def __init__(self, host=None,
"""Temp file folder for downloading files
"""
# Authentication Settings
- self.access_token = access_token
self.api_key = {}
if api_key:
self.api_key = api_key
@@ -148,8 +103,9 @@ def __init__(self, host=None,
self.password = password
"""Password for HTTP basic authentication
"""
- self.discard_unknown_keys = discard_unknown_keys
- self.disabled_client_side_validations = disabled_client_side_validations
+ self.access_token = access_token
+ """Access token
+ """
self.logger = {}
"""Logging Settings
"""
@@ -188,6 +144,10 @@ def __init__(self, host=None,
self.assert_hostname = None
"""Set this to True/False to enable/disable SSL hostname verification.
"""
+ self.tls_server_name = None
+ """SSL/TLS Server Name Indication (SNI)
+ Set this to the SNI value expected by the server.
+ """
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
"""urllib3 connection pool's maximum number of connections saved
@@ -200,9 +160,6 @@ def __init__(self, host=None,
self.proxy = None
"""Proxy URL
"""
- self.no_proxy = None
- """bypass proxy for host in the no_proxy list.
- """
self.proxy_headers = None
"""Proxy headers
"""
@@ -215,8 +172,17 @@ def __init__(self, host=None,
# Enable client side validation
self.client_side_validation = True
- # Options to pass down to the underlying urllib3 socket
self.socket_options = None
+ """Options to pass down to the underlying urllib3 socket
+ """
+
+ self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
+ """datetime format
+ """
+
+ self.date_format = "%Y-%m-%d"
+ """date format
+ """
def __deepcopy__(self, memo):
cls = self.__class__
@@ -234,13 +200,6 @@ def __deepcopy__(self, memo):
def __setattr__(self, name, value):
object.__setattr__(self, name, value)
- if name == 'disabled_client_side_validations':
- s = set(filter(None, value.split(',')))
- for v in s:
- if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
- raise ApiValueError(
- "Invalid keyword: '{0}''".format(v))
- self._disabled_client_side_validations = s
@classmethod
def set_default(cls, default):
@@ -251,21 +210,31 @@ def set_default(cls, default):
:param default: object of Configuration
"""
- cls._default = copy.deepcopy(default)
+ cls._default = default
@classmethod
def get_default_copy(cls):
- """Return new instance of configuration.
+ """Deprecated. Please use `get_default` instead.
+
+ Deprecated. Please use `get_default` instead.
+
+ :return: The configuration object.
+ """
+ return cls.get_default()
+
+ @classmethod
+ def get_default(cls):
+ """Return the default configuration.
This method returns newly created, based on default constructor,
object of Configuration class or returns a copy of default
- configuration passed by the set_default method.
+ configuration.
:return: The configuration object.
"""
- if cls._default is not None:
- return copy.deepcopy(cls._default)
- return Configuration()
+ if cls._default is None:
+ cls._default = Configuration()
+ return cls._default
@property
def logger_file(self):
@@ -319,15 +288,15 @@ def debug(self, value):
# if debug status is True, turn on debug logging
for _, logger in self.logger.items():
logger.setLevel(logging.DEBUG)
- # turn on http_client debug
- http_client.HTTPConnection.debuglevel = 1
+ # turn on httplib debug
+ httplib.HTTPConnection.debuglevel = 1
else:
# if debug status is False, turn off debug logging,
# setting log level to default `logging.WARNING`
for _, logger in self.logger.items():
logger.setLevel(logging.WARNING)
- # turn off http_client debug
- http_client.HTTPConnection.debuglevel = 0
+ # turn off httplib debug
+ httplib.HTTPConnection.debuglevel = 0
@property
def logger_format(self):
@@ -390,15 +359,6 @@ def auth_settings(self):
:return: The Auth Settings information dict.
"""
auth = {}
- if 'Bearer' in self.api_key:
- auth['Bearer'] = {
- 'type': 'api_key',
- 'in': 'header',
- 'key': 'Authorization',
- 'value': self.get_api_key_with_prefix(
- 'Bearer',
- ),
- }
if self.access_token is not None:
auth['default'] = {
'type': 'oauth2',
@@ -416,7 +376,7 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
- "Version of the API: 1.3.1\n"\
+ "Version of the API: 2.0.0\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
@@ -427,7 +387,7 @@ def get_host_settings(self):
"""
return [
{
- 'url': "https://api.wfp.org/vam-data-bridges/1.3.1",
+ 'url': "https://api.wfp.org/vam-data-bridges/2.0.0",
'description': "No description provided",
}
]
diff --git a/data_bridges_client/exceptions.py b/data_bridges_client/exceptions.py
index 48e31a6..e0c83ef 100644
--- a/data_bridges_client/exceptions.py
+++ b/data_bridges_client/exceptions.py
@@ -1,14 +1,20 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
+from typing import Any, Optional
+
+from typing_extensions import Self
class OpenApiException(Exception):
"""The base exception class for all OpenAPIExceptions"""
@@ -16,7 +22,7 @@ class OpenApiException(Exception):
class ApiTypeError(OpenApiException, TypeError):
def __init__(self, msg, path_to_item=None, valid_classes=None,
- key_type=None):
+ key_type=None) -> None:
""" Raises an exception for TypeErrors
Args:
@@ -44,7 +50,7 @@ def __init__(self, msg, path_to_item=None, valid_classes=None,
class ApiValueError(OpenApiException, ValueError):
- def __init__(self, msg, path_to_item=None):
+ def __init__(self, msg, path_to_item=None) -> None:
"""
Args:
msg (str): the exception message
@@ -62,7 +68,7 @@ def __init__(self, msg, path_to_item=None):
class ApiAttributeError(OpenApiException, AttributeError):
- def __init__(self, msg, path_to_item=None):
+ def __init__(self, msg, path_to_item=None) -> None:
"""
Raised when an attribute reference or assignment fails.
@@ -81,7 +87,7 @@ def __init__(self, msg, path_to_item=None):
class ApiKeyError(OpenApiException, KeyError):
- def __init__(self, msg, path_to_item=None):
+ def __init__(self, msg, path_to_item=None) -> None:
"""
Args:
msg (str): the exception message
@@ -99,17 +105,56 @@ def __init__(self, msg, path_to_item=None):
class ApiException(OpenApiException):
- def __init__(self, status=None, reason=None, http_resp=None):
+ def __init__(
+ self,
+ status=None,
+ reason=None,
+ http_resp=None,
+ *,
+ body: Optional[str] = None,
+ data: Optional[Any] = None,
+ ) -> None:
+ self.status = status
+ self.reason = reason
+ self.body = body
+ self.data = data
+ self.headers = None
+
if http_resp:
- self.status = http_resp.status
- self.reason = http_resp.reason
- self.body = http_resp.data
+ if self.status is None:
+ self.status = http_resp.status
+ if self.reason is None:
+ self.reason = http_resp.reason
+ if self.body is None:
+ try:
+ self.body = http_resp.data.decode('utf-8')
+ except Exception:
+ pass
self.headers = http_resp.getheaders()
- else:
- self.status = status
- self.reason = reason
- self.body = None
- self.headers = None
+
+ @classmethod
+ def from_response(
+ cls,
+ *,
+ http_resp,
+ body: Optional[str],
+ data: Optional[Any],
+ ) -> Self:
+ if http_resp.status == 400:
+ raise BadRequestException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 401:
+ raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 403:
+ raise ForbiddenException(http_resp=http_resp, body=body, data=data)
+
+ if http_resp.status == 404:
+ raise NotFoundException(http_resp=http_resp, body=body, data=data)
+
+ if 500 <= http_resp.status <= 599:
+ raise ServiceException(http_resp=http_resp, body=body, data=data)
+ raise ApiException(http_resp=http_resp, body=body, data=data)
def __str__(self):
"""Custom error messages for exception"""
@@ -119,34 +164,30 @@ def __str__(self):
error_message += "HTTP response headers: {0}\n".format(
self.headers)
- if self.body:
- error_message += "HTTP response body: {0}\n".format(self.body)
+ if self.data or self.body:
+ error_message += "HTTP response body: {0}\n".format(self.data or self.body)
return error_message
-class NotFoundException(ApiException):
+class BadRequestException(ApiException):
+ pass
+
- def __init__(self, status=None, reason=None, http_resp=None):
- super(NotFoundException, self).__init__(status, reason, http_resp)
+class NotFoundException(ApiException):
+ pass
class UnauthorizedException(ApiException):
-
- def __init__(self, status=None, reason=None, http_resp=None):
- super(UnauthorizedException, self).__init__(status, reason, http_resp)
+ pass
class ForbiddenException(ApiException):
-
- def __init__(self, status=None, reason=None, http_resp=None):
- super(ForbiddenException, self).__init__(status, reason, http_resp)
+ pass
class ServiceException(ApiException):
-
- def __init__(self, status=None, reason=None, http_resp=None):
- super(ServiceException, self).__init__(status, reason, http_resp)
+ pass
def render_path(path_to_item):
diff --git a/data_bridges_client/model/__init__.py b/data_bridges_client/model/__init__.py
deleted file mode 100644
index cfe32b7..0000000
--- a/data_bridges_client/model/__init__.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# we can not import model classes here because that would create a circular
-# reference which would not work in python2
-# do not import all models into this module because that uses a lot of memory and stack frames
-# if you need the ability to import all models from one package, import them with
-# from {{packageName}.models import ModelA, ModelB
diff --git a/data_bridges_client/model/bad_request_dto.py b/data_bridges_client/model/bad_request_dto.py
deleted file mode 100644
index d0f021a..0000000
--- a/data_bridges_client/model/bad_request_dto.py
+++ /dev/null
@@ -1,256 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class BadRequestDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'error': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'error': 'error', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """BadRequestDTO - 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,)
- error (str, none_type): The error message returned by the application. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """BadRequestDTO - 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,)
- error (str, none_type): The error message returned by the application. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/commodity_dto.py b/data_bridges_client/model/commodity_dto.py
deleted file mode 100644
index 910de91..0000000
--- a/data_bridges_client/model/commodity_dto.py
+++ /dev/null
@@ -1,300 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.commodity_processing_dto import CommodityProcessingDTO
- from data_bridges_client.model.commodity_quality_dto import CommodityQualityDTO
- globals()['CommodityProcessingDTO'] = CommodityProcessingDTO
- globals()['CommodityQualityDTO'] = CommodityQualityDTO
-
-
-class CommodityDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'category_id': (int,), # noqa: E501
- 'coicop2018': (str, none_type,), # noqa: E501
- 'create_date': (datetime,), # noqa: E501
- 'id': (int,), # noqa: E501
- 'name': (str, none_type,), # noqa: E501
- 'parent_id': (int, none_type,), # noqa: E501
- 'processing': ([CommodityProcessingDTO], none_type,), # noqa: E501
- 'qualities': ([CommodityQualityDTO], none_type,), # noqa: E501
- 'supply': (int, none_type,), # noqa: E501
- 'update_date': (datetime, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'category_id': 'categoryId', # noqa: E501
- 'coicop2018': 'coicop2018', # noqa: E501
- 'create_date': 'createDate', # noqa: E501
- 'id': 'id', # noqa: E501
- 'name': 'name', # noqa: E501
- 'parent_id': 'parentId', # noqa: E501
- 'processing': 'processing', # noqa: E501
- 'qualities': 'qualities', # noqa: E501
- 'supply': 'supply', # noqa: E501
- 'update_date': 'updateDate', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """CommodityDTO - 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_id (int): [optional] # noqa: E501
- coicop2018 (str, none_type): The COICOP 2018 definition. [optional] # noqa: E501
- create_date (datetime): [optional] # noqa: E501
- id (int): The internal ID of the commodity. [optional] # noqa: E501
- name (str, none_type): The name of the commodity. [optional] # noqa: E501
- parent_id (int, none_type): The internal parent ID of the commodity. [optional] # noqa: E501
- processing ([CommodityProcessingDTO], none_type): [optional] # noqa: E501
- qualities ([CommodityQualityDTO], none_type): [optional] # noqa: E501
- supply (int, none_type): [optional] # noqa: E501
- update_date (datetime, 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CommodityDTO - 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_id (int): [optional] # noqa: E501
- coicop2018 (str, none_type): The COICOP 2018 definition. [optional] # noqa: E501
- create_date (datetime): [optional] # noqa: E501
- id (int): The internal ID of the commodity. [optional] # noqa: E501
- name (str, none_type): The name of the commodity. [optional] # noqa: E501
- parent_id (int, none_type): The internal parent ID of the commodity. [optional] # noqa: E501
- processing ([CommodityProcessingDTO], none_type): [optional] # noqa: E501
- qualities ([CommodityQualityDTO], none_type): [optional] # noqa: E501
- supply (int, none_type): [optional] # noqa: E501
- update_date (datetime, 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/commodity_price_dto.py b/data_bridges_client/model/commodity_price_dto.py
deleted file mode 100644
index 298a599..0000000
--- a/data_bridges_client/model/commodity_price_dto.py
+++ /dev/null
@@ -1,356 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class CommodityPriceDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int,), # noqa: E501
- 'commodity_id': (int,), # noqa: E501
- 'commodity_name': (str, none_type,), # noqa: E501
- 'commodity_price': (float,), # noqa: E501
- 'commodity_price_date': (datetime,), # noqa: E501
- 'commodity_price_date_day': (int, none_type,), # noqa: E501
- 'commodity_price_date_month': (int, none_type,), # noqa: E501
- 'commodity_price_date_week': (int, none_type,), # noqa: E501
- 'commodity_price_date_year': (int,), # noqa: E501
- 'commodity_price_flag': (str, none_type,), # noqa: E501
- 'commodity_price_insert_date': (datetime, none_type,), # noqa: E501
- 'commodity_price_metadata': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
- 'commodity_price_observations': (int, none_type,), # noqa: E501
- 'commodity_price_source_name': (str, none_type,), # noqa: E501
- 'commodity_unit_id': (int,), # noqa: E501
- 'country_iso3': (str, none_type,), # noqa: E501
- 'country_name': (str, none_type,), # noqa: E501
- 'currency_id': (int,), # noqa: E501
- 'currency_name': (str, none_type,), # noqa: E501
- 'id': (int,), # noqa: E501
- 'market_id': (int,), # noqa: E501
- 'market_name': (str, none_type,), # noqa: E501
- 'original_frequency': (str, none_type,), # noqa: E501
- 'price_type_id': (int,), # noqa: E501
- 'price_type_name': (str, none_type,), # noqa: E501
- 'unit_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'commodity_id': 'commodityId', # noqa: E501
- 'commodity_name': 'commodityName', # noqa: E501
- 'commodity_price': 'commodityPrice', # noqa: E501
- 'commodity_price_date': 'commodityPriceDate', # noqa: E501
- 'commodity_price_date_day': 'commodityPriceDateDay', # noqa: E501
- 'commodity_price_date_month': 'commodityPriceDateMonth', # noqa: E501
- 'commodity_price_date_week': 'commodityPriceDateWeek', # noqa: E501
- 'commodity_price_date_year': 'commodityPriceDateYear', # noqa: E501
- 'commodity_price_flag': 'commodityPriceFlag', # noqa: E501
- 'commodity_price_insert_date': 'commodityPriceInsertDate', # noqa: E501
- 'commodity_price_metadata': 'commodityPriceMetadata', # noqa: E501
- 'commodity_price_observations': 'commodityPriceObservations', # noqa: E501
- 'commodity_price_source_name': 'commodityPriceSourceName', # noqa: E501
- 'commodity_unit_id': 'commodityUnitId', # noqa: E501
- 'country_iso3': 'countryISO3', # noqa: E501
- 'country_name': 'countryName', # noqa: E501
- 'currency_id': 'currencyId', # noqa: E501
- 'currency_name': 'currencyName', # noqa: E501
- 'id': 'id', # noqa: E501
- 'market_id': 'marketId', # noqa: E501
- 'market_name': 'marketName', # noqa: E501
- 'original_frequency': 'originalFrequency', # noqa: E501
- 'price_type_id': 'priceTypeId', # noqa: E501
- 'price_type_name': 'priceTypeName', # noqa: E501
- 'unit_name': 'unitName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """CommodityPriceDTO - 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,)
- adm0_code (int): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price (float): [optional] # noqa: E501
- commodity_price_date (datetime): [optional] # noqa: E501
- commodity_price_date_day (int, none_type): [optional] # noqa: E501
- commodity_price_date_month (int, none_type): [optional] # noqa: E501
- commodity_price_date_week (int, none_type): [optional] # noqa: E501
- commodity_price_date_year (int): [optional] # noqa: E501
- commodity_price_flag (str, none_type): [optional] # noqa: E501
- commodity_price_insert_date (datetime, none_type): [optional] # noqa: E501
- commodity_price_metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
- commodity_price_observations (int, none_type): [optional] # noqa: E501
- commodity_price_source_name (str, none_type): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- id (int): The internal ID of the commodity. [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- original_frequency (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (str, none_type): [optional] # noqa: E501
- unit_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CommodityPriceDTO - 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,)
- adm0_code (int): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price (float): [optional] # noqa: E501
- commodity_price_date (datetime): [optional] # noqa: E501
- commodity_price_date_day (int, none_type): [optional] # noqa: E501
- commodity_price_date_month (int, none_type): [optional] # noqa: E501
- commodity_price_date_week (int, none_type): [optional] # noqa: E501
- commodity_price_date_year (int): [optional] # noqa: E501
- commodity_price_flag (str, none_type): [optional] # noqa: E501
- commodity_price_insert_date (datetime, none_type): [optional] # noqa: E501
- commodity_price_metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
- commodity_price_observations (int, none_type): [optional] # noqa: E501
- commodity_price_source_name (str, none_type): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- id (int): The internal ID of the commodity. [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- original_frequency (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (str, none_type): [optional] # noqa: E501
- unit_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/commodity_processing_dto.py b/data_bridges_client/model/commodity_processing_dto.py
deleted file mode 100644
index 40a7557..0000000
--- a/data_bridges_client/model/commodity_processing_dto.py
+++ /dev/null
@@ -1,260 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class CommodityProcessingDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'id': (int,), # noqa: E501
- 'name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'id': 'id', # noqa: E501
- '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
- """CommodityProcessingDTO - 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 (int): The internal ID of the commodity. [optional] # noqa: E501
- name (str, none_type): The name of the process. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CommodityProcessingDTO - 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 (int): The internal ID of the commodity. [optional] # noqa: E501
- name (str, none_type): The name of the process. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/commodity_quality_dto.py b/data_bridges_client/model/commodity_quality_dto.py
deleted file mode 100644
index 40f3389..0000000
--- a/data_bridges_client/model/commodity_quality_dto.py
+++ /dev/null
@@ -1,260 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class CommodityQualityDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'id': (int,), # noqa: E501
- 'name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'id': 'id', # noqa: E501
- '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
- """CommodityQualityDTO - 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 (int): The internal ID of the commodity. [optional] # noqa: E501
- name (str, none_type): The name of the commodity. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CommodityQualityDTO - 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 (int): The internal ID of the commodity. [optional] # noqa: E501
- name (str, none_type): The name of the commodity. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/coordinate.py b/data_bridges_client/model/coordinate.py
deleted file mode 100644
index 4eda711..0000000
--- a/data_bridges_client/model/coordinate.py
+++ /dev/null
@@ -1,272 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class Coordinate(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'coordinate_value': (Coordinate,), # noqa: E501
- 'm': (float,), # noqa: E501
- 'x': (float,), # noqa: E501
- 'y': (float,), # noqa: E501
- 'z': (float,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'coordinate_value': 'coordinateValue', # noqa: E501
- 'm': 'm', # noqa: E501
- 'x': 'x', # noqa: E501
- 'y': 'y', # noqa: E501
- 'z': 'z', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """Coordinate - 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,)
- coordinate_value (Coordinate): [optional] # noqa: E501
- m (float): [optional] # noqa: E501
- x (float): [optional] # noqa: E501
- y (float): [optional] # noqa: E501
- z (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """Coordinate - 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,)
- coordinate_value (Coordinate): [optional] # noqa: E501
- m (float): [optional] # noqa: E501
- x (float): [optional] # noqa: E501
- y (float): [optional] # noqa: E501
- z (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/coordinate_equality_comparer.py b/data_bridges_client/model/coordinate_equality_comparer.py
deleted file mode 100644
index 3c5d17a..0000000
--- a/data_bridges_client/model/coordinate_equality_comparer.py
+++ /dev/null
@@ -1,252 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class CoordinateEqualityComparer(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """CoordinateEqualityComparer - 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,)
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CoordinateEqualityComparer - 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,)
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/coordinate_sequence.py b/data_bridges_client/model/coordinate_sequence.py
deleted file mode 100644
index d9b7946..0000000
--- a/data_bridges_client/model/coordinate_sequence.py
+++ /dev/null
@@ -1,302 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.ordinates import Ordinates
- globals()['Ordinates'] = Ordinates
-
-
-class CoordinateSequence(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'count': (int,), # noqa: E501
- 'dimension': (int,), # noqa: E501
- 'has_m': (bool,), # noqa: E501
- 'has_z': (bool,), # noqa: E501
- 'm_ordinate_index': (int,), # noqa: E501
- 'measures': (int,), # noqa: E501
- 'ordinates': (Ordinates,), # noqa: E501
- 'spatial': (int,), # noqa: E501
- 'z_ordinate_index': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'count': 'count', # noqa: E501
- 'dimension': 'dimension', # noqa: E501
- 'has_m': 'hasM', # noqa: E501
- 'has_z': 'hasZ', # noqa: E501
- 'm_ordinate_index': 'mOrdinateIndex', # noqa: E501
- 'measures': 'measures', # noqa: E501
- 'ordinates': 'ordinates', # noqa: E501
- 'spatial': 'spatial', # noqa: E501
- 'z_ordinate_index': 'zOrdinateIndex', # noqa: E501
- }
-
- read_only_vars = {
- 'count', # noqa: E501
- 'dimension', # noqa: E501
- 'has_m', # noqa: E501
- 'has_z', # noqa: E501
- 'm_ordinate_index', # noqa: E501
- 'measures', # noqa: E501
- 'spatial', # noqa: E501
- 'z_ordinate_index', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """CoordinateSequence - 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,)
- count (int): [optional] # noqa: E501
- dimension (int): [optional] # noqa: E501
- has_m (bool): [optional] # noqa: E501
- has_z (bool): [optional] # noqa: E501
- m_ordinate_index (int): [optional] # noqa: E501
- measures (int): [optional] # noqa: E501
- ordinates (Ordinates): [optional] # noqa: E501
- spatial (int): [optional] # noqa: E501
- z_ordinate_index (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CoordinateSequence - 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,)
- count (int): [optional] # noqa: E501
- dimension (int): [optional] # noqa: E501
- has_m (bool): [optional] # noqa: E501
- has_z (bool): [optional] # noqa: E501
- m_ordinate_index (int): [optional] # noqa: E501
- measures (int): [optional] # noqa: E501
- ordinates (Ordinates): [optional] # noqa: E501
- spatial (int): [optional] # noqa: E501
- z_ordinate_index (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/coordinate_sequence_factory.py b/data_bridges_client/model/coordinate_sequence_factory.py
deleted file mode 100644
index c555e90..0000000
--- a/data_bridges_client/model/coordinate_sequence_factory.py
+++ /dev/null
@@ -1,262 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.ordinates import Ordinates
- globals()['Ordinates'] = Ordinates
-
-
-class CoordinateSequenceFactory(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'ordinates': (Ordinates,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'ordinates': 'ordinates', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """CoordinateSequenceFactory - 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,)
- ordinates (Ordinates): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CoordinateSequenceFactory - 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,)
- ordinates (Ordinates): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/currency_dto.py b/data_bridges_client/model/currency_dto.py
deleted file mode 100644
index 331ae9f..0000000
--- a/data_bridges_client/model/currency_dto.py
+++ /dev/null
@@ -1,272 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class CurrencyDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'create_date': (datetime,), # noqa: E501
- 'extended_name': (str, none_type,), # noqa: E501
- 'id': (int,), # noqa: E501
- 'name': (str, none_type,), # noqa: E501
- 'update_date': (datetime, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'create_date': 'createDate', # noqa: E501
- 'extended_name': 'extendedName', # noqa: E501
- 'id': 'id', # noqa: E501
- 'name': 'name', # noqa: E501
- 'update_date': 'updateDate', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """CurrencyDTO - 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,)
- create_date (datetime): [optional] # noqa: E501
- extended_name (str, none_type): [optional] # noqa: E501
- id (int): The internal ID of the unit. [optional] # noqa: E501
- name (str, none_type): The name of the unit. [optional] # noqa: E501
- update_date (datetime, 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """CurrencyDTO - 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,)
- create_date (datetime): [optional] # noqa: E501
- extended_name (str, none_type): [optional] # noqa: E501
- id (int): The internal ID of the unit. [optional] # noqa: E501
- name (str, none_type): The name of the unit. [optional] # noqa: E501
- update_date (datetime, 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/dimension.py b/data_bridges_client/model/dimension.py
deleted file mode 100644
index 213d4ae..0000000
--- a/data_bridges_client/model/dimension.py
+++ /dev/null
@@ -1,288 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class Dimension(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 = {
- ('value',): {
- '0': 0,
- '1': 1,
- '2': 2,
- '3': 3,
- '-3': -3,
- '-2': -2,
- '-1': -1,
- },
- }
-
- validations = {
- }
-
- additional_properties_type = None
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'value': (int,),
- }
-
- @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):
- """Dimension - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [0, 1, 2, 3, -3, -2, -1, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [0, 1, 2, 3, -3, -2, -1, ] # 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):
- """Dimension - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [0, 1, 2, 3, -3, -2, -1, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [0, 1, 2, 3, -3, -2, -1, ] # 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/data_bridges_client/model/economic_indicator_property.py b/data_bridges_client/model/economic_indicator_property.py
deleted file mode 100644
index eceb621..0000000
--- a/data_bridges_client/model/economic_indicator_property.py
+++ /dev/null
@@ -1,284 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class EconomicIndicatorProperty(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'country_iso3': (str, none_type,), # noqa: E501
- 'data_source': (str, none_type,), # noqa: E501
- 'frequency': (str, none_type,), # noqa: E501
- 'id': (int,), # noqa: E501
- 'latest_value': (float,), # noqa: E501
- 'latest_value_date': (datetime,), # noqa: E501
- 'name': (str, none_type,), # noqa: E501
- 'unit': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'country_iso3': 'countryIso3', # noqa: E501
- 'data_source': 'dataSource', # noqa: E501
- 'frequency': 'frequency', # noqa: E501
- 'id': 'id', # noqa: E501
- 'latest_value': 'latestValue', # noqa: E501
- 'latest_value_date': 'latestValueDate', # noqa: E501
- 'name': 'name', # noqa: E501
- 'unit': 'unit', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """EconomicIndicatorProperty - 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,)
- country_iso3 (str, none_type): [optional] # noqa: E501
- data_source (str, none_type): [optional] # noqa: E501
- frequency (str, none_type): [optional] # noqa: E501
- id (int): [optional] # noqa: E501
- latest_value (float): [optional] # noqa: E501
- latest_value_date (datetime): [optional] # noqa: E501
- name (str, none_type): [optional] # noqa: E501
- unit (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """EconomicIndicatorProperty - 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,)
- country_iso3 (str, none_type): [optional] # noqa: E501
- data_source (str, none_type): [optional] # noqa: E501
- frequency (str, none_type): [optional] # noqa: E501
- id (int): [optional] # noqa: E501
- latest_value (float): [optional] # noqa: E501
- latest_value_date (datetime): [optional] # noqa: E501
- name (str, none_type): [optional] # noqa: E501
- unit (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/economic_indicator_property_paged_result.py b/data_bridges_client/model/economic_indicator_property_paged_result.py
deleted file mode 100644
index 17e0021..0000000
--- a/data_bridges_client/model/economic_indicator_property_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.economic_indicator_property import EconomicIndicatorProperty
- globals()['EconomicIndicatorProperty'] = EconomicIndicatorProperty
-
-
-class EconomicIndicatorPropertyPagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([EconomicIndicatorProperty], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """EconomicIndicatorPropertyPagedResult - 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,)
- items ([EconomicIndicatorProperty], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """EconomicIndicatorPropertyPagedResult - 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,)
- items ([EconomicIndicatorProperty], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/envelope.py b/data_bridges_client/model/envelope.py
deleted file mode 100644
index 6c64025..0000000
--- a/data_bridges_client/model/envelope.py
+++ /dev/null
@@ -1,317 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.coordinate import Coordinate
- globals()['Coordinate'] = Coordinate
-
-
-class Envelope(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'area': (float,), # noqa: E501
- 'centre': (Coordinate,), # noqa: E501
- 'diameter': (float,), # noqa: E501
- 'height': (float,), # noqa: E501
- 'is_null': (bool,), # noqa: E501
- 'max_extent': (float,), # noqa: E501
- 'max_x': (float,), # noqa: E501
- 'max_y': (float,), # noqa: E501
- 'min_extent': (float,), # noqa: E501
- 'min_x': (float,), # noqa: E501
- 'min_y': (float,), # noqa: E501
- 'width': (float,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'area': 'area', # noqa: E501
- 'centre': 'centre', # noqa: E501
- 'diameter': 'diameter', # noqa: E501
- 'height': 'height', # noqa: E501
- 'is_null': 'isNull', # noqa: E501
- 'max_extent': 'maxExtent', # noqa: E501
- 'max_x': 'maxX', # noqa: E501
- 'max_y': 'maxY', # noqa: E501
- 'min_extent': 'minExtent', # noqa: E501
- 'min_x': 'minX', # noqa: E501
- 'min_y': 'minY', # noqa: E501
- 'width': 'width', # noqa: E501
- }
-
- read_only_vars = {
- 'area', # noqa: E501
- 'diameter', # noqa: E501
- 'height', # noqa: E501
- 'is_null', # noqa: E501
- 'max_extent', # noqa: E501
- 'max_x', # noqa: E501
- 'max_y', # noqa: E501
- 'min_extent', # noqa: E501
- 'min_x', # noqa: E501
- 'min_y', # noqa: E501
- 'width', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """Envelope - 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,)
- area (float): [optional] # noqa: E501
- centre (Coordinate): [optional] # noqa: E501
- diameter (float): [optional] # noqa: E501
- height (float): [optional] # noqa: E501
- is_null (bool): [optional] # noqa: E501
- max_extent (float): [optional] # noqa: E501
- max_x (float): [optional] # noqa: E501
- max_y (float): [optional] # noqa: E501
- min_extent (float): [optional] # noqa: E501
- min_x (float): [optional] # noqa: E501
- min_y (float): [optional] # noqa: E501
- width (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """Envelope - 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,)
- area (float): [optional] # noqa: E501
- centre (Coordinate): [optional] # noqa: E501
- diameter (float): [optional] # noqa: E501
- height (float): [optional] # noqa: E501
- is_null (bool): [optional] # noqa: E501
- max_extent (float): [optional] # noqa: E501
- max_x (float): [optional] # noqa: E501
- max_y (float): [optional] # noqa: E501
- min_extent (float): [optional] # noqa: E501
- min_x (float): [optional] # noqa: E501
- min_y (float): [optional] # noqa: E501
- width (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/geometry.py b/data_bridges_client/model/geometry.py
deleted file mode 100644
index e293d8f..0000000
--- a/data_bridges_client/model/geometry.py
+++ /dev/null
@@ -1,376 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.coordinate import Coordinate
- from data_bridges_client.model.dimension import Dimension
- from data_bridges_client.model.envelope import Envelope
- from data_bridges_client.model.geometry_factory import GeometryFactory
- from data_bridges_client.model.ogc_geometry_type import OgcGeometryType
- from data_bridges_client.model.point import Point
- from data_bridges_client.model.precision_model import PrecisionModel
- globals()['Coordinate'] = Coordinate
- globals()['Dimension'] = Dimension
- globals()['Envelope'] = Envelope
- globals()['GeometryFactory'] = GeometryFactory
- globals()['OgcGeometryType'] = OgcGeometryType
- globals()['Point'] = Point
- globals()['PrecisionModel'] = PrecisionModel
-
-
-class Geometry(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'area': (float,), # noqa: E501
- 'boundary': (Geometry,), # noqa: E501
- 'boundary_dimension': (Dimension,), # noqa: E501
- 'centroid': (Point,), # noqa: E501
- 'coordinate': (Coordinate,), # noqa: E501
- 'coordinates': ([Coordinate], none_type,), # noqa: E501
- 'dimension': (Dimension,), # noqa: E501
- 'envelope': (Geometry,), # noqa: E501
- 'envelope_internal': (Envelope,), # noqa: E501
- 'factory': (GeometryFactory,), # noqa: E501
- 'geometry_type': (str, none_type,), # noqa: E501
- 'interior_point': (Point,), # noqa: E501
- 'is_empty': (bool,), # noqa: E501
- 'is_rectangle': (bool,), # noqa: E501
- 'is_simple': (bool,), # noqa: E501
- 'is_valid': (bool,), # noqa: E501
- 'length': (float,), # noqa: E501
- 'num_geometries': (int,), # noqa: E501
- 'num_points': (int,), # noqa: E501
- 'ogc_geometry_type': (OgcGeometryType,), # noqa: E501
- 'point_on_surface': (Point,), # noqa: E501
- 'precision_model': (PrecisionModel,), # noqa: E501
- 'srid': (int,), # noqa: E501
- 'user_data': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'area': 'area', # noqa: E501
- 'boundary': 'boundary', # noqa: E501
- 'boundary_dimension': 'boundaryDimension', # noqa: E501
- 'centroid': 'centroid', # noqa: E501
- 'coordinate': 'coordinate', # noqa: E501
- 'coordinates': 'coordinates', # noqa: E501
- 'dimension': 'dimension', # noqa: E501
- 'envelope': 'envelope', # noqa: E501
- 'envelope_internal': 'envelopeInternal', # noqa: E501
- 'factory': 'factory', # noqa: E501
- 'geometry_type': 'geometryType', # noqa: E501
- 'interior_point': 'interiorPoint', # noqa: E501
- 'is_empty': 'isEmpty', # noqa: E501
- 'is_rectangle': 'isRectangle', # noqa: E501
- 'is_simple': 'isSimple', # noqa: E501
- 'is_valid': 'isValid', # noqa: E501
- 'length': 'length', # noqa: E501
- 'num_geometries': 'numGeometries', # noqa: E501
- 'num_points': 'numPoints', # noqa: E501
- 'ogc_geometry_type': 'ogcGeometryType', # noqa: E501
- 'point_on_surface': 'pointOnSurface', # noqa: E501
- 'precision_model': 'precisionModel', # noqa: E501
- 'srid': 'srid', # noqa: E501
- 'user_data': 'userData', # noqa: E501
- }
-
- read_only_vars = {
- 'area', # noqa: E501
- 'coordinates', # noqa: E501
- 'geometry_type', # noqa: E501
- 'is_empty', # noqa: E501
- 'is_rectangle', # noqa: E501
- 'is_simple', # noqa: E501
- 'is_valid', # noqa: E501
- 'length', # noqa: E501
- 'num_geometries', # noqa: E501
- 'num_points', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """Geometry - 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,)
- area (float): [optional] # noqa: E501
- boundary (Geometry): [optional] # noqa: E501
- boundary_dimension (Dimension): [optional] # noqa: E501
- centroid (Point): [optional] # noqa: E501
- coordinate (Coordinate): [optional] # noqa: E501
- coordinates ([Coordinate], none_type): [optional] # noqa: E501
- dimension (Dimension): [optional] # noqa: E501
- envelope (Geometry): [optional] # noqa: E501
- envelope_internal (Envelope): [optional] # noqa: E501
- factory (GeometryFactory): [optional] # noqa: E501
- geometry_type (str, none_type): [optional] # noqa: E501
- interior_point (Point): [optional] # noqa: E501
- is_empty (bool): [optional] # noqa: E501
- is_rectangle (bool): [optional] # noqa: E501
- is_simple (bool): [optional] # noqa: E501
- is_valid (bool): [optional] # noqa: E501
- length (float): [optional] # noqa: E501
- num_geometries (int): [optional] # noqa: E501
- num_points (int): [optional] # noqa: E501
- ogc_geometry_type (OgcGeometryType): [optional] # noqa: E501
- point_on_surface (Point): [optional] # noqa: E501
- precision_model (PrecisionModel): [optional] # noqa: E501
- srid (int): [optional] # noqa: E501
- user_data (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """Geometry - 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,)
- area (float): [optional] # noqa: E501
- boundary (Geometry): [optional] # noqa: E501
- boundary_dimension (Dimension): [optional] # noqa: E501
- centroid (Point): [optional] # noqa: E501
- coordinate (Coordinate): [optional] # noqa: E501
- coordinates ([Coordinate], none_type): [optional] # noqa: E501
- dimension (Dimension): [optional] # noqa: E501
- envelope (Geometry): [optional] # noqa: E501
- envelope_internal (Envelope): [optional] # noqa: E501
- factory (GeometryFactory): [optional] # noqa: E501
- geometry_type (str, none_type): [optional] # noqa: E501
- interior_point (Point): [optional] # noqa: E501
- is_empty (bool): [optional] # noqa: E501
- is_rectangle (bool): [optional] # noqa: E501
- is_simple (bool): [optional] # noqa: E501
- is_valid (bool): [optional] # noqa: E501
- length (float): [optional] # noqa: E501
- num_geometries (int): [optional] # noqa: E501
- num_points (int): [optional] # noqa: E501
- ogc_geometry_type (OgcGeometryType): [optional] # noqa: E501
- point_on_surface (Point): [optional] # noqa: E501
- precision_model (PrecisionModel): [optional] # noqa: E501
- srid (int): [optional] # noqa: E501
- user_data (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/geometry_factory.py b/data_bridges_client/model/geometry_factory.py
deleted file mode 100644
index 1228cce..0000000
--- a/data_bridges_client/model/geometry_factory.py
+++ /dev/null
@@ -1,278 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.coordinate_sequence_factory import CoordinateSequenceFactory
- from data_bridges_client.model.nts_geometry_services import NtsGeometryServices
- from data_bridges_client.model.precision_model import PrecisionModel
- globals()['CoordinateSequenceFactory'] = CoordinateSequenceFactory
- globals()['NtsGeometryServices'] = NtsGeometryServices
- globals()['PrecisionModel'] = PrecisionModel
-
-
-class GeometryFactory(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'coordinate_sequence_factory': (CoordinateSequenceFactory,), # noqa: E501
- 'geometry_services': (NtsGeometryServices,), # noqa: E501
- 'precision_model': (PrecisionModel,), # noqa: E501
- 'srid': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'coordinate_sequence_factory': 'coordinateSequenceFactory', # noqa: E501
- 'geometry_services': 'geometryServices', # noqa: E501
- 'precision_model': 'precisionModel', # noqa: E501
- 'srid': 'srid', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """GeometryFactory - 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,)
- coordinate_sequence_factory (CoordinateSequenceFactory): [optional] # noqa: E501
- geometry_services (NtsGeometryServices): [optional] # noqa: E501
- precision_model (PrecisionModel): [optional] # noqa: E501
- srid (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """GeometryFactory - 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,)
- coordinate_sequence_factory (CoordinateSequenceFactory): [optional] # noqa: E501
- geometry_services (NtsGeometryServices): [optional] # noqa: E501
- precision_model (PrecisionModel): [optional] # noqa: E501
- srid (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/geometry_overlay.py b/data_bridges_client/model/geometry_overlay.py
deleted file mode 100644
index f4902d7..0000000
--- a/data_bridges_client/model/geometry_overlay.py
+++ /dev/null
@@ -1,252 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class GeometryOverlay(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """GeometryOverlay - 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,)
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """GeometryOverlay - 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,)
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/gorp_value_with_changes.py b/data_bridges_client/model/gorp_value_with_changes.py
deleted file mode 100644
index 7d8497e..0000000
--- a/data_bridges_client/model/gorp_value_with_changes.py
+++ /dev/null
@@ -1,288 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class GorpValueWithChanges(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'absolute_change': (float,), # noqa: E501
- 'actual_value': (float,), # noqa: E501
- 'baseline_value': (float,), # noqa: E501
- 'comments': (str, none_type,), # noqa: E501
- 'month': (str, none_type,), # noqa: E501
- 'number_of_countries': (int,), # noqa: E501
- 'percentage_change': (float,), # noqa: E501
- 'region_name': (str, none_type,), # noqa: E501
- 'year': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'absolute_change': 'absoluteChange', # noqa: E501
- 'actual_value': 'actualValue', # noqa: E501
- 'baseline_value': 'baselineValue', # noqa: E501
- 'comments': 'comments', # noqa: E501
- 'month': 'month', # noqa: E501
- 'number_of_countries': 'numberOfCountries', # noqa: E501
- 'percentage_change': 'percentageChange', # noqa: E501
- 'region_name': 'regionName', # noqa: E501
- 'year': 'year', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """GorpValueWithChanges - 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,)
- absolute_change (float): [optional] # noqa: E501
- actual_value (float): [optional] # noqa: E501
- baseline_value (float): [optional] # noqa: E501
- comments (str, none_type): [optional] # noqa: E501
- month (str, none_type): [optional] # noqa: E501
- number_of_countries (int): [optional] # noqa: E501
- percentage_change (float): [optional] # noqa: E501
- region_name (str, none_type): [optional] # noqa: E501
- year (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """GorpValueWithChanges - 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,)
- absolute_change (float): [optional] # noqa: E501
- actual_value (float): [optional] # noqa: E501
- baseline_value (float): [optional] # noqa: E501
- comments (str, none_type): [optional] # noqa: E501
- month (str, none_type): [optional] # noqa: E501
- number_of_countries (int): [optional] # noqa: E501
- percentage_change (float): [optional] # noqa: E501
- region_name (str, none_type): [optional] # noqa: E501
- year (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/gorp_value_with_changes_paged_result.py b/data_bridges_client/model/gorp_value_with_changes_paged_result.py
deleted file mode 100644
index 06f1175..0000000
--- a/data_bridges_client/model/gorp_value_with_changes_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.gorp_value_with_changes import GorpValueWithChanges
- globals()['GorpValueWithChanges'] = GorpValueWithChanges
-
-
-class GorpValueWithChangesPagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([GorpValueWithChanges], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """GorpValueWithChangesPagedResult - 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,)
- items ([GorpValueWithChanges], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """GorpValueWithChangesPagedResult - 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,)
- items ([GorpValueWithChanges], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/i_attributes_table.py b/data_bridges_client/model/i_attributes_table.py
deleted file mode 100644
index 8a96755..0000000
--- a/data_bridges_client/model/i_attributes_table.py
+++ /dev/null
@@ -1,257 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class IAttributesTable(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'count': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'count': 'count', # noqa: E501
- }
-
- read_only_vars = {
- 'count', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """IAttributesTable - 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,)
- count (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """IAttributesTable - 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,)
- count (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/i_feature.py b/data_bridges_client/model/i_feature.py
deleted file mode 100644
index 1a57591..0000000
--- a/data_bridges_client/model/i_feature.py
+++ /dev/null
@@ -1,274 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.envelope import Envelope
- from data_bridges_client.model.geometry import Geometry
- from data_bridges_client.model.i_attributes_table import IAttributesTable
- globals()['Envelope'] = Envelope
- globals()['Geometry'] = Geometry
- globals()['IAttributesTable'] = IAttributesTable
-
-
-class IFeature(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'attributes': (IAttributesTable,), # noqa: E501
- 'bounding_box': (Envelope,), # noqa: E501
- 'geometry': (Geometry,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'attributes': 'attributes', # noqa: E501
- 'bounding_box': 'boundingBox', # noqa: E501
- 'geometry': 'geometry', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """IFeature - 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,)
- attributes (IAttributesTable): [optional] # noqa: E501
- bounding_box (Envelope): [optional] # noqa: E501
- geometry (Geometry): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """IFeature - 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,)
- attributes (IAttributesTable): [optional] # noqa: E501
- bounding_box (Envelope): [optional] # noqa: E501
- geometry (Geometry): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/ipc_value.py b/data_bridges_client/model/ipc_value.py
deleted file mode 100644
index 96509d2..0000000
--- a/data_bridges_client/model/ipc_value.py
+++ /dev/null
@@ -1,356 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class IpcValue(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- ('ipc_area_name',): {
- 'max_length': 128,
- 'min_length': 0,
- },
- ('ipc_country_name',): {
- 'max_length': 128,
- 'min_length': 0,
- },
- ('ipc_data_source',): {
- 'max_length': 128,
- 'min_length': 0,
- },
- ('ipc_data_type',): {
- 'max_length': 256,
- 'min_length': 0,
- },
- ('ipc_reference_period',): {
- 'max_length': 256,
- 'min_length': 0,
- },
- ('iso3_alpha3',): {
- 'max_length': 3,
- 'min_length': 0,
- },
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'ipc_analysed_percentage': (float, none_type,), # noqa: E501
- 'ipc_analysed_population': (int, none_type,), # noqa: E501
- 'ipc_analysis_comment': (str, none_type,), # noqa: E501
- 'ipc_area_name': (str, none_type,), # noqa: E501
- 'ipc_country_name': (str, none_type,), # noqa: E501
- 'ipc_create_date': (datetime,), # noqa: E501
- 'ipc_data_source': (str, none_type,), # noqa: E501
- 'ipc_data_type': (str, none_type,), # noqa: E501
- 'ipc_id': (int,), # noqa: E501
- 'ipc_is_latest_value': (bool,), # noqa: E501
- 'ipc_phase3_percentage': (float, none_type,), # noqa: E501
- 'ipc_phase3_population': (int, none_type,), # noqa: E501
- 'ipc_phase4_percentage': (float, none_type,), # noqa: E501
- 'ipc_phase4_population': (int, none_type,), # noqa: E501
- 'ipc_phase5_percentage': (float, none_type,), # noqa: E501
- 'ipc_phase5_population': (int, none_type,), # noqa: E501
- 'ipc_reference_period': (str, none_type,), # noqa: E501
- 'ipc_update_date': (datetime, none_type,), # noqa: E501
- 'ipc_year': (int,), # noqa: E501
- 'iso3_alpha3': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'ipc_analysed_percentage': 'ipcAnalysedPercentage', # noqa: E501
- 'ipc_analysed_population': 'ipcAnalysedPopulation', # noqa: E501
- 'ipc_analysis_comment': 'ipcAnalysisComment', # noqa: E501
- 'ipc_area_name': 'ipcAreaName', # noqa: E501
- 'ipc_country_name': 'ipcCountryName', # noqa: E501
- 'ipc_create_date': 'ipcCreateDate', # noqa: E501
- 'ipc_data_source': 'ipcDataSource', # noqa: E501
- 'ipc_data_type': 'ipcDataType', # noqa: E501
- 'ipc_id': 'ipcId', # noqa: E501
- 'ipc_is_latest_value': 'ipcIsLatestValue', # noqa: E501
- 'ipc_phase3_percentage': 'ipcPhase3Percentage', # noqa: E501
- 'ipc_phase3_population': 'ipcPhase3Population', # noqa: E501
- 'ipc_phase4_percentage': 'ipcPhase4Percentage', # noqa: E501
- 'ipc_phase4_population': 'ipcPhase4Population', # noqa: E501
- 'ipc_phase5_percentage': 'ipcPhase5Percentage', # noqa: E501
- 'ipc_phase5_population': 'ipcPhase5Population', # noqa: E501
- 'ipc_reference_period': 'ipcReferencePeriod', # noqa: E501
- 'ipc_update_date': 'ipcUpdateDate', # noqa: E501
- 'ipc_year': 'ipcYear', # noqa: E501
- 'iso3_alpha3': 'iso3Alpha3', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """IpcValue - 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,)
- ipc_analysed_percentage (float, none_type): [optional] # noqa: E501
- ipc_analysed_population (int, none_type): [optional] # noqa: E501
- ipc_analysis_comment (str, none_type): [optional] # noqa: E501
- ipc_area_name (str, none_type): [optional] # noqa: E501
- ipc_country_name (str, none_type): [optional] # noqa: E501
- ipc_create_date (datetime): [optional] # noqa: E501
- ipc_data_source (str, none_type): [optional] # noqa: E501
- ipc_data_type (str, none_type): [optional] # noqa: E501
- ipc_id (int): [optional] # noqa: E501
- ipc_is_latest_value (bool): [optional] # noqa: E501
- ipc_phase3_percentage (float, none_type): [optional] # noqa: E501
- ipc_phase3_population (int, none_type): [optional] # noqa: E501
- ipc_phase4_percentage (float, none_type): [optional] # noqa: E501
- ipc_phase4_population (int, none_type): [optional] # noqa: E501
- ipc_phase5_percentage (float, none_type): [optional] # noqa: E501
- ipc_phase5_population (int, none_type): [optional] # noqa: E501
- ipc_reference_period (str, none_type): [optional] # noqa: E501
- ipc_update_date (datetime, none_type): [optional] # noqa: E501
- ipc_year (int): [optional] # noqa: E501
- iso3_alpha3 (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """IpcValue - 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,)
- ipc_analysed_percentage (float, none_type): [optional] # noqa: E501
- ipc_analysed_population (int, none_type): [optional] # noqa: E501
- ipc_analysis_comment (str, none_type): [optional] # noqa: E501
- ipc_area_name (str, none_type): [optional] # noqa: E501
- ipc_country_name (str, none_type): [optional] # noqa: E501
- ipc_create_date (datetime): [optional] # noqa: E501
- ipc_data_source (str, none_type): [optional] # noqa: E501
- ipc_data_type (str, none_type): [optional] # noqa: E501
- ipc_id (int): [optional] # noqa: E501
- ipc_is_latest_value (bool): [optional] # noqa: E501
- ipc_phase3_percentage (float, none_type): [optional] # noqa: E501
- ipc_phase3_population (int, none_type): [optional] # noqa: E501
- ipc_phase4_percentage (float, none_type): [optional] # noqa: E501
- ipc_phase4_population (int, none_type): [optional] # noqa: E501
- ipc_phase5_percentage (float, none_type): [optional] # noqa: E501
- ipc_phase5_population (int, none_type): [optional] # noqa: E501
- ipc_reference_period (str, none_type): [optional] # noqa: E501
- ipc_update_date (datetime, none_type): [optional] # noqa: E501
- ipc_year (int): [optional] # noqa: E501
- iso3_alpha3 (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/ipc_value_paged_result.py b/data_bridges_client/model/ipc_value_paged_result.py
deleted file mode 100644
index 86e7ae0..0000000
--- a/data_bridges_client/model/ipc_value_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.ipc_value import IpcValue
- globals()['IpcValue'] = IpcValue
-
-
-class IpcValuePagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([IpcValue], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """IpcValuePagedResult - 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,)
- items ([IpcValue], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """IpcValuePagedResult - 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,)
- items ([IpcValue], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/mfi_processed_data_dto.py b/data_bridges_client/model/mfi_processed_data_dto.py
deleted file mode 100644
index 5ed79de..0000000
--- a/data_bridges_client/model/mfi_processed_data_dto.py
+++ /dev/null
@@ -1,356 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class MFIProcessedDataDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int,), # noqa: E501
- 'adm0_name': (str, none_type,), # noqa: E501
- 'adm1_code': (int,), # noqa: E501
- 'adm1_name': (str, none_type,), # noqa: E501
- 'adm2_code': (int,), # noqa: E501
- 'adm2_name': (str, none_type,), # noqa: E501
- 'base_xls_form_id': (int,), # noqa: E501
- 'base_xls_form_name': (str, none_type,), # noqa: E501
- 'dimension_id': (int,), # noqa: E501
- 'dimension_name': (str, none_type,), # noqa: E501
- 'end_date': (datetime, none_type,), # noqa: E501
- 'level_id': (int,), # noqa: E501
- 'level_name': (str, none_type,), # noqa: E501
- 'market_id': (int,), # noqa: E501
- 'market_latitude': (float, none_type,), # noqa: E501
- 'market_longitude': (float, none_type,), # noqa: E501
- 'market_name': (str, none_type,), # noqa: E501
- 'output_value': (float, none_type,), # noqa: E501
- 'regional_bureau_id': (int,), # noqa: E501
- 'regional_bureau_name': (str, none_type,), # noqa: E501
- 'start_date': (datetime, none_type,), # noqa: E501
- 'survey_id': (int,), # noqa: E501
- 'traders_sample_size': (int, none_type,), # noqa: E501
- 'variable_id': (int,), # noqa: E501
- 'variable_label': (str, none_type,), # noqa: E501
- 'variable_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'adm0_name': 'adm0Name', # noqa: E501
- 'adm1_code': 'adm1Code', # noqa: E501
- 'adm1_name': 'adm1Name', # noqa: E501
- 'adm2_code': 'adm2Code', # noqa: E501
- 'adm2_name': 'adm2Name', # noqa: E501
- 'base_xls_form_id': 'baseXlsFormID', # noqa: E501
- 'base_xls_form_name': 'baseXlsFormName', # noqa: E501
- 'dimension_id': 'dimensionID', # noqa: E501
- 'dimension_name': 'dimensionName', # noqa: E501
- 'end_date': 'endDate', # noqa: E501
- 'level_id': 'levelID', # noqa: E501
- 'level_name': 'levelName', # noqa: E501
- 'market_id': 'marketID', # noqa: E501
- 'market_latitude': 'marketLatitude', # noqa: E501
- 'market_longitude': 'marketLongitude', # noqa: E501
- 'market_name': 'marketName', # noqa: E501
- 'output_value': 'outputValue', # noqa: E501
- 'regional_bureau_id': 'regionalBureauID', # noqa: E501
- 'regional_bureau_name': 'regionalBureauName', # noqa: E501
- 'start_date': 'startDate', # noqa: E501
- 'survey_id': 'surveyID', # noqa: E501
- 'traders_sample_size': 'tradersSampleSize', # noqa: E501
- 'variable_id': 'variableID', # noqa: E501
- 'variable_label': 'variableLabel', # noqa: E501
- 'variable_name': 'variableName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """MFIProcessedDataDTO - 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,)
- adm0_code (int): [optional] # noqa: E501
- adm0_name (str, none_type): [optional] # noqa: E501
- adm1_code (int): [optional] # noqa: E501
- adm1_name (str, none_type): [optional] # noqa: E501
- adm2_code (int): [optional] # noqa: E501
- adm2_name (str, none_type): [optional] # noqa: E501
- base_xls_form_id (int): [optional] # noqa: E501
- base_xls_form_name (str, none_type): [optional] # noqa: E501
- dimension_id (int): [optional] # noqa: E501
- dimension_name (str, none_type): [optional] # noqa: E501
- end_date (datetime, none_type): [optional] # noqa: E501
- level_id (int): [optional] # noqa: E501
- level_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_latitude (float, none_type): [optional] # noqa: E501
- market_longitude (float, none_type): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- output_value (float, none_type): [optional] # noqa: E501
- regional_bureau_id (int): [optional] # noqa: E501
- regional_bureau_name (str, none_type): [optional] # noqa: E501
- start_date (datetime, none_type): The Id of the Survey status. [optional] # noqa: E501
- survey_id (int): The Id of the Survey. [optional] # noqa: E501
- traders_sample_size (int, none_type): [optional] # noqa: E501
- variable_id (int): [optional] # noqa: E501
- variable_label (str, none_type): [optional] # noqa: E501
- variable_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """MFIProcessedDataDTO - 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,)
- adm0_code (int): [optional] # noqa: E501
- adm0_name (str, none_type): [optional] # noqa: E501
- adm1_code (int): [optional] # noqa: E501
- adm1_name (str, none_type): [optional] # noqa: E501
- adm2_code (int): [optional] # noqa: E501
- adm2_name (str, none_type): [optional] # noqa: E501
- base_xls_form_id (int): [optional] # noqa: E501
- base_xls_form_name (str, none_type): [optional] # noqa: E501
- dimension_id (int): [optional] # noqa: E501
- dimension_name (str, none_type): [optional] # noqa: E501
- end_date (datetime, none_type): [optional] # noqa: E501
- level_id (int): [optional] # noqa: E501
- level_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_latitude (float, none_type): [optional] # noqa: E501
- market_longitude (float, none_type): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- output_value (float, none_type): [optional] # noqa: E501
- regional_bureau_id (int): [optional] # noqa: E501
- regional_bureau_name (str, none_type): [optional] # noqa: E501
- start_date (datetime, none_type): The Id of the Survey status. [optional] # noqa: E501
- survey_id (int): The Id of the Survey. [optional] # noqa: E501
- traders_sample_size (int, none_type): [optional] # noqa: E501
- variable_id (int): [optional] # noqa: E501
- variable_label (str, none_type): [optional] # noqa: E501
- variable_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/nearby_markets_dto.py b/data_bridges_client/model/nearby_markets_dto.py
deleted file mode 100644
index 596dbe1..0000000
--- a/data_bridges_client/model/nearby_markets_dto.py
+++ /dev/null
@@ -1,264 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class NearbyMarketsDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'distance': (float,), # noqa: E501
- 'market_id': (int,), # noqa: E501
- 'market_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'distance': 'distance', # noqa: E501
- 'market_id': 'marketId', # noqa: E501
- 'market_name': 'marketName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """NearbyMarketsDTO - 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,)
- distance (float): The distance in meters of the market from the provided point. [optional] # noqa: E501
- market_id (int): The internal ID of the market. [optional] # noqa: E501
- market_name (str, none_type): The name of the market. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """NearbyMarketsDTO - 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,)
- distance (float): The distance in meters of the market from the provided point. [optional] # noqa: E501
- market_id (int): The internal ID of the market. [optional] # noqa: E501
- market_name (str, none_type): The name of the market. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/nts_geometry_services.py b/data_bridges_client/model/nts_geometry_services.py
deleted file mode 100644
index 6763592..0000000
--- a/data_bridges_client/model/nts_geometry_services.py
+++ /dev/null
@@ -1,285 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.coordinate_equality_comparer import CoordinateEqualityComparer
- from data_bridges_client.model.coordinate_sequence_factory import CoordinateSequenceFactory
- from data_bridges_client.model.geometry_overlay import GeometryOverlay
- from data_bridges_client.model.precision_model import PrecisionModel
- globals()['CoordinateEqualityComparer'] = CoordinateEqualityComparer
- globals()['CoordinateSequenceFactory'] = CoordinateSequenceFactory
- globals()['GeometryOverlay'] = GeometryOverlay
- globals()['PrecisionModel'] = PrecisionModel
-
-
-class NtsGeometryServices(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'coordinate_equality_comparer': (CoordinateEqualityComparer,), # noqa: E501
- 'default_coordinate_sequence_factory': (CoordinateSequenceFactory,), # noqa: E501
- 'default_precision_model': (PrecisionModel,), # noqa: E501
- 'default_srid': (int,), # noqa: E501
- 'geometry_overlay': (GeometryOverlay,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'coordinate_equality_comparer': 'coordinateEqualityComparer', # noqa: E501
- 'default_coordinate_sequence_factory': 'defaultCoordinateSequenceFactory', # noqa: E501
- 'default_precision_model': 'defaultPrecisionModel', # noqa: E501
- 'default_srid': 'defaultSRID', # noqa: E501
- 'geometry_overlay': 'geometryOverlay', # noqa: E501
- }
-
- read_only_vars = {
- 'default_srid', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """NtsGeometryServices - 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,)
- coordinate_equality_comparer (CoordinateEqualityComparer): [optional] # noqa: E501
- default_coordinate_sequence_factory (CoordinateSequenceFactory): [optional] # noqa: E501
- default_precision_model (PrecisionModel): [optional] # noqa: E501
- default_srid (int): [optional] # noqa: E501
- geometry_overlay (GeometryOverlay): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """NtsGeometryServices - 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,)
- coordinate_equality_comparer (CoordinateEqualityComparer): [optional] # noqa: E501
- default_coordinate_sequence_factory (CoordinateSequenceFactory): [optional] # noqa: E501
- default_precision_model (PrecisionModel): [optional] # noqa: E501
- default_srid (int): [optional] # noqa: E501
- geometry_overlay (GeometryOverlay): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/ogc_geometry_type.py b/data_bridges_client/model/ogc_geometry_type.py
deleted file mode 100644
index 70a2ca7..0000000
--- a/data_bridges_client/model/ogc_geometry_type.py
+++ /dev/null
@@ -1,297 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class OgcGeometryType(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 = {
- ('value',): {
- '1': 1,
- '2': 2,
- '3': 3,
- '4': 4,
- '5': 5,
- '6': 6,
- '7': 7,
- '8': 8,
- '9': 9,
- '10': 10,
- '11': 11,
- '12': 12,
- '13': 13,
- '14': 14,
- '15': 15,
- '16': 16,
- },
- }
-
- validations = {
- }
-
- additional_properties_type = None
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'value': (int,),
- }
-
- @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):
- """OgcGeometryType - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ] # 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):
- """OgcGeometryType - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ] # 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/data_bridges_client/model/ordinates.py b/data_bridges_client/model/ordinates.py
deleted file mode 100644
index ac86e36..0000000
--- a/data_bridges_client/model/ordinates.py
+++ /dev/null
@@ -1,321 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class Ordinates(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 = {
- ('value',): {
- '0': 0,
- '1': 1,
- '2': 2,
- '3': 3,
- '4': 4,
- '7': 7,
- '8': 8,
- '16': 16,
- '32': 32,
- '64': 64,
- '128': 128,
- '256': 256,
- '512': 512,
- '1024': 1024,
- '2048': 2048,
- '4096': 4096,
- '8192': 8192,
- '16384': 16384,
- '32768': 32768,
- '65535': 65535,
- '65536': 65536,
- '65539': 65539,
- '65543': 65543,
- '131072': 131072,
- '262144': 262144,
- '524288': 524288,
- '1048576': 1048576,
- '2097152': 2097152,
- '4194304': 4194304,
- '8388608': 8388608,
- '16777216': 16777216,
- '33554432': 33554432,
- '67108864': 67108864,
- '134217728': 134217728,
- '268435456': 268435456,
- '536870912': 536870912,
- '1073741824': 1073741824,
- '-2147483648': -2147483648,
- '-65536': -65536,
- '-1': -1,
- },
- }
-
- validations = {
- }
-
- additional_properties_type = None
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'value': (int,),
- }
-
- @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):
- """Ordinates - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [0, 1, 2, 3, 4, 7, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 65536, 65539, 65543, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, -2147483648, -65536, -1, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [0, 1, 2, 3, 4, 7, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 65536, 65539, 65543, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, -2147483648, -65536, -1, ] # 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):
- """Ordinates - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [0, 1, 2, 3, 4, 7, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 65536, 65539, 65543, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, -2147483648, -65536, -1, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [0, 1, 2, 3, 4, 7, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 65536, 65539, 65543, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, -2147483648, -65536, -1, ] # 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/data_bridges_client/model/paged_commodity_list_dto.py b/data_bridges_client/model/paged_commodity_list_dto.py
deleted file mode 100644
index a6d49e6..0000000
--- a/data_bridges_client/model/paged_commodity_list_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.commodity_dto import CommodityDTO
- globals()['CommodityDTO'] = CommodityDTO
-
-
-class PagedCommodityListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([CommodityDTO], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedCommodityListDTO - 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,)
- items ([CommodityDTO], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedCommodityListDTO - 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,)
- items ([CommodityDTO], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/paged_commodity_price_list_dto.py b/data_bridges_client/model/paged_commodity_price_list_dto.py
deleted file mode 100644
index 30cfcde..0000000
--- a/data_bridges_client/model/paged_commodity_price_list_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.commodity_price_dto import CommodityPriceDTO
- globals()['CommodityPriceDTO'] = CommodityPriceDTO
-
-
-class PagedCommodityPriceListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([CommodityPriceDTO], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedCommodityPriceListDTO - 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,)
- items ([CommodityPriceDTO], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedCommodityPriceListDTO - 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,)
- items ([CommodityPriceDTO], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/paged_commodity_weekly_aggregated_price_list_dto.py b/data_bridges_client/model/paged_commodity_weekly_aggregated_price_list_dto.py
deleted file mode 100644
index bacefdd..0000000
--- a/data_bridges_client/model/paged_commodity_weekly_aggregated_price_list_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.weekly_aggregated_price import WeeklyAggregatedPrice
- globals()['WeeklyAggregatedPrice'] = WeeklyAggregatedPrice
-
-
-class PagedCommodityWeeklyAggregatedPriceListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([WeeklyAggregatedPrice], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedCommodityWeeklyAggregatedPriceListDTO - 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,)
- items ([WeeklyAggregatedPrice], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedCommodityWeeklyAggregatedPriceListDTO - 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,)
- items ([WeeklyAggregatedPrice], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/paged_currency_list_dto.py b/data_bridges_client/model/paged_currency_list_dto.py
deleted file mode 100644
index 58fa390..0000000
--- a/data_bridges_client/model/paged_currency_list_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.currency_dto import CurrencyDTO
- globals()['CurrencyDTO'] = CurrencyDTO
-
-
-class PagedCurrencyListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([CurrencyDTO], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedCurrencyListDTO - 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,)
- items ([CurrencyDTO], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedCurrencyListDTO - 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,)
- items ([CurrencyDTO], none_type): The list of paged items. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/paged_processed_data_dto.py b/data_bridges_client/model/paged_processed_data_dto.py
deleted file mode 100644
index 0c4e9d5..0000000
--- a/data_bridges_client/model/paged_processed_data_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.mfi_processed_data_dto import MFIProcessedDataDTO
- globals()['MFIProcessedDataDTO'] = MFIProcessedDataDTO
-
-
-class PagedProcessedDataDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([MFIProcessedDataDTO], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedProcessedDataDTO - 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,)
- items ([MFIProcessedDataDTO], none_type): The list of processed data. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedProcessedDataDTO - 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,)
- items ([MFIProcessedDataDTO], none_type): The list of processed data. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/paged_survey_list_dto.py b/data_bridges_client/model/paged_survey_list_dto.py
deleted file mode 100644
index 3e6669b..0000000
--- a/data_bridges_client/model/paged_survey_list_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.survey_list_dto import SurveyListDTO
- globals()['SurveyListDTO'] = SurveyListDTO
-
-
-class PagedSurveyListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([SurveyListDTO], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedSurveyListDTO - 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,)
- items ([SurveyListDTO], none_type): The list of surveys. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedSurveyListDTO - 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,)
- items ([SurveyListDTO], none_type): The list of surveys. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/paged_xls_form_list_dto.py b/data_bridges_client/model/paged_xls_form_list_dto.py
deleted file mode 100644
index 83c7b9e..0000000
--- a/data_bridges_client/model/paged_xls_form_list_dto.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.xls_form_dto import XlsFormDTO
- globals()['XlsFormDTO'] = XlsFormDTO
-
-
-class PagedXlsFormListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([XlsFormDTO], none_type,), # noqa: E501
- 'page': (int,), # noqa: E501
- 'total_items': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- 'page': 'page', # noqa: E501
- 'total_items': 'totalItems', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PagedXlsFormListDTO - 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,)
- items ([XlsFormDTO], none_type): The list of XlsForms. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PagedXlsFormListDTO - 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,)
- items ([XlsFormDTO], none_type): The list of XlsForms. [optional] # noqa: E501
- page (int): The current page. [optional] # noqa: E501
- total_items (int): The total number of items. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/point.py b/data_bridges_client/model/point.py
deleted file mode 100644
index d3b94b3..0000000
--- a/data_bridges_client/model/point.py
+++ /dev/null
@@ -1,397 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.coordinate import Coordinate
- from data_bridges_client.model.coordinate_sequence import CoordinateSequence
- from data_bridges_client.model.dimension import Dimension
- from data_bridges_client.model.envelope import Envelope
- from data_bridges_client.model.geometry import Geometry
- from data_bridges_client.model.geometry_factory import GeometryFactory
- from data_bridges_client.model.ogc_geometry_type import OgcGeometryType
- from data_bridges_client.model.precision_model import PrecisionModel
- globals()['Coordinate'] = Coordinate
- globals()['CoordinateSequence'] = CoordinateSequence
- globals()['Dimension'] = Dimension
- globals()['Envelope'] = Envelope
- globals()['Geometry'] = Geometry
- globals()['GeometryFactory'] = GeometryFactory
- globals()['OgcGeometryType'] = OgcGeometryType
- globals()['PrecisionModel'] = PrecisionModel
-
-
-class Point(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'area': (float,), # noqa: E501
- 'boundary': (Geometry,), # noqa: E501
- 'boundary_dimension': (Dimension,), # noqa: E501
- 'centroid': (Point,), # noqa: E501
- 'coordinate': (Coordinate,), # noqa: E501
- 'coordinate_sequence': (CoordinateSequence,), # noqa: E501
- 'coordinates': ([Coordinate], none_type,), # noqa: E501
- 'dimension': (Dimension,), # noqa: E501
- 'envelope': (Geometry,), # noqa: E501
- 'envelope_internal': (Envelope,), # noqa: E501
- 'factory': (GeometryFactory,), # noqa: E501
- 'geometry_type': (str, none_type,), # noqa: E501
- 'interior_point': (Point,), # noqa: E501
- 'is_empty': (bool,), # noqa: E501
- 'is_rectangle': (bool,), # noqa: E501
- 'is_simple': (bool,), # noqa: E501
- 'is_valid': (bool,), # noqa: E501
- 'length': (float,), # noqa: E501
- 'm': (float,), # noqa: E501
- 'num_geometries': (int,), # noqa: E501
- 'num_points': (int,), # noqa: E501
- 'ogc_geometry_type': (OgcGeometryType,), # noqa: E501
- 'point_on_surface': (Point,), # noqa: E501
- 'precision_model': (PrecisionModel,), # noqa: E501
- 'srid': (int,), # noqa: E501
- 'user_data': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
- 'x': (float,), # noqa: E501
- 'y': (float,), # noqa: E501
- 'z': (float,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'area': 'area', # noqa: E501
- 'boundary': 'boundary', # noqa: E501
- 'boundary_dimension': 'boundaryDimension', # noqa: E501
- 'centroid': 'centroid', # noqa: E501
- 'coordinate': 'coordinate', # noqa: E501
- 'coordinate_sequence': 'coordinateSequence', # noqa: E501
- 'coordinates': 'coordinates', # noqa: E501
- 'dimension': 'dimension', # noqa: E501
- 'envelope': 'envelope', # noqa: E501
- 'envelope_internal': 'envelopeInternal', # noqa: E501
- 'factory': 'factory', # noqa: E501
- 'geometry_type': 'geometryType', # noqa: E501
- 'interior_point': 'interiorPoint', # noqa: E501
- 'is_empty': 'isEmpty', # noqa: E501
- 'is_rectangle': 'isRectangle', # noqa: E501
- 'is_simple': 'isSimple', # noqa: E501
- 'is_valid': 'isValid', # noqa: E501
- 'length': 'length', # noqa: E501
- 'm': 'm', # noqa: E501
- 'num_geometries': 'numGeometries', # noqa: E501
- 'num_points': 'numPoints', # noqa: E501
- 'ogc_geometry_type': 'ogcGeometryType', # noqa: E501
- 'point_on_surface': 'pointOnSurface', # noqa: E501
- 'precision_model': 'precisionModel', # noqa: E501
- 'srid': 'srid', # noqa: E501
- 'user_data': 'userData', # noqa: E501
- 'x': 'x', # noqa: E501
- 'y': 'y', # noqa: E501
- 'z': 'z', # noqa: E501
- }
-
- read_only_vars = {
- 'area', # noqa: E501
- 'geometry_type', # noqa: E501
- 'is_empty', # noqa: E501
- 'is_rectangle', # noqa: E501
- 'is_simple', # noqa: E501
- 'is_valid', # noqa: E501
- 'length', # noqa: E501
- 'num_geometries', # noqa: E501
- 'num_points', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """Point - 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,)
- area (float): [optional] # noqa: E501
- boundary (Geometry): [optional] # noqa: E501
- boundary_dimension (Dimension): [optional] # noqa: E501
- centroid (Point): [optional] # noqa: E501
- coordinate (Coordinate): [optional] # noqa: E501
- coordinate_sequence (CoordinateSequence): [optional] # noqa: E501
- coordinates ([Coordinate], none_type): [optional] # noqa: E501
- dimension (Dimension): [optional] # noqa: E501
- envelope (Geometry): [optional] # noqa: E501
- envelope_internal (Envelope): [optional] # noqa: E501
- factory (GeometryFactory): [optional] # noqa: E501
- geometry_type (str, none_type): [optional] # noqa: E501
- interior_point (Point): [optional] # noqa: E501
- is_empty (bool): [optional] # noqa: E501
- is_rectangle (bool): [optional] # noqa: E501
- is_simple (bool): [optional] # noqa: E501
- is_valid (bool): [optional] # noqa: E501
- length (float): [optional] # noqa: E501
- m (float): [optional] # noqa: E501
- num_geometries (int): [optional] # noqa: E501
- num_points (int): [optional] # noqa: E501
- ogc_geometry_type (OgcGeometryType): [optional] # noqa: E501
- point_on_surface (Point): [optional] # noqa: E501
- precision_model (PrecisionModel): [optional] # noqa: E501
- srid (int): [optional] # noqa: E501
- user_data (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
- x (float): [optional] # noqa: E501
- y (float): [optional] # noqa: E501
- z (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """Point - 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,)
- area (float): [optional] # noqa: E501
- boundary (Geometry): [optional] # noqa: E501
- boundary_dimension (Dimension): [optional] # noqa: E501
- centroid (Point): [optional] # noqa: E501
- coordinate (Coordinate): [optional] # noqa: E501
- coordinate_sequence (CoordinateSequence): [optional] # noqa: E501
- coordinates ([Coordinate], none_type): [optional] # noqa: E501
- dimension (Dimension): [optional] # noqa: E501
- envelope (Geometry): [optional] # noqa: E501
- envelope_internal (Envelope): [optional] # noqa: E501
- factory (GeometryFactory): [optional] # noqa: E501
- geometry_type (str, none_type): [optional] # noqa: E501
- interior_point (Point): [optional] # noqa: E501
- is_empty (bool): [optional] # noqa: E501
- is_rectangle (bool): [optional] # noqa: E501
- is_simple (bool): [optional] # noqa: E501
- is_valid (bool): [optional] # noqa: E501
- length (float): [optional] # noqa: E501
- m (float): [optional] # noqa: E501
- num_geometries (int): [optional] # noqa: E501
- num_points (int): [optional] # noqa: E501
- ogc_geometry_type (OgcGeometryType): [optional] # noqa: E501
- point_on_surface (Point): [optional] # noqa: E501
- precision_model (PrecisionModel): [optional] # noqa: E501
- srid (int): [optional] # noqa: E501
- user_data (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
- x (float): [optional] # noqa: E501
- y (float): [optional] # noqa: E501
- z (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/precision_model.py b/data_bridges_client/model/precision_model.py
deleted file mode 100644
index 13b5f3e..0000000
--- a/data_bridges_client/model/precision_model.py
+++ /dev/null
@@ -1,276 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.precision_models import PrecisionModels
- globals()['PrecisionModels'] = PrecisionModels
-
-
-class PrecisionModel(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'is_floating': (bool,), # noqa: E501
- 'maximum_significant_digits': (int,), # noqa: E501
- 'precision_model_type': (PrecisionModels,), # noqa: E501
- 'scale': (float,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'is_floating': 'isFloating', # noqa: E501
- 'maximum_significant_digits': 'maximumSignificantDigits', # noqa: E501
- 'precision_model_type': 'precisionModelType', # noqa: E501
- 'scale': 'scale', # noqa: E501
- }
-
- read_only_vars = {
- 'is_floating', # noqa: E501
- 'maximum_significant_digits', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """PrecisionModel - 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,)
- is_floating (bool): [optional] # noqa: E501
- maximum_significant_digits (int): [optional] # noqa: E501
- precision_model_type (PrecisionModels): [optional] # noqa: E501
- scale (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """PrecisionModel - 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,)
- is_floating (bool): [optional] # noqa: E501
- maximum_significant_digits (int): [optional] # noqa: E501
- precision_model_type (PrecisionModels): [optional] # noqa: E501
- scale (float): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/precision_models.py b/data_bridges_client/model/precision_models.py
deleted file mode 100644
index 990353b..0000000
--- a/data_bridges_client/model/precision_models.py
+++ /dev/null
@@ -1,284 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class PrecisionModels(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 = {
- ('value',): {
- '0': 0,
- '1': 1,
- '2': 2,
- },
- }
-
- validations = {
- }
-
- additional_properties_type = None
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'value': (int,),
- }
-
- @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):
- """PrecisionModels - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [0, 1, 2, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [0, 1, 2, ] # 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):
- """PrecisionModels - a model defined in OpenAPI
-
- Note that value can be passed either in args or in kwargs, but not in both.
-
- Args:
- args[0] (int):, must be one of [0, 1, 2, ] # noqa: E501
-
- Keyword Args:
- value (int):, must be one of [0, 1, 2, ] # 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/data_bridges_client/model/problem_details.py b/data_bridges_client/model/problem_details.py
deleted file mode 100644
index eea810f..0000000
--- a/data_bridges_client/model/problem_details.py
+++ /dev/null
@@ -1,272 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class ProblemDetails(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'detail': (str, none_type,), # noqa: E501
- 'instance': (str, none_type,), # noqa: E501
- 'status': (int, none_type,), # noqa: E501
- 'title': (str, none_type,), # noqa: E501
- 'type': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'detail': 'detail', # noqa: E501
- 'instance': 'instance', # noqa: E501
- 'status': 'status', # noqa: E501
- 'title': 'title', # noqa: E501
- '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
- """ProblemDetails - 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,)
- detail (str, none_type): [optional] # noqa: E501
- instance (str, none_type): [optional] # noqa: E501
- status (int, none_type): [optional] # noqa: E501
- title (str, none_type): [optional] # noqa: E501
- type (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """ProblemDetails - 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,)
- detail (str, none_type): [optional] # noqa: E501
- instance (str, none_type): [optional] # noqa: E501
- status (int, none_type): [optional] # noqa: E501
- title (str, none_type): [optional] # noqa: E501
- type (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/rpme_assessment.py b/data_bridges_client/model/rpme_assessment.py
deleted file mode 100644
index 038c2e1..0000000
--- a/data_bridges_client/model/rpme_assessment.py
+++ /dev/null
@@ -1,338 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.rpme_output_values import RpmeOutputValues
- globals()['RpmeOutputValues'] = RpmeOutputValues
-
-
-class RpmeAssessment(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'adm0_code': (int,), # noqa: E501
- 'adm0_code_dots': (str, none_type,), # noqa: E501
- 'adm1_code': (int,), # noqa: E501
- 'adm1_code_dots': (str, none_type,), # noqa: E501
- 'adm2_code': (int,), # noqa: E501
- 'adm2_code_dots': (str, none_type,), # noqa: E501
- 'assessment_date': (datetime,), # noqa: E501
- 'ben_sev_cntr_dev': (str, none_type,), # noqa: E501
- 'beneficiaries_score_tbu': (bool,), # noqa: E501
- 'market_id': (int, none_type,), # noqa: E501
- 'nb_beneficiaries_interviewed': (int, none_type,), # noqa: E501
- 'output_values': ([RpmeOutputValues], none_type,), # noqa: E501
- 'price_score_tbd': (bool,), # noqa: E501
- 'price_score_tbu': (bool,), # noqa: E501
- 'sev_cntr_dev': (str, none_type,), # noqa: E501
- 'sh_latitude': (float, none_type,), # noqa: E501
- 'sh_longitude': (float, none_type,), # noqa: E501
- 'shop_id': (int,), # noqa: E501
- 'survey_id': (int,), # noqa: E501
- 'trd_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'adm0_code_dots': 'adm0CodeDOTS', # noqa: E501
- 'adm1_code': 'adm1Code', # noqa: E501
- 'adm1_code_dots': 'adm1CodeDOTS', # noqa: E501
- 'adm2_code': 'adm2Code', # noqa: E501
- 'adm2_code_dots': 'adm2CodeDOTS', # noqa: E501
- 'assessment_date': 'assessmentDate', # noqa: E501
- 'ben_sev_cntr_dev': 'benSevCntrDev', # noqa: E501
- 'beneficiaries_score_tbu': 'beneficiariesScoreTbu', # noqa: E501
- 'market_id': 'marketId', # noqa: E501
- 'nb_beneficiaries_interviewed': 'nbBeneficiariesInterviewed', # noqa: E501
- 'output_values': 'outputValues', # noqa: E501
- 'price_score_tbd': 'priceScoreTbd', # noqa: E501
- 'price_score_tbu': 'priceScoreTbu', # noqa: E501
- 'sev_cntr_dev': 'sevCntrDev', # noqa: E501
- 'sh_latitude': 'shLatitude', # noqa: E501
- 'sh_longitude': 'shLongitude', # noqa: E501
- 'shop_id': 'shopId', # noqa: E501
- 'survey_id': 'surveyId', # noqa: E501
- 'trd_name': 'trdName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """RpmeAssessment - 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,)
- adm0_code (int): [optional] # noqa: E501
- adm0_code_dots (str, none_type): [optional] # noqa: E501
- adm1_code (int): [optional] # noqa: E501
- adm1_code_dots (str, none_type): [optional] # noqa: E501
- adm2_code (int): [optional] # noqa: E501
- adm2_code_dots (str, none_type): [optional] # noqa: E501
- assessment_date (datetime): [optional] # noqa: E501
- ben_sev_cntr_dev (str, none_type): [optional] # noqa: E501
- beneficiaries_score_tbu (bool): [optional] # noqa: E501
- market_id (int, none_type): [optional] # noqa: E501
- nb_beneficiaries_interviewed (int, none_type): [optional] # noqa: E501
- output_values ([RpmeOutputValues], none_type): [optional] # noqa: E501
- price_score_tbd (bool): [optional] # noqa: E501
- price_score_tbu (bool): [optional] # noqa: E501
- sev_cntr_dev (str, none_type): [optional] # noqa: E501
- sh_latitude (float, none_type): [optional] # noqa: E501
- sh_longitude (float, none_type): [optional] # noqa: E501
- shop_id (int): [optional] # noqa: E501
- survey_id (int): [optional] # noqa: E501
- trd_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """RpmeAssessment - 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,)
- adm0_code (int): [optional] # noqa: E501
- adm0_code_dots (str, none_type): [optional] # noqa: E501
- adm1_code (int): [optional] # noqa: E501
- adm1_code_dots (str, none_type): [optional] # noqa: E501
- adm2_code (int): [optional] # noqa: E501
- adm2_code_dots (str, none_type): [optional] # noqa: E501
- assessment_date (datetime): [optional] # noqa: E501
- ben_sev_cntr_dev (str, none_type): [optional] # noqa: E501
- beneficiaries_score_tbu (bool): [optional] # noqa: E501
- market_id (int, none_type): [optional] # noqa: E501
- nb_beneficiaries_interviewed (int, none_type): [optional] # noqa: E501
- output_values ([RpmeOutputValues], none_type): [optional] # noqa: E501
- price_score_tbd (bool): [optional] # noqa: E501
- price_score_tbu (bool): [optional] # noqa: E501
- sev_cntr_dev (str, none_type): [optional] # noqa: E501
- sh_latitude (float, none_type): [optional] # noqa: E501
- sh_longitude (float, none_type): [optional] # noqa: E501
- shop_id (int): [optional] # noqa: E501
- survey_id (int): [optional] # noqa: E501
- trd_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/rpme_assessment_paged_result.py b/data_bridges_client/model/rpme_assessment_paged_result.py
deleted file mode 100644
index 65b8e84..0000000
--- a/data_bridges_client/model/rpme_assessment_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.rpme_assessment import RpmeAssessment
- globals()['RpmeAssessment'] = RpmeAssessment
-
-
-class RpmeAssessmentPagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([RpmeAssessment], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """RpmeAssessmentPagedResult - 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,)
- items ([RpmeAssessment], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """RpmeAssessmentPagedResult - 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,)
- items ([RpmeAssessment], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/rpme_output_values.py b/data_bridges_client/model/rpme_output_values.py
deleted file mode 100644
index 0061b4d..0000000
--- a/data_bridges_client/model/rpme_output_values.py
+++ /dev/null
@@ -1,260 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class RpmeOutputValues(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'output_value': (float, none_type,), # noqa: E501
- 'variable_id': (int,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'output_value': 'outputValue', # noqa: E501
- 'variable_id': 'variableId', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """RpmeOutputValues - 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,)
- output_value (float, none_type): [optional] # noqa: E501
- variable_id (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """RpmeOutputValues - 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,)
- output_value (float, none_type): [optional] # noqa: E501
- variable_id (int): [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/rpme_variable.py b/data_bridges_client/model/rpme_variable.py
deleted file mode 100644
index 3c6f6ad..0000000
--- a/data_bridges_client/model/rpme_variable.py
+++ /dev/null
@@ -1,288 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class RpmeVariable(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'dimension_id': (int,), # noqa: E501
- 'dimension_name': (str, none_type,), # noqa: E501
- 'level_id': (int,), # noqa: E501
- 'level_name': (str, none_type,), # noqa: E501
- 'survey_mode_id': (int,), # noqa: E501
- 'survey_mode_name': (str, none_type,), # noqa: E501
- 'variable_description': (str, none_type,), # noqa: E501
- 'variable_id': (int,), # noqa: E501
- 'variable_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'dimension_id': 'dimensionId', # noqa: E501
- 'dimension_name': 'dimensionName', # noqa: E501
- 'level_id': 'levelId', # noqa: E501
- 'level_name': 'levelName', # noqa: E501
- 'survey_mode_id': 'surveyModeId', # noqa: E501
- 'survey_mode_name': 'surveyModeName', # noqa: E501
- 'variable_description': 'variableDescription', # noqa: E501
- 'variable_id': 'variableId', # noqa: E501
- 'variable_name': 'variableName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """RpmeVariable - 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,)
- dimension_id (int): [optional] # noqa: E501
- dimension_name (str, none_type): [optional] # noqa: E501
- level_id (int): [optional] # noqa: E501
- level_name (str, none_type): [optional] # noqa: E501
- survey_mode_id (int): [optional] # noqa: E501
- survey_mode_name (str, none_type): [optional] # noqa: E501
- variable_description (str, none_type): [optional] # noqa: E501
- variable_id (int): [optional] # noqa: E501
- variable_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """RpmeVariable - 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,)
- dimension_id (int): [optional] # noqa: E501
- dimension_name (str, none_type): [optional] # noqa: E501
- level_id (int): [optional] # noqa: E501
- level_name (str, none_type): [optional] # noqa: E501
- survey_mode_id (int): [optional] # noqa: E501
- survey_mode_name (str, none_type): [optional] # noqa: E501
- variable_description (str, none_type): [optional] # noqa: E501
- variable_id (int): [optional] # noqa: E501
- variable_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/rpme_variable_paged_result.py b/data_bridges_client/model/rpme_variable_paged_result.py
deleted file mode 100644
index 242595f..0000000
--- a/data_bridges_client/model/rpme_variable_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.rpme_variable import RpmeVariable
- globals()['RpmeVariable'] = RpmeVariable
-
-
-class RpmeVariablePagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([RpmeVariable], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """RpmeVariablePagedResult - 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,)
- items ([RpmeVariable], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """RpmeVariablePagedResult - 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,)
- items ([RpmeVariable], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/survey_details_dto.py b/data_bridges_client/model/survey_details_dto.py
deleted file mode 100644
index cda7f35..0000000
--- a/data_bridges_client/model/survey_details_dto.py
+++ /dev/null
@@ -1,256 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class SurveyDetailsDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'result': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'result': 'result', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """SurveyDetailsDTO - 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,)
- result (bool, date, datetime, dict, float, int, list, str, none_type): The list of responses in the survey. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """SurveyDetailsDTO - 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,)
- result (bool, date, datetime, dict, float, int, list, str, none_type): The list of responses in the survey. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/survey_list_dto.py b/data_bridges_client/model/survey_list_dto.py
deleted file mode 100644
index 0a6b4a4..0000000
--- a/data_bridges_client/model/survey_list_dto.py
+++ /dev/null
@@ -1,316 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class SurveyListDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- ('survey_original_filename',): {
- 'max_length': 256,
- 'min_length': 0,
- },
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int,), # noqa: E501
- 'base_data': (str, none_type,), # noqa: E501
- 'base_xls_form_name': (str, none_type,), # noqa: E501
- 'country_name': (str, none_type,), # noqa: E501
- 'iso3_alpha3': (str, none_type,), # noqa: E501
- 'original_csv_file': (str, none_type,), # noqa: E501
- 'survey_create_date': (datetime,), # noqa: E501
- 'survey_end_date': (datetime, none_type,), # noqa: E501
- 'survey_id': (int,), # noqa: E501
- 'survey_original_filename': (str, none_type,), # noqa: E501
- 'survey_start_date': (datetime, none_type,), # noqa: E501
- 'survey_status_id': (int,), # noqa: E501
- 'survey_validation_report': (str, none_type,), # noqa: E501
- 'user_name': (str, none_type,), # noqa: E501
- 'xls_form_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'base_data': 'baseData', # noqa: E501
- 'base_xls_form_name': 'baseXlsFormName', # noqa: E501
- 'country_name': 'countryName', # noqa: E501
- 'iso3_alpha3': 'iso3Alpha3', # noqa: E501
- 'original_csv_file': 'originalCsvFile', # noqa: E501
- 'survey_create_date': 'surveyCreateDate', # noqa: E501
- 'survey_end_date': 'surveyEndDate', # noqa: E501
- 'survey_id': 'surveyID', # noqa: E501
- 'survey_original_filename': 'surveyOriginalFilename', # noqa: E501
- 'survey_start_date': 'surveyStartDate', # noqa: E501
- 'survey_status_id': 'surveyStatusID', # noqa: E501
- 'survey_validation_report': 'surveyValidationReport', # noqa: E501
- 'user_name': 'userName', # noqa: E501
- 'xls_form_name': 'xlsFormName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """SurveyListDTO - 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,)
- adm0_code (int): The internal code of the country where the survey has taken place. [optional] # noqa: E501
- base_data (str, none_type): The link to the JSON data reshaped on the base XLSForm. [optional] # noqa: E501
- base_xls_form_name (str, none_type): The name of the base XLSForm used to build the XLSForm. [optional] # noqa: E501
- country_name (str, none_type): The name of the country where the survey has taken place. [optional] # noqa: E501
- iso3_alpha3 (str, none_type): The ISO3 alpha code of the country where the survey has taken place. [optional] # noqa: E501
- original_csv_file (str, none_type): The link to download the original CSV file. [optional] # noqa: E501
- survey_create_date (datetime): The date when the survey has been uploaded in the Data Bridges platform. [optional] # noqa: E501
- survey_end_date (datetime, none_type): The date when the survey has ended. [optional] # noqa: E501
- survey_id (int): The Id of the Survey. [optional] # noqa: E501
- survey_original_filename (str, none_type): The filename of the survey CSV file. [optional] # noqa: E501
- survey_start_date (datetime, none_type): The date when the survey has started. [optional] # noqa: E501
- survey_status_id (int): The Id of the Survey status. [optional] # noqa: E501
- survey_validation_report (str, none_type): The detailed report on the validation performed on the survey schema. [optional] # noqa: E501
- user_name (str, none_type): The name of the user that has uploaded the survey data. [optional] # noqa: E501
- xls_form_name (str, none_type): The name of the XLSForm used to collect data. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- self = super(OpenApiModel, cls).__new__(cls)
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """SurveyListDTO - 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,)
- adm0_code (int): The internal code of the country where the survey has taken place. [optional] # noqa: E501
- base_data (str, none_type): The link to the JSON data reshaped on the base XLSForm. [optional] # noqa: E501
- base_xls_form_name (str, none_type): The name of the base XLSForm used to build the XLSForm. [optional] # noqa: E501
- country_name (str, none_type): The name of the country where the survey has taken place. [optional] # noqa: E501
- iso3_alpha3 (str, none_type): The ISO3 alpha code of the country where the survey has taken place. [optional] # noqa: E501
- original_csv_file (str, none_type): The link to download the original CSV file. [optional] # noqa: E501
- survey_create_date (datetime): The date when the survey has been uploaded in the Data Bridges platform. [optional] # noqa: E501
- survey_end_date (datetime, none_type): The date when the survey has ended. [optional] # noqa: E501
- survey_id (int): The Id of the Survey. [optional] # noqa: E501
- survey_original_filename (str, none_type): The filename of the survey CSV file. [optional] # noqa: E501
- survey_start_date (datetime, none_type): The date when the survey has started. [optional] # noqa: E501
- survey_status_id (int): The Id of the Survey status. [optional] # noqa: E501
- survey_validation_report (str, none_type): The detailed report on the validation performed on the survey schema. [optional] # noqa: E501
- user_name (str, none_type): The name of the user that has uploaded the survey data. [optional] # noqa: E501
- xls_form_name (str, none_type): The name of the XLSForm used to collect data. [optional] # noqa: E501
- """
-
- _check_type = kwargs.pop('_check_type', True)
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
- _path_to_item = kwargs.pop('_path_to_item', ())
- _configuration = kwargs.pop('_configuration', None)
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/usd_indirect_quotation.py b/data_bridges_client/model/usd_indirect_quotation.py
deleted file mode 100644
index df902c6..0000000
--- a/data_bridges_client/model/usd_indirect_quotation.py
+++ /dev/null
@@ -1,284 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class UsdIndirectQuotation(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int,), # noqa: E501
- 'country_iso3': (str, none_type,), # noqa: E501
- 'date': (datetime,), # noqa: E501
- 'frequency': (str, none_type,), # noqa: E501
- 'id': (int,), # noqa: E501
- 'is_official': (bool,), # noqa: E501
- 'name': (str, none_type,), # noqa: E501
- 'value': (float, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'country_iso3': 'countryISO3', # noqa: E501
- 'date': 'date', # noqa: E501
- 'frequency': 'frequency', # noqa: E501
- 'id': 'id', # noqa: E501
- 'is_official': 'isOfficial', # noqa: E501
- 'name': 'name', # noqa: E501
- 'value': 'value', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """UsdIndirectQuotation - 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,)
- adm0_code (int): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- date (datetime): [optional] # noqa: E501
- frequency (str, none_type): (it’s from the reporting commodity named Exchange Rate. [optional] # noqa: E501
- id (int): [optional] # noqa: E501
- is_official (bool): The field IsOfficial is a boolean which can be set to true for the Trading Economics data and to false for the data coming from a commodity saved in the DataBridges database. [optional] # noqa: E501
- name (str, none_type): the ISO3 code for the currency, based on ISO4217. [optional] # noqa: E501
- value (float, 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """UsdIndirectQuotation - 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,)
- adm0_code (int): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- date (datetime): [optional] # noqa: E501
- frequency (str, none_type): (it’s from the reporting commodity named Exchange Rate. [optional] # noqa: E501
- id (int): [optional] # noqa: E501
- is_official (bool): The field IsOfficial is a boolean which can be set to true for the Trading Economics data and to false for the data coming from a commodity saved in the DataBridges database. [optional] # noqa: E501
- name (str, none_type): the ISO3 code for the currency, based on ISO4217. [optional] # noqa: E501
- value (float, 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/usd_indirect_quotation_paged_result.py b/data_bridges_client/model/usd_indirect_quotation_paged_result.py
deleted file mode 100644
index 208adf3..0000000
--- a/data_bridges_client/model/usd_indirect_quotation_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.usd_indirect_quotation import UsdIndirectQuotation
- globals()['UsdIndirectQuotation'] = UsdIndirectQuotation
-
-
-class UsdIndirectQuotationPagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([UsdIndirectQuotation], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """UsdIndirectQuotationPagedResult - 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,)
- items ([UsdIndirectQuotation], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """UsdIndirectQuotationPagedResult - 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,)
- items ([UsdIndirectQuotation], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/view_extended_aggregated_price.py b/data_bridges_client/model/view_extended_aggregated_price.py
deleted file mode 100644
index 041f37b..0000000
--- a/data_bridges_client/model/view_extended_aggregated_price.py
+++ /dev/null
@@ -1,340 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class ViewExtendedAggregatedPrice(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int, none_type,), # noqa: E501
- 'commodity_date_month': (int, none_type,), # noqa: E501
- 'commodity_date_week': (int, none_type,), # noqa: E501
- 'commodity_date_year': (int, none_type,), # noqa: E501
- 'commodity_id': (int,), # noqa: E501
- 'commodity_name': (str, none_type,), # noqa: E501
- 'commodity_price': (float, none_type,), # noqa: E501
- 'commodity_price_date': (datetime, none_type,), # noqa: E501
- 'commodity_price_flag': (str, none_type,), # noqa: E501
- 'commodity_price_observations': (int, none_type,), # noqa: E501
- 'commodity_price_source_name': (str, none_type,), # noqa: E501
- 'commodity_unit_id': (int,), # noqa: E501
- 'commodity_unit_name': (str, none_type,), # noqa: E501
- 'country_iso3': (str, none_type,), # noqa: E501
- 'country_name': (str, none_type,), # noqa: E501
- 'currency_id': (int,), # noqa: E501
- 'currency_name': (str, none_type,), # noqa: E501
- 'market_id': (int,), # noqa: E501
- 'market_name': (str, none_type,), # noqa: E501
- 'original_frequency': (str, none_type,), # noqa: E501
- 'price_type_id': (int,), # noqa: E501
- 'price_type_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'commodity_date_month': 'commodityDateMonth', # noqa: E501
- 'commodity_date_week': 'commodityDateWeek', # noqa: E501
- 'commodity_date_year': 'commodityDateYear', # noqa: E501
- 'commodity_id': 'commodityID', # noqa: E501
- 'commodity_name': 'commodityName', # noqa: E501
- 'commodity_price': 'commodityPrice', # noqa: E501
- 'commodity_price_date': 'commodityPriceDate', # noqa: E501
- 'commodity_price_flag': 'commodityPriceFlag', # noqa: E501
- 'commodity_price_observations': 'commodityPriceObservations', # noqa: E501
- 'commodity_price_source_name': 'commodityPriceSourceName', # noqa: E501
- 'commodity_unit_id': 'commodityUnitID', # noqa: E501
- 'commodity_unit_name': 'commodityUnitName', # noqa: E501
- 'country_iso3': 'countryISO3', # noqa: E501
- 'country_name': 'countryName', # noqa: E501
- 'currency_id': 'currencyID', # noqa: E501
- 'currency_name': 'currencyName', # noqa: E501
- 'market_id': 'marketID', # noqa: E501
- 'market_name': 'marketName', # noqa: E501
- 'original_frequency': 'originalFrequency', # noqa: E501
- 'price_type_id': 'priceTypeID', # noqa: E501
- 'price_type_name': 'priceTypeName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """ViewExtendedAggregatedPrice - 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,)
- adm0_code (int, none_type): [optional] # noqa: E501
- commodity_date_month (int, none_type): [optional] # noqa: E501
- commodity_date_week (int, none_type): [optional] # noqa: E501
- commodity_date_year (int, none_type): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price (float, none_type): [optional] # noqa: E501
- commodity_price_date (datetime, none_type): [optional] # noqa: E501
- commodity_price_flag (str, none_type): [optional] # noqa: E501
- commodity_price_observations (int, none_type): [optional] # noqa: E501
- commodity_price_source_name (str, none_type): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- commodity_unit_name (str, none_type): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- original_frequency (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """ViewExtendedAggregatedPrice - 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,)
- adm0_code (int, none_type): [optional] # noqa: E501
- commodity_date_month (int, none_type): [optional] # noqa: E501
- commodity_date_week (int, none_type): [optional] # noqa: E501
- commodity_date_year (int, none_type): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price (float, none_type): [optional] # noqa: E501
- commodity_price_date (datetime, none_type): [optional] # noqa: E501
- commodity_price_flag (str, none_type): [optional] # noqa: E501
- commodity_price_observations (int, none_type): [optional] # noqa: E501
- commodity_price_source_name (str, none_type): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- commodity_unit_name (str, none_type): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- original_frequency (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/view_extended_aggregated_price_paged_result.py b/data_bridges_client/model/view_extended_aggregated_price_paged_result.py
deleted file mode 100644
index dc4e91e..0000000
--- a/data_bridges_client/model/view_extended_aggregated_price_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.view_extended_aggregated_price import ViewExtendedAggregatedPrice
- globals()['ViewExtendedAggregatedPrice'] = ViewExtendedAggregatedPrice
-
-
-class ViewExtendedAggregatedPricePagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([ViewExtendedAggregatedPrice], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """ViewExtendedAggregatedPricePagedResult - 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,)
- items ([ViewExtendedAggregatedPrice], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """ViewExtendedAggregatedPricePagedResult - 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,)
- items ([ViewExtendedAggregatedPrice], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/view_extended_alps_value.py b/data_bridges_client/model/view_extended_alps_value.py
deleted file mode 100644
index f2151ee..0000000
--- a/data_bridges_client/model/view_extended_alps_value.py
+++ /dev/null
@@ -1,328 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class ViewExtendedAlpsValue(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int, none_type,), # noqa: E501
- 'analysis_value_estimated_price': (float,), # noqa: E501
- 'analysis_value_pewi_value': (float,), # noqa: E501
- 'analysis_value_price_flag': (str, none_type,), # noqa: E501
- 'commodity_id': (int,), # noqa: E501
- 'commodity_name': (str, none_type,), # noqa: E501
- 'commodity_price_date': (datetime, none_type,), # noqa: E501
- 'commodity_price_date_month': (int, none_type,), # noqa: E501
- 'commodity_price_date_week': (int, none_type,), # noqa: E501
- 'commodity_price_date_year': (int,), # noqa: E501
- 'commodity_unit_id': (int,), # noqa: E501
- 'commodity_unit_name': (str, none_type,), # noqa: E501
- 'country_name': (str, none_type,), # noqa: E501
- 'currency_id': (int,), # noqa: E501
- 'currency_name': (str, none_type,), # noqa: E501
- 'market_id': (int,), # noqa: E501
- 'market_name': (str, none_type,), # noqa: E501
- 'price_type_id': (int,), # noqa: E501
- 'price_type_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'analysis_value_estimated_price': 'analysisValueEstimatedPrice', # noqa: E501
- 'analysis_value_pewi_value': 'analysisValuePewiValue', # noqa: E501
- 'analysis_value_price_flag': 'analysisValuePriceFlag', # noqa: E501
- 'commodity_id': 'commodityID', # noqa: E501
- 'commodity_name': 'commodityName', # noqa: E501
- 'commodity_price_date': 'commodityPriceDate', # noqa: E501
- 'commodity_price_date_month': 'commodityPriceDateMonth', # noqa: E501
- 'commodity_price_date_week': 'commodityPriceDateWeek', # noqa: E501
- 'commodity_price_date_year': 'commodityPriceDateYear', # noqa: E501
- 'commodity_unit_id': 'commodityUnitID', # noqa: E501
- 'commodity_unit_name': 'commodityUnitName', # noqa: E501
- 'country_name': 'countryName', # noqa: E501
- 'currency_id': 'currencyID', # noqa: E501
- 'currency_name': 'currencyName', # noqa: E501
- 'market_id': 'marketID', # noqa: E501
- 'market_name': 'marketName', # noqa: E501
- 'price_type_id': 'priceTypeID', # noqa: E501
- 'price_type_name': 'priceTypeName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """ViewExtendedAlpsValue - 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,)
- adm0_code (int, none_type): [optional] # noqa: E501
- analysis_value_estimated_price (float): [optional] # noqa: E501
- analysis_value_pewi_value (float): [optional] # noqa: E501
- analysis_value_price_flag (str, none_type): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price_date (datetime, none_type): [optional] # noqa: E501
- commodity_price_date_month (int, none_type): [optional] # noqa: E501
- commodity_price_date_week (int, none_type): [optional] # noqa: E501
- commodity_price_date_year (int): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- commodity_unit_name (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """ViewExtendedAlpsValue - 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,)
- adm0_code (int, none_type): [optional] # noqa: E501
- analysis_value_estimated_price (float): [optional] # noqa: E501
- analysis_value_pewi_value (float): [optional] # noqa: E501
- analysis_value_price_flag (str, none_type): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price_date (datetime, none_type): [optional] # noqa: E501
- commodity_price_date_month (int, none_type): [optional] # noqa: E501
- commodity_price_date_week (int, none_type): [optional] # noqa: E501
- commodity_price_date_year (int): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- commodity_unit_name (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/view_extended_alps_value_paged_result.py b/data_bridges_client/model/view_extended_alps_value_paged_result.py
deleted file mode 100644
index 68b28f4..0000000
--- a/data_bridges_client/model/view_extended_alps_value_paged_result.py
+++ /dev/null
@@ -1,263 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-def lazy_import():
- from data_bridges_client.model.view_extended_alps_value import ViewExtendedAlpsValue
- globals()['ViewExtendedAlpsValue'] = ViewExtendedAlpsValue
-
-
-class ViewExtendedAlpsValuePagedResult(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- 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 {
- 'items': ([ViewExtendedAlpsValue], none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'items': 'items', # noqa: E501
- }
-
- read_only_vars = {
- 'items', # noqa: E501
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """ViewExtendedAlpsValuePagedResult - 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,)
- items ([ViewExtendedAlpsValue], 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """ViewExtendedAlpsValuePagedResult - 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,)
- items ([ViewExtendedAlpsValue], 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/weekly_aggregated_price.py b/data_bridges_client/model/weekly_aggregated_price.py
deleted file mode 100644
index 81945ec..0000000
--- a/data_bridges_client/model/weekly_aggregated_price.py
+++ /dev/null
@@ -1,336 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class WeeklyAggregatedPrice(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int,), # noqa: E501
- 'commodity_date_month': (int,), # noqa: E501
- 'commodity_date_year': (int,), # noqa: E501
- 'commodity_id': (int,), # noqa: E501
- 'commodity_name': (str, none_type,), # noqa: E501
- 'commodity_price': (float,), # noqa: E501
- 'commodity_price_date': (datetime,), # noqa: E501
- 'commodity_price_flag': (str, none_type,), # noqa: E501
- 'commodity_price_observations': (int, none_type,), # noqa: E501
- 'commodity_price_source_name': (str, none_type,), # noqa: E501
- 'commodity_unit_id': (int,), # noqa: E501
- 'commodity_unit_name': (str, none_type,), # noqa: E501
- 'country_iso3': (str, none_type,), # noqa: E501
- 'country_name': (str, none_type,), # noqa: E501
- 'currency_id': (int,), # noqa: E501
- 'currency_name': (str, none_type,), # noqa: E501
- 'market_id': (int,), # noqa: E501
- 'market_name': (str, none_type,), # noqa: E501
- 'original_frequency': (str, none_type,), # noqa: E501
- 'price_type_id': (int,), # noqa: E501
- 'price_type_name': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'commodity_date_month': 'commodityDateMonth', # noqa: E501
- 'commodity_date_year': 'commodityDateYear', # noqa: E501
- 'commodity_id': 'commodityId', # noqa: E501
- 'commodity_name': 'commodityName', # noqa: E501
- 'commodity_price': 'commodityPrice', # noqa: E501
- 'commodity_price_date': 'commodityPriceDate', # noqa: E501
- 'commodity_price_flag': 'commodityPriceFlag', # noqa: E501
- 'commodity_price_observations': 'commodityPriceObservations', # noqa: E501
- 'commodity_price_source_name': 'commodityPriceSourceName', # noqa: E501
- 'commodity_unit_id': 'commodityUnitId', # noqa: E501
- 'commodity_unit_name': 'commodityUnitName', # noqa: E501
- 'country_iso3': 'countryISO3', # noqa: E501
- 'country_name': 'countryName', # noqa: E501
- 'currency_id': 'currencyId', # noqa: E501
- 'currency_name': 'currencyName', # noqa: E501
- 'market_id': 'marketId', # noqa: E501
- 'market_name': 'marketName', # noqa: E501
- 'original_frequency': 'originalFrequency', # noqa: E501
- 'price_type_id': 'priceTypeId', # noqa: E501
- 'price_type_name': 'priceTypeName', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """WeeklyAggregatedPrice - 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,)
- adm0_code (int): [optional] # noqa: E501
- commodity_date_month (int): [optional] # noqa: E501
- commodity_date_year (int): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price (float): [optional] # noqa: E501
- commodity_price_date (datetime): [optional] # noqa: E501
- commodity_price_flag (str, none_type): [optional] # noqa: E501
- commodity_price_observations (int, none_type): [optional] # noqa: E501
- commodity_price_source_name (str, none_type): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- commodity_unit_name (str, none_type): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- original_frequency (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """WeeklyAggregatedPrice - 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,)
- adm0_code (int): [optional] # noqa: E501
- commodity_date_month (int): [optional] # noqa: E501
- commodity_date_year (int): [optional] # noqa: E501
- commodity_id (int): [optional] # noqa: E501
- commodity_name (str, none_type): [optional] # noqa: E501
- commodity_price (float): [optional] # noqa: E501
- commodity_price_date (datetime): [optional] # noqa: E501
- commodity_price_flag (str, none_type): [optional] # noqa: E501
- commodity_price_observations (int, none_type): [optional] # noqa: E501
- commodity_price_source_name (str, none_type): [optional] # noqa: E501
- commodity_unit_id (int): [optional] # noqa: E501
- commodity_unit_name (str, none_type): [optional] # noqa: E501
- country_iso3 (str, none_type): [optional] # noqa: E501
- country_name (str, none_type): [optional] # noqa: E501
- currency_id (int): [optional] # noqa: E501
- currency_name (str, none_type): [optional] # noqa: E501
- market_id (int): [optional] # noqa: E501
- market_name (str, none_type): [optional] # noqa: E501
- original_frequency (str, none_type): [optional] # noqa: E501
- price_type_id (int): [optional] # noqa: E501
- price_type_name (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/xls_form_definition_dto.py b/data_bridges_client/model/xls_form_definition_dto.py
deleted file mode 100644
index 52149bd..0000000
--- a/data_bridges_client/model/xls_form_definition_dto.py
+++ /dev/null
@@ -1,272 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class XlsFormDefinitionDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'xls_form_field_label': (str, none_type,), # noqa: E501
- 'xls_form_field_name': (str, none_type,), # noqa: E501
- 'xls_form_field_row': (int,), # noqa: E501
- 'xls_form_field_type': (str, none_type,), # noqa: E501
- 'xls_form_list_id': (int, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'xls_form_field_label': 'xlsFormFieldLabel', # noqa: E501
- 'xls_form_field_name': 'xlsFormFieldName', # noqa: E501
- 'xls_form_field_row': 'xlsFormFieldRow', # noqa: E501
- 'xls_form_field_type': 'xlsFormFieldType', # noqa: E501
- 'xls_form_list_id': 'xlsFormListId', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """XlsFormDefinitionDTO - 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,)
- xls_form_field_label (str, none_type): [optional] # noqa: E501
- xls_form_field_name (str, none_type): [optional] # noqa: E501
- xls_form_field_row (int): [optional] # noqa: E501
- xls_form_field_type (str, none_type): [optional] # noqa: E501
- xls_form_list_id (int, 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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """XlsFormDefinitionDTO - 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,)
- xls_form_field_label (str, none_type): [optional] # noqa: E501
- xls_form_field_name (str, none_type): [optional] # noqa: E501
- xls_form_field_row (int): [optional] # noqa: E501
- xls_form_field_type (str, none_type): [optional] # noqa: E501
- xls_form_list_id (int, 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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model/xls_form_dto.py b/data_bridges_client/model/xls_form_dto.py
deleted file mode 100644
index 7fca1f8..0000000
--- a/data_bridges_client/model/xls_form_dto.py
+++ /dev/null
@@ -1,280 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import re # noqa: F401
-import sys # noqa: F401
-
-from data_bridges_client.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 data_bridges_client.exceptions import ApiAttributeError
-
-
-
-class XlsFormDTO(ModelNormal):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
-
- Attributes:
- allowed_values (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- with a capitalized key describing the allowed value and an allowed
- value. These dicts store the allowed enum values.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- discriminator_value_class_map (dict): A dict to go from the discriminator
- variable value to the discriminator class name.
- validations (dict): The key is the tuple path to the attribute
- and the for var_name this is (var_name,). The value is a dict
- that stores validations for max_length, min_length, max_items,
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
- inclusive_minimum, and regex.
- additional_properties_type (tuple): A tuple of classes accepted
- as additional properties values.
- """
-
- allowed_values = {
- }
-
- validations = {
- }
-
- @cached_property
- def additional_properties_type():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
- """
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
-
- _nullable = False
-
- @cached_property
- def openapi_types():
- """
- This must be a method because a model may have properties that are
- of type self, this must run after the class is loaded
-
- Returns
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- """
- return {
- 'adm0_code': (int, none_type,), # noqa: E501
- 'user_name': (str, none_type,), # noqa: E501
- 'xls_form_create_date': (datetime,), # noqa: E501
- 'xls_form_id': (int,), # noqa: E501
- 'xls_form_is_base_schema': (bool,), # noqa: E501
- 'xls_form_name': (str, none_type,), # noqa: E501
- 'xls_form_source_file': (str, none_type,), # noqa: E501
- }
-
- @cached_property
- def discriminator():
- return None
-
-
- attribute_map = {
- 'adm0_code': 'adm0Code', # noqa: E501
- 'user_name': 'userName', # noqa: E501
- 'xls_form_create_date': 'xlsFormCreateDate', # noqa: E501
- 'xls_form_id': 'xlsFormID', # noqa: E501
- 'xls_form_is_base_schema': 'xlsFormIsBaseSchema', # noqa: E501
- 'xls_form_name': 'xlsFormName', # noqa: E501
- 'xls_form_source_file': 'xlsFormSourceFile', # noqa: E501
- }
-
- read_only_vars = {
- }
-
- _composed_schemas = {}
-
- @classmethod
- @convert_js_args_to_python_args
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
- """XlsFormDTO - 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,)
- adm0_code (int, none_type): [optional] # noqa: E501
- user_name (str, none_type): [optional] # noqa: E501
- xls_form_create_date (datetime): [optional] # noqa: E501
- xls_form_id (int): [optional] # noqa: E501
- xls_form_is_base_schema (bool): [optional] # noqa: E501
- xls_form_name (str, none_type): [optional] # noqa: E501
- xls_form_source_file (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__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- return self
-
- required_properties = set([
- '_data_store',
- '_check_type',
- '_spec_property_naming',
- '_path_to_item',
- '_configuration',
- '_visited_composed_classes',
- ])
-
- @convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
- """XlsFormDTO - 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,)
- adm0_code (int, none_type): [optional] # noqa: E501
- user_name (str, none_type): [optional] # noqa: E501
- xls_form_create_date (datetime): [optional] # noqa: E501
- xls_form_id (int): [optional] # noqa: E501
- xls_form_is_base_schema (bool): [optional] # noqa: E501
- xls_form_name (str, none_type): [optional] # noqa: E501
- xls_form_source_file (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', ())
-
- if args:
- raise ApiTypeError(
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
- args,
- self.__class__.__name__,
- ),
- path_to_item=_path_to_item,
- valid_classes=(self.__class__,),
- )
-
- self._data_store = {}
- self._check_type = _check_type
- self._spec_property_naming = _spec_property_naming
- self._path_to_item = _path_to_item
- self._configuration = _configuration
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
-
- for var_name, var_value in kwargs.items():
- if var_name not in self.attribute_map and \
- self._configuration is not None and \
- self._configuration.discard_unknown_keys and \
- self.additional_properties_type is None:
- # discard variable.
- continue
- setattr(self, var_name, var_value)
- if var_name in self.read_only_vars:
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
- f"class with read only attributes.")
diff --git a/data_bridges_client/model_utils.py b/data_bridges_client/model_utils.py
deleted file mode 100644
index f36ff9c..0000000
--- a/data_bridges_client/model_utils.py
+++ /dev/null
@@ -1,2038 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-from datetime import date, datetime # noqa: F401
-from copy import deepcopy
-import inspect
-import io
-import os
-import pprint
-import re
-import tempfile
-
-from dateutil.parser import parse
-
-from data_bridges_client.exceptions import (
- ApiKeyError,
- ApiAttributeError,
- ApiTypeError,
- ApiValueError,
-)
-
-none_type = type(None)
-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 function methods that you want converted
- # into cached properties
- result_key = '_results'
-
- def __init__(self, fn):
- self._fn = fn
-
- def __get__(self, instance, cls=None):
- if self.result_key in vars(self):
- return vars(self)[self.result_key]
- else:
- result = self._fn()
- setattr(self, self.result_key, result)
- return result
-
-
-PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type)
-
-def allows_single_value_input(cls):
- """
- This function returns True if the input composed schema model or any
- descendant model allows a value only input
- This is true for cases where oneOf contains items like:
- oneOf:
- - float
- - NumberWithValidation
- - StringEnum
- - ArrayModel
- - null
- TODO: lru_cache this
- """
- if (
- issubclass(cls, ModelSimple) or
- cls in PRIMITIVE_TYPES
- ):
- return True
- elif issubclass(cls, ModelComposed):
- if not cls._composed_schemas['oneOf']:
- return False
- return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf'])
- return False
-
-def composed_model_input_classes(cls):
- """
- This function returns a list of the possible models that can be accepted as
- inputs.
- TODO: lru_cache this
- """
- if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES:
- return [cls]
- elif issubclass(cls, ModelNormal):
- if cls.discriminator is None:
- return [cls]
- else:
- return get_discriminated_classes(cls)
- elif issubclass(cls, ModelComposed):
- if not cls._composed_schemas['oneOf']:
- return []
- if cls.discriminator is None:
- input_classes = []
- for c in cls._composed_schemas['oneOf']:
- input_classes.extend(composed_model_input_classes(c))
- return input_classes
- else:
- return get_discriminated_classes(cls)
- return []
-
-
-class OpenApiModel(object):
- """The base class for all OpenAPIModels"""
-
- def set_attribute(self, name, value):
- # this is only used to set properties on self
-
- path_to_item = []
- if self._path_to_item:
- path_to_item.extend(self._path_to_item)
- path_to_item.append(name)
-
- if name in self.openapi_types:
- required_types_mixed = self.openapi_types[name]
- elif self.additional_properties_type is None:
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- path_to_item
- )
- elif self.additional_properties_type is not None:
- required_types_mixed = self.additional_properties_type
-
- if get_simple_class(name) != str:
- error_msg = type_error_message(
- var_name=name,
- var_value=name,
- valid_classes=(str,),
- key_type=True
- )
- raise ApiTypeError(
- error_msg,
- path_to_item=path_to_item,
- valid_classes=(str,),
- key_type=True
- )
-
- if self._check_type:
- value = validate_and_convert_types(
- value, required_types_mixed, path_to_item, self._spec_property_naming,
- self._check_type, configuration=self._configuration)
- if (name,) in self.allowed_values:
- check_allowed_values(
- self.allowed_values,
- (name,),
- value
- )
- if (name,) in self.validations:
- check_validations(
- self.validations,
- (name,),
- value,
- self._configuration
- )
- self.__dict__['_data_store'][name] = value
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
-
- def __setattr__(self, attr, value):
- """set the value of an attribute using dot notation: `instance.attr = val`"""
- self[attr] = value
-
- 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
- # 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 super(OpenApiModel, cls).__new__(cls)
-
- # 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 super(OpenApiModel, cls).__new__(cls)
-
- # 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 = super(OpenApiModel, cls).__new__(cls)
- self_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
-
-
-class ModelSimple(OpenApiModel):
- """the parent class of models whose type != object in their
- swagger/openapi"""
-
- def __setitem__(self, name, value):
- """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
- if name in self.required_properties:
- self.__dict__[name] = value
- return
-
- self.set_attribute(name, value)
-
- def get(self, name, default=None):
- """returns the value of an attribute or some default value if the attribute was not set"""
- if name in self.required_properties:
- return self.__dict__[name]
-
- return self.__dict__['_data_store'].get(name, default)
-
- def __getitem__(self, name):
- """get the value of an attribute using square-bracket notation: `instance[attr]`"""
- if name in self:
- return self.get(name)
-
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
-
- def __contains__(self, name):
- """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__
-
- return name in self.__dict__['_data_store']
-
- def to_str(self):
- """Returns the string representation of the model"""
- return str(self.value)
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, self.__class__):
- return False
-
- this_val = self._data_store['value']
- that_val = other._data_store['value']
- types = set()
- types.add(this_val.__class__)
- types.add(that_val.__class__)
- vals_equal = this_val == that_val
- return vals_equal
-
-
-class ModelNormal(OpenApiModel):
- """the parent class of models whose type == object in their
- swagger/openapi"""
-
- def __setitem__(self, name, value):
- """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
- if name in self.required_properties:
- self.__dict__[name] = value
- return
-
- self.set_attribute(name, value)
-
- def get(self, name, default=None):
- """returns the value of an attribute or some default value if the attribute was not set"""
- if name in self.required_properties:
- return self.__dict__[name]
-
- return self.__dict__['_data_store'].get(name, default)
-
- def __getitem__(self, name):
- """get the value of an attribute using square-bracket notation: `instance[attr]`"""
- if name in self:
- return self.get(name)
-
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
-
- def __contains__(self, name):
- """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__
-
- return name in self.__dict__['_data_store']
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- return model_to_dict(self, serialize=False)
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, self.__class__):
- return False
-
- if not set(self._data_store.keys()) == set(other._data_store.keys()):
- return False
- for _var_name, this_val in self._data_store.items():
- that_val = other._data_store[_var_name]
- types = set()
- types.add(this_val.__class__)
- types.add(that_val.__class__)
- vals_equal = this_val == that_val
- if not vals_equal:
- return False
- return True
-
-
-class ModelComposed(OpenApiModel):
- """the parent class of models whose type == object in their
- swagger/openapi and have oneOf/allOf/anyOf
-
- When one sets a property we use var_name_to_model_instances to store the value in
- the correct class instances + run any type checking + validation code.
- When one gets a property we use var_name_to_model_instances to get the value
- from the correct class instances.
- This allows multiple composed schemas to contain the same property with additive
- constraints on the value.
-
- _composed_schemas (dict) stores the anyOf/allOf/oneOf classes
- key (str): allOf/oneOf/anyOf
- value (list): the classes in the XOf definition.
- Note: none_type can be included when the openapi document version >= 3.1.0
- _composed_instances (list): stores a list of instances of the composed schemas
- defined in _composed_schemas. When properties are accessed in the self instance,
- they are returned from the self._data_store or the data stores in the instances
- in self._composed_schemas
- _var_name_to_model_instances (dict): maps between a variable name on self and
- the composed instances (self included) which contain that data
- key (str): property name
- value (list): list of class instances, self or instances in _composed_instances
- which contain the value that the key is referring to.
- """
-
- def __setitem__(self, name, value):
- """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
- if name in self.required_properties:
- self.__dict__[name] = value
- return
-
- """
- 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()
-
- def get(self, name, default=None):
- """returns the value of an attribute or some default value if the attribute was not set"""
- if name in self.required_properties:
- return self.__dict__[name]
-
- # get the attribute from the correct instance
- model_instances = self._var_name_to_model_instances.get(name)
- values = []
- # 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:
- v = model_instance._data_store[name]
- if v not in values:
- values.append(v)
- len_values = len(values)
- if len_values == 0:
- return default
- elif len_values == 1:
- return values[0]
- elif len_values > 1:
- raise ApiValueError(
- "Values stored for property {0} in {1} differ when looking "
- "at self and self's composed instances. All values must be "
- "the same".format(name, type(self).__name__),
- [e for e in [self._path_to_item, name] if e]
- )
-
- def __getitem__(self, name):
- """get the value of an attribute using square-bracket notation: `instance[attr]`"""
- value = self.get(name, self.__unset_attribute_value__)
- if value is self.__unset_attribute_value__:
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
- return value
-
- def __contains__(self, name):
- """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__
-
- 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 name in model_instance._data_store:
- return True
-
- return False
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- return model_to_dict(self, serialize=False)
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, self.__class__):
- return False
-
- if not set(self._data_store.keys()) == set(other._data_store.keys()):
- return False
- for _var_name, this_val in self._data_store.items():
- that_val = other._data_store[_var_name]
- types = set()
- types.add(this_val.__class__)
- types.add(that_val.__class__)
- vals_equal = this_val == that_val
- if not vals_equal:
- return False
- return True
-
-
-COERCION_INDEX_BY_TYPE = {
- ModelComposed: 0,
- ModelNormal: 1,
- ModelSimple: 2,
- none_type: 3, # The type of 'None'.
- list: 4,
- dict: 5,
- float: 6,
- int: 7,
- bool: 8,
- datetime: 9,
- date: 10,
- str: 11,
- file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type.
-}
-
-# these are used to limit what type conversions we try to do
-# when we have a valid type already and we want to try converting
-# to another type
-UPCONVERSION_TYPE_PAIRS = (
- (str, datetime),
- (str, date),
- (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float.
- (list, ModelComposed),
- (dict, ModelComposed),
- (str, ModelComposed),
- (int, ModelComposed),
- (float, ModelComposed),
- (list, ModelComposed),
- (list, ModelNormal),
- (dict, ModelNormal),
- (str, ModelSimple),
- (int, ModelSimple),
- (float, ModelSimple),
- (list, ModelSimple),
-)
-
-COERCIBLE_TYPE_PAIRS = {
- False: ( # client instantiation of a model with client data
- # (dict, ModelComposed),
- # (list, ModelComposed),
- # (dict, ModelNormal),
- # (list, ModelNormal),
- # (str, ModelSimple),
- # (int, ModelSimple),
- # (float, ModelSimple),
- # (list, ModelSimple),
- # (str, int),
- # (str, float),
- # (str, datetime),
- # (str, date),
- # (int, str),
- # (float, str),
- ),
- True: ( # server -> client data
- (dict, ModelComposed),
- (list, ModelComposed),
- (dict, ModelNormal),
- (list, ModelNormal),
- (str, ModelSimple),
- (int, ModelSimple),
- (float, ModelSimple),
- (list, ModelSimple),
- # (str, int),
- # (str, float),
- (str, datetime),
- (str, date),
- # (int, str),
- # (float, str),
- (str, file_type)
- ),
-}
-
-
-def get_simple_class(input_value):
- """Returns an input_value's simple class that we will use for type checking
- Python2:
- float and int will return int, where int is the python3 int backport
- str and unicode will return str, where str is the python3 str backport
- Note: float and int ARE both instances of int backport
- Note: str_py2 and unicode_py2 are NOT both instances of str backport
-
- Args:
- input_value (class/class_instance): the item for which we will return
- the simple class
- """
- if isinstance(input_value, type):
- # input_value is a class
- return input_value
- elif isinstance(input_value, tuple):
- return tuple
- elif isinstance(input_value, list):
- return list
- elif isinstance(input_value, dict):
- return dict
- elif isinstance(input_value, none_type):
- return none_type
- elif isinstance(input_value, file_type):
- return file_type
- elif isinstance(input_value, bool):
- # this must be higher than the int check because
- # isinstance(True, int) == True
- return bool
- elif isinstance(input_value, int):
- return int
- elif isinstance(input_value, datetime):
- # this must be higher than the date check because
- # isinstance(datetime_instance, date) == True
- return datetime
- elif isinstance(input_value, date):
- return date
- elif isinstance(input_value, str):
- return str
- return type(input_value)
-
-
-def check_allowed_values(allowed_values, input_variable_path, input_values):
- """Raises an exception if the input_values are not allowed
-
- Args:
- allowed_values (dict): the allowed_values dict
- input_variable_path (tuple): the path to the input variable
- input_values (list/str/int/float/date/datetime): the values that we
- are checking to see if they are in allowed_values
- """
- these_allowed_values = list(allowed_values[input_variable_path].values())
- if (isinstance(input_values, list)
- and not set(input_values).issubset(
- set(these_allowed_values))):
- invalid_values = ", ".join(
- map(str, set(input_values) - set(these_allowed_values))),
- raise ApiValueError(
- "Invalid values for `%s` [%s], must be a subset of [%s]" %
- (
- input_variable_path[0],
- invalid_values,
- ", ".join(map(str, these_allowed_values))
- )
- )
- elif (isinstance(input_values, dict)
- and not set(
- input_values.keys()).issubset(set(these_allowed_values))):
- invalid_values = ", ".join(
- map(str, set(input_values.keys()) - set(these_allowed_values)))
- raise ApiValueError(
- "Invalid keys in `%s` [%s], must be a subset of [%s]" %
- (
- input_variable_path[0],
- invalid_values,
- ", ".join(map(str, these_allowed_values))
- )
- )
- elif (not isinstance(input_values, (list, dict))
- and input_values not in these_allowed_values):
- raise ApiValueError(
- "Invalid value for `%s` (%s), must be one of %s" %
- (
- input_variable_path[0],
- input_values,
- these_allowed_values
- )
- )
-
-
-def is_json_validation_enabled(schema_keyword, configuration=None):
- """Returns true if JSON schema validation is enabled for the specified
- validation keyword. This can be used to skip JSON schema structural validation
- as requested in the configuration.
-
- Args:
- schema_keyword (string): the name of a JSON schema validation keyword.
- configuration (Configuration): the configuration class.
- """
-
- return (configuration is None or
- not hasattr(configuration, '_disabled_client_side_validations') or
- schema_keyword not in configuration._disabled_client_side_validations)
-
-
-def check_validations(
- validations, input_variable_path, input_values,
- configuration=None):
- """Raises an exception if the input_values are invalid
-
- Args:
- validations (dict): the validation dictionary.
- input_variable_path (tuple): the path to the input variable.
- input_values (list/str/int/float/date/datetime): the values that we
- are checking.
- configuration (Configuration): the configuration class.
- """
-
- if input_values is None:
- return
-
- current_validations = validations[input_variable_path]
- if (is_json_validation_enabled('multipleOf', configuration) and
- 'multiple_of' in current_validations and
- isinstance(input_values, (int, float)) and
- not (float(input_values) / current_validations['multiple_of']).is_integer()):
- # Note 'multipleOf' will be as good as the floating point arithmetic.
- raise ApiValueError(
- "Invalid value for `%s`, value must be a multiple of "
- "`%s`" % (
- input_variable_path[0],
- current_validations['multiple_of']
- )
- )
-
- if (is_json_validation_enabled('maxLength', configuration) and
- 'max_length' in current_validations and
- len(input_values) > current_validations['max_length']):
- raise ApiValueError(
- "Invalid value for `%s`, length must be less than or equal to "
- "`%s`" % (
- input_variable_path[0],
- current_validations['max_length']
- )
- )
-
- if (is_json_validation_enabled('minLength', configuration) and
- 'min_length' in current_validations and
- len(input_values) < current_validations['min_length']):
- raise ApiValueError(
- "Invalid value for `%s`, length must be greater than or equal to "
- "`%s`" % (
- input_variable_path[0],
- current_validations['min_length']
- )
- )
-
- if (is_json_validation_enabled('maxItems', configuration) and
- 'max_items' in current_validations and
- len(input_values) > current_validations['max_items']):
- raise ApiValueError(
- "Invalid value for `%s`, number of items must be less than or "
- "equal to `%s`" % (
- input_variable_path[0],
- current_validations['max_items']
- )
- )
-
- if (is_json_validation_enabled('minItems', configuration) and
- 'min_items' in current_validations and
- len(input_values) < current_validations['min_items']):
- raise ValueError(
- "Invalid value for `%s`, number of items must be greater than or "
- "equal to `%s`" % (
- input_variable_path[0],
- current_validations['min_items']
- )
- )
-
- items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum',
- 'inclusive_minimum')
- if (any(item in current_validations for item in items)):
- if isinstance(input_values, list):
- max_val = max(input_values)
- min_val = min(input_values)
- elif isinstance(input_values, dict):
- max_val = max(input_values.values())
- min_val = min(input_values.values())
- else:
- max_val = input_values
- min_val = input_values
-
- if (is_json_validation_enabled('exclusiveMaximum', configuration) and
- 'exclusive_maximum' in current_validations and
- max_val >= current_validations['exclusive_maximum']):
- raise ApiValueError(
- "Invalid value for `%s`, must be a value less than `%s`" % (
- input_variable_path[0],
- current_validations['exclusive_maximum']
- )
- )
-
- if (is_json_validation_enabled('maximum', configuration) and
- 'inclusive_maximum' in current_validations and
- max_val > current_validations['inclusive_maximum']):
- raise ApiValueError(
- "Invalid value for `%s`, must be a value less than or equal to "
- "`%s`" % (
- input_variable_path[0],
- current_validations['inclusive_maximum']
- )
- )
-
- if (is_json_validation_enabled('exclusiveMinimum', configuration) and
- 'exclusive_minimum' in current_validations and
- min_val <= current_validations['exclusive_minimum']):
- raise ApiValueError(
- "Invalid value for `%s`, must be a value greater than `%s`" %
- (
- input_variable_path[0],
- current_validations['exclusive_maximum']
- )
- )
-
- if (is_json_validation_enabled('minimum', configuration) and
- 'inclusive_minimum' in current_validations and
- min_val < current_validations['inclusive_minimum']):
- raise ApiValueError(
- "Invalid value for `%s`, must be a value greater than or equal "
- "to `%s`" % (
- input_variable_path[0],
- current_validations['inclusive_minimum']
- )
- )
- flags = current_validations.get('regex', {}).get('flags', 0)
- if (is_json_validation_enabled('pattern', configuration) and
- 'regex' in current_validations and
- not re.search(current_validations['regex']['pattern'],
- input_values, flags=flags)):
- err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % (
- input_variable_path[0],
- current_validations['regex']['pattern']
- )
- if flags != 0:
- # Don't print the regex flags if the flags are not
- # specified in the OAS document.
- err_msg = r"%s with flags=`%s`" % (err_msg, flags)
- raise ApiValueError(err_msg)
-
-
-def order_response_types(required_types):
- """Returns the required types sorted in coercion order
-
- Args:
- required_types (list/tuple): collection of classes or instance of
- list or dict with class information inside it.
-
- Returns:
- (list): coercion order sorted collection of classes or instance
- of list or dict with class information inside it.
- """
-
- def index_getter(class_or_instance):
- if isinstance(class_or_instance, list):
- return COERCION_INDEX_BY_TYPE[list]
- elif isinstance(class_or_instance, dict):
- return COERCION_INDEX_BY_TYPE[dict]
- elif (inspect.isclass(class_or_instance)
- and issubclass(class_or_instance, ModelComposed)):
- return COERCION_INDEX_BY_TYPE[ModelComposed]
- elif (inspect.isclass(class_or_instance)
- and issubclass(class_or_instance, ModelNormal)):
- return COERCION_INDEX_BY_TYPE[ModelNormal]
- elif (inspect.isclass(class_or_instance)
- and issubclass(class_or_instance, ModelSimple)):
- return COERCION_INDEX_BY_TYPE[ModelSimple]
- elif class_or_instance in COERCION_INDEX_BY_TYPE:
- return COERCION_INDEX_BY_TYPE[class_or_instance]
- raise ApiValueError("Unsupported type: %s" % class_or_instance)
-
- sorted_types = sorted(
- required_types,
- key=lambda class_or_instance: index_getter(class_or_instance)
- )
- return sorted_types
-
-
-def remove_uncoercible(required_types_classes, current_item, spec_property_naming,
- must_convert=True):
- """Only keeps the type conversions that are possible
-
- Args:
- required_types_classes (tuple): tuple of classes that are required
- these should be ordered by COERCION_INDEX_BY_TYPE
- 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 variables names in the input data are python
- variable names in PEP-8 snake case.
- current_item (any): the current item (input data) to be converted
-
- Keyword Args:
- must_convert (bool): if True the item to convert is of the wrong
- type and we want a big list of coercibles
- if False, we want a limited list of coercibles
-
- Returns:
- (list): the remaining coercible required types, classes only
- """
- current_type_simple = get_simple_class(current_item)
-
- results_classes = []
- for required_type_class in required_types_classes:
- # convert our models to OpenApiModel
- required_type_class_simplified = required_type_class
- if isinstance(required_type_class_simplified, type):
- if issubclass(required_type_class_simplified, ModelComposed):
- required_type_class_simplified = ModelComposed
- elif issubclass(required_type_class_simplified, ModelNormal):
- required_type_class_simplified = ModelNormal
- elif issubclass(required_type_class_simplified, ModelSimple):
- required_type_class_simplified = ModelSimple
-
- if required_type_class_simplified == current_type_simple:
- # don't consider converting to one's own class
- continue
-
- class_pair = (current_type_simple, required_type_class_simplified)
- if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]:
- results_classes.append(required_type_class)
- elif class_pair in UPCONVERSION_TYPE_PAIRS:
- results_classes.append(required_type_class)
- return results_classes
-
-def get_discriminated_classes(cls):
- """
- Returns all the classes that a discriminator converts to
- TODO: lru_cache this
- """
- possible_classes = []
- key = list(cls.discriminator.keys())[0]
- if is_type_nullable(cls):
- possible_classes.append(cls)
- for discr_cls in cls.discriminator[key].values():
- if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None:
- possible_classes.extend(get_discriminated_classes(discr_cls))
- else:
- possible_classes.append(discr_cls)
- return possible_classes
-
-
-def get_possible_classes(cls, from_server_context):
- # TODO: lru_cache this
- possible_classes = [cls]
- if from_server_context:
- return possible_classes
- if hasattr(cls, 'discriminator') and cls.discriminator is not None:
- possible_classes = []
- possible_classes.extend(get_discriminated_classes(cls))
- elif issubclass(cls, ModelComposed):
- possible_classes.extend(composed_model_input_classes(cls))
- return possible_classes
-
-
-def get_required_type_classes(required_types_mixed, spec_property_naming):
- """Converts the tuple required_types into a tuple and a dict described
- below
-
- Args:
- required_types_mixed (tuple/list): will contain either classes or
- instance of list or dict
- spec_property_naming (bool): if True these values came from the
- server, and we use the data types in our endpoints.
- If False, we are client side and we need to include
- oneOf and discriminator classes inside the data types in our endpoints
-
- Returns:
- (valid_classes, dict_valid_class_to_child_types_mixed):
- valid_classes (tuple): the valid classes that the current item
- should be
- dict_valid_class_to_child_types_mixed (dict):
- valid_class (class): this is the key
- child_types_mixed (list/dict/tuple): describes the valid child
- types
- """
- valid_classes = []
- child_req_types_by_current_type = {}
- for required_type in required_types_mixed:
- if isinstance(required_type, list):
- valid_classes.append(list)
- child_req_types_by_current_type[list] = required_type
- elif isinstance(required_type, tuple):
- valid_classes.append(tuple)
- child_req_types_by_current_type[tuple] = required_type
- elif isinstance(required_type, dict):
- valid_classes.append(dict)
- child_req_types_by_current_type[dict] = required_type[str]
- else:
- valid_classes.extend(get_possible_classes(required_type, spec_property_naming))
- return tuple(valid_classes), child_req_types_by_current_type
-
-
-def change_keys_js_to_python(input_dict, model_class):
- """
- Converts from javascript_key keys in the input_dict to python_keys in
- the output dict using the mapping in model_class.
- If the input_dict contains a key which does not declared in the model_class,
- the key is added to the output dict as is. The assumption is the model_class
- may have undeclared properties (additionalProperties attribute in the OAS
- document).
- """
-
- if getattr(model_class, 'attribute_map', None) is None:
- return input_dict
- output_dict = {}
- reversed_attr_map = {value: key for key, value in
- model_class.attribute_map.items()}
- for javascript_key, value in input_dict.items():
- python_key = reversed_attr_map.get(javascript_key)
- if python_key is None:
- # if the key is unknown, it is in error or it is an
- # additionalProperties variable
- python_key = javascript_key
- output_dict[python_key] = value
- return output_dict
-
-
-def get_type_error(var_value, path_to_item, valid_classes, key_type=False):
- error_msg = type_error_message(
- var_name=path_to_item[-1],
- var_value=var_value,
- valid_classes=valid_classes,
- key_type=key_type
- )
- return ApiTypeError(
- error_msg,
- path_to_item=path_to_item,
- valid_classes=valid_classes,
- key_type=key_type
- )
-
-
-def deserialize_primitive(data, klass, path_to_item):
- """Deserializes string to primitive type.
-
- :param data: str/int/float
- :param klass: str/class the class to convert to
-
- :return: int, float, str, bool, date, datetime
- """
- additional_message = ""
- try:
- if klass in {datetime, date}:
- additional_message = (
- "If you need your parameter to have a fallback "
- "string value, please set its type as `type: {}` in your "
- "spec. That allows the value to be any type. "
- )
- if klass == datetime:
- if len(data) < 8:
- raise ValueError("This is not a datetime")
- # The string should be in iso8601 datetime format.
- parsed_datetime = parse(data)
- date_only = (
- parsed_datetime.hour == 0 and
- parsed_datetime.minute == 0 and
- parsed_datetime.second == 0 and
- parsed_datetime.tzinfo is None and
- 8 <= len(data) <= 10
- )
- if date_only:
- raise ValueError("This is a date, not a datetime")
- return parsed_datetime
- elif klass == date:
- if len(data) < 8:
- raise ValueError("This is not a date")
- return parse(data).date()
- else:
- converted_value = klass(data)
- if isinstance(data, str) and klass == float:
- if str(converted_value) != data:
- # '7' -> 7.0 -> '7.0' != '7'
- raise ValueError('This is not a float')
- return converted_value
- except (OverflowError, ValueError) as ex:
- # parse can raise OverflowError
- raise ApiValueError(
- "{0}Failed to parse {1} as {2}".format(
- additional_message, repr(data), klass.__name__
- ),
- path_to_item=path_to_item
- ) from ex
-
-
-def get_discriminator_class(model_class,
- discr_name,
- discr_value, cls_visited):
- """Returns the child class specified by the discriminator.
-
- Args:
- model_class (OpenApiModel): the model class.
- discr_name (string): the name of the discriminator property.
- discr_value (any): the discriminator value.
- cls_visited (list): list of model classes that have been visited.
- Used to determine the discriminator class without
- visiting circular references indefinitely.
-
- Returns:
- used_model_class (class/None): the chosen child class that will be used
- to deserialize the data, for example dog.Dog.
- If a class is not found, None is returned.
- """
-
- if model_class in cls_visited:
- # The class has already been visited and no suitable class was found.
- return None
- cls_visited.append(model_class)
- used_model_class = None
- if discr_name in model_class.discriminator:
- class_name_to_discr_class = model_class.discriminator[discr_name]
- used_model_class = class_name_to_discr_class.get(discr_value)
- if used_model_class is None:
- # We didn't find a discriminated class in class_name_to_discr_class.
- # So look in the ancestor or descendant discriminators
- # The discriminator mapping may exist in a descendant (anyOf, oneOf)
- # or ancestor (allOf).
- # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat
- # hierarchy, the discriminator mappings may be defined at any level
- # in the hierarchy.
- # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig
- # if we try to make BasquePig from mammal, we need to travel through
- # the oneOf descendant discriminators to find BasquePig
- descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \
- model_class._composed_schemas.get('anyOf', ())
- ancestor_classes = model_class._composed_schemas.get('allOf', ())
- possible_classes = descendant_classes + ancestor_classes
- for cls in possible_classes:
- # Check if the schema has inherited discriminators.
- if hasattr(cls, 'discriminator') and cls.discriminator is not None:
- used_model_class = get_discriminator_class(
- cls, discr_name, discr_value, cls_visited)
- if used_model_class is not None:
- return used_model_class
- return used_model_class
-
-
-def deserialize_model(model_data, model_class, path_to_item, check_type,
- configuration, spec_property_naming):
- """Deserializes model_data to model instance.
-
- Args:
- model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model
- model_class (OpenApiModel): the model class
- path_to_item (list): path to the model in the received data
- check_type (bool): whether to check the data tupe for the values in
- the model
- configuration (Configuration): the instance to use to convert files
- 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 variables names in the input data are python
- variable names in PEP-8 snake case.
-
- Returns:
- model instance
-
- Raise:
- ApiTypeError
- ApiValueError
- ApiKeyError
- """
-
- kw_args = dict(_check_type=check_type,
- _path_to_item=path_to_item,
- _configuration=configuration,
- _spec_property_naming=spec_property_naming)
-
- if issubclass(model_class, ModelSimple):
- return model_class._new_from_openapi_data(model_data, **kw_args)
- elif isinstance(model_data, list):
- return model_class._new_from_openapi_data(*model_data, **kw_args)
- if isinstance(model_data, dict):
- kw_args.update(model_data)
- return model_class._new_from_openapi_data(**kw_args)
- elif isinstance(model_data, PRIMITIVE_TYPES):
- return model_class._new_from_openapi_data(model_data, **kw_args)
-
-
-def deserialize_file(response_data, configuration, content_disposition=None):
- """Deserializes body to file
-
- Saves response body into a file in a temporary folder,
- using the filename from the `Content-Disposition` header if provided.
-
- Args:
- param response_data (str): the file data to write
- configuration (Configuration): the instance to use to convert files
-
- Keyword Args:
- content_disposition (str): the value of the Content-Disposition
- header
-
- Returns:
- (file_type): the deserialized file which is open
- The user is responsible for closing and reading the file
- """
- fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path)
- os.close(fd)
- os.remove(path)
-
- if content_disposition:
- filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
- content_disposition).group(1)
- path = os.path.join(os.path.dirname(path), filename)
-
- with open(path, "wb") as f:
- if isinstance(response_data, str):
- # change str to bytes so we can write it
- response_data = response_data.encode('utf-8')
- f.write(response_data)
-
- f = open(path, "rb")
- return f
-
-
-def attempt_convert_item(input_value, valid_classes, path_to_item,
- configuration, spec_property_naming, key_type=False,
- must_convert=False, check_type=True):
- """
- Args:
- input_value (any): the data to convert
- valid_classes (any): the classes that are valid
- path_to_item (list): the path to the item to convert
- configuration (Configuration): the instance to use to convert files
- 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 variables names in the input data are python
- variable names in PEP-8 snake case.
- key_type (bool): if True we need to convert a key type (not supported)
- must_convert (bool): if True we must convert
- check_type (bool): if True we check the type or the returned data in
- ModelComposed/ModelNormal/ModelSimple instances
-
- Returns:
- instance (any) the fixed item
-
- Raises:
- ApiTypeError
- ApiValueError
- ApiKeyError
- """
- valid_classes_ordered = order_response_types(valid_classes)
- valid_classes_coercible = remove_uncoercible(
- valid_classes_ordered, input_value, spec_property_naming)
- if not valid_classes_coercible or key_type:
- # we do not handle keytype errors, json will take care
- # of this for us
- if configuration is None or not configuration.discard_unknown_keys:
- raise get_type_error(input_value, path_to_item, valid_classes,
- key_type=key_type)
- for valid_class in valid_classes_coercible:
- try:
- if issubclass(valid_class, OpenApiModel):
- return deserialize_model(input_value, valid_class,
- path_to_item, check_type,
- configuration, spec_property_naming)
- elif valid_class == file_type:
- return deserialize_file(input_value, configuration)
- return deserialize_primitive(input_value, valid_class,
- path_to_item)
- except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc:
- if must_convert:
- raise conversion_exc
- # if we have conversion errors when must_convert == False
- # we ignore the exception and move on to the next class
- continue
- # we were unable to convert, must_convert == False
- return input_value
-
-
-def is_type_nullable(input_type):
- """
- Returns true if None is an allowed value for the specified input_type.
-
- A type is nullable if at least one of the following conditions is true:
- 1. The OAS 'nullable' attribute has been specified,
- 1. The type is the 'null' type,
- 1. The type is a anyOf/oneOf composed schema, and a child schema is
- the 'null' type.
- Args:
- input_type (type): the class of the input_value that we are
- checking
- Returns:
- bool
- """
- if input_type is none_type:
- return True
- if issubclass(input_type, OpenApiModel) and input_type._nullable:
- return True
- if issubclass(input_type, ModelComposed):
- # If oneOf/anyOf, check if the 'null' type is one of the allowed types.
- for t in input_type._composed_schemas.get('oneOf', ()):
- if is_type_nullable(t): return True
- for t in input_type._composed_schemas.get('anyOf', ()):
- if is_type_nullable(t): return True
- return False
-
-
-def is_valid_type(input_class_simple, valid_classes):
- """
- Args:
- input_class_simple (class): the class of the input_value that we are
- checking
- valid_classes (tuple): the valid classes that the current item
- should be
- 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 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
- if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator):
- continue
- discr_propertyname_py = list(valid_class.discriminator.keys())[0]
- discriminator_classes = (
- valid_class.discriminator[discr_propertyname_py].values()
- )
- valid_type = is_valid_type(input_class_simple, discriminator_classes)
- if valid_type:
- return True
- return valid_type
-
-
-def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
- spec_property_naming, _check_type, configuration=None):
- """Raises a TypeError is there is a problem, otherwise returns value
-
- Args:
- input_value (any): the data to validate/convert
- required_types_mixed (list/dict/tuple): A list of
- valid classes, or a list tuples of valid classes, or a dict where
- the value is a tuple of value classes
- path_to_item: (list) the path to the data being validated
- this stores a list of keys or indices to get to the data being
- validated
- 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 variables names in the input data are python
- variable names in PEP-8 snake case.
- _check_type: (boolean) if true, type will be checked and conversion
- will be attempted.
- configuration: (Configuration): the configuration class to use
- when converting file_type items.
- If passed, conversion will be attempted when possible
- If not passed, no conversions will be attempted and
- exceptions will be raised
-
- Returns:
- the correctly typed value
-
- Raises:
- ApiTypeError
- """
- results = get_required_type_classes(required_types_mixed, spec_property_naming)
- valid_classes, child_req_types_by_current_type = results
-
- input_class_simple = get_simple_class(input_value)
- valid_type = is_valid_type(input_class_simple, valid_classes)
- if not valid_type:
- if configuration:
- # if input_value is not valid_type try to convert it
- converted_instance = attempt_convert_item(
- input_value,
- valid_classes,
- path_to_item,
- configuration,
- spec_property_naming,
- key_type=False,
- must_convert=True,
- check_type=_check_type
- )
- return converted_instance
- else:
- raise get_type_error(input_value, path_to_item, valid_classes,
- key_type=False)
-
- # input_value's type is in valid_classes
- if len(valid_classes) > 1 and configuration:
- # there are valid classes which are not the current class
- valid_classes_coercible = remove_uncoercible(
- valid_classes, input_value, spec_property_naming, must_convert=False)
- if valid_classes_coercible:
- converted_instance = attempt_convert_item(
- input_value,
- valid_classes_coercible,
- path_to_item,
- configuration,
- spec_property_naming,
- key_type=False,
- must_convert=False,
- check_type=_check_type
- )
- return converted_instance
-
- if child_req_types_by_current_type == {}:
- # all types are of the required types and there are no more inner
- # variables left to look at
- return input_value
- inner_required_types = child_req_types_by_current_type.get(
- type(input_value)
- )
- if inner_required_types is None:
- # for this type, there are not more inner variables left to look at
- return input_value
- if isinstance(input_value, list):
- if input_value == []:
- # allow an empty list
- return input_value
- for index, inner_value in enumerate(input_value):
- inner_path = list(path_to_item)
- inner_path.append(index)
- input_value[index] = validate_and_convert_types(
- inner_value,
- inner_required_types,
- inner_path,
- spec_property_naming,
- _check_type,
- configuration=configuration
- )
- elif isinstance(input_value, dict):
- if input_value == {}:
- # allow an empty dict
- return input_value
- for inner_key, inner_val in input_value.items():
- inner_path = list(path_to_item)
- inner_path.append(inner_key)
- if get_simple_class(inner_key) != str:
- raise get_type_error(inner_key, inner_path, valid_classes,
- key_type=True)
- input_value[inner_key] = validate_and_convert_types(
- inner_val,
- inner_required_types,
- inner_path,
- spec_property_naming,
- _check_type,
- configuration=configuration
- )
- return input_value
-
-
-def model_to_dict(model_instance, serialize=True):
- """Returns the model properties as a dict
-
- Args:
- model_instance (one of your model instances): the model instance that
- will be converted to a dict.
-
- Keyword Args:
- serialize (bool): if True, the keys in the dict will be values from
- attribute_map
- """
- result = {}
- extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item
-
- 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
- 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:
- # 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)
- elif isinstance(v, dict):
- res.append(dict(map(
- extract_item,
- v.items()
- )))
- else:
- res.append(model_to_dict(v, serialize=serialize))
- result[attr] = res
- elif isinstance(value, dict):
- result[attr] = dict(map(
- extract_item,
- value.items()
- ))
- elif isinstance(value, ModelSimple):
- result[attr] = value.value
- elif hasattr(value, '_data_store'):
- 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
-
-
-def type_error_message(var_value=None, var_name=None, valid_classes=None,
- key_type=None):
- """
- Keyword Args:
- var_value (any): the variable which has the type_error
- var_name (str): the name of the variable which has the typ error
- valid_classes (tuple): the accepted classes for current_item's
- value
- key_type (bool): False if our value is a value in a dict
- True if it is a key in a dict
- False if our item is an item in a list
- """
- key_or_value = 'value'
- if key_type:
- key_or_value = 'key'
- valid_classes_phrase = get_valid_classes_phrase(valid_classes)
- msg = (
- "Invalid type for variable '{0}'. Required {1} type {2} and "
- "passed type was {3}".format(
- var_name,
- key_or_value,
- valid_classes_phrase,
- type(var_value).__name__,
- )
- )
- return msg
-
-
-def get_valid_classes_phrase(input_classes):
- """Returns a string phrase describing what types are allowed
- """
- all_classes = list(input_classes)
- all_classes = sorted(all_classes, key=lambda cls: cls.__name__)
- all_class_names = [cls.__name__ for cls in all_classes]
- if len(all_class_names) == 1:
- return 'is {0}'.format(all_class_names[0])
- return "is one of [{0}]".format(", ".join(all_class_names))
-
-
-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):
- metadata arguments:
- _check_type
- _path_to_item
- _spec_property_naming
- _configuration
- _visited_composed_classes
-
- Returns
- composed_instances (list)
- """
- composed_instances = []
- for allof_class in self._composed_schemas['allOf']:
-
- try:
- 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(
- "Invalid inputs given to generate an instance of '%s'. The "
- "input data was invalid for the allOf schema '%s' in the composed "
- "schema '%s'. Error=%s" % (
- allof_class.__name__,
- allof_class.__name__,
- self.__class__.__name__,
- str(ex)
- )
- ) from ex
- return composed_instances
-
-
-def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
- """
- Find the oneOf schema that matches the input data (e.g. payload).
- If exactly one schema matches the input data, an instance of that schema
- is returned.
- If zero or more than one schema match the input data, an exception is raised.
- In OAS 3.x, the payload MUST, by validation, match exactly one of the
- schemas described by oneOf.
-
- Args:
- cls: the class we are handling
- model_kwargs (dict): var_name to var_value
- The input data, e.g. the payload that must match a oneOf schema
- in the OpenAPI document.
- constant_kwargs (dict): var_name to var_value
- args that every model requires, including configuration, server
- and path to item.
-
- Kwargs:
- model_arg: (int, float, bool, str, date, datetime, ModelSimple, None):
- the value to assign to a primitive class or ModelSimple class
- Notes:
- - this is only passed in when oneOf includes types which are not object
- - None is used to suppress handling of model_arg, nullable models are handled in __new__
-
- Returns
- oneof_instance (instance)
- """
- if len(cls._composed_schemas['oneOf']) == 0:
- return None
-
- oneof_instances = []
- # Iterate over each oneOf schema and determine if the input data
- # matches the oneOf schemas.
- for oneof_class in cls._composed_schemas['oneOf']:
- # The composed oneOf schema allows the 'null' type and the input data
- # is the null value. This is a OAS >= 3.1 feature.
- if oneof_class is none_type:
- # skip none_types because we are deserializing dict data.
- # none_type deserialization is handled in the __new__ method
- continue
-
- single_value_input = allows_single_value_input(oneof_class)
-
- try:
- if not single_value_input:
- 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):
- 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,
- (oneof_class,),
- constant_kwargs['_path_to_item'],
- constant_kwargs['_spec_property_naming'],
- constant_kwargs['_check_type'],
- configuration=constant_kwargs['_configuration']
- )
- oneof_instances.append(oneof_instance)
- except Exception:
- pass
- if len(oneof_instances) == 0:
- raise ApiValueError(
- "Invalid inputs given to generate an instance of %s. None "
- "of the oneOf schemas matched the input data." %
- cls.__name__
- )
- elif len(oneof_instances) > 1:
- raise ApiValueError(
- "Invalid inputs given to generate an instance of %s. Multiple "
- "oneOf schemas matched the inputs, but a max of one is allowed." %
- cls.__name__
- )
- return oneof_instances[0]
-
-
-def get_anyof_instances(self, model_args, constant_args):
- """
- Args:
- self: the class we are handling
- model_args (dict): var_name to var_value
- The input data, e.g. the payload that must match at least one
- anyOf child schema in the OpenAPI document.
- constant_args (dict): var_name to var_value
- args that every model requires, including configuration, server
- and path to item.
-
- Returns
- anyof_instances (list)
- """
- anyof_instances = []
- if len(self._composed_schemas['anyOf']) == 0:
- return anyof_instances
-
- for anyof_class in self._composed_schemas['anyOf']:
- # The composed oneOf schema allows the 'null' type and the input data
- # is the null value. This is a OAS >= 3.1 feature.
- if anyof_class is none_type:
- # skip none_types because we are deserializing dict data.
- # none_type deserialization is handled in the __new__ method
- continue
-
- try:
- 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
- if len(anyof_instances) == 0:
- raise ApiValueError(
- "Invalid inputs given to generate an instance of %s. None of the "
- "anyOf schemas matched the inputs." %
- self.__class__.__name__
- )
- return anyof_instances
-
-
-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 instance in composed_instances:
- if instance.__class__ in self._composed_schemas['allOf']:
- 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:
- 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):
- """
- For composed schemas, generate schema instances for
- all schemas in the oneOf/anyOf/allOf definition. If additional
- properties are allowed, also assign those properties on
- all matched schemas that contain additionalProperties.
- Openapi schemas are python classes.
-
- Exceptions are raised if:
- - 0 or > 1 oneOf schema matches the model_args input data
- - no anyOf schema matches the model_args input data
- - any of the allOf schemas do not match the model_args input data
-
- Args:
- constant_args (dict): these are the args that every model requires
- model_args (dict): these are the required and optional spec args that
- were passed in to make this model
- self (class): the class that we are instantiating
- This class contains self._composed_schemas
-
- Returns:
- composed_info (list): length three
- composed_instances (list): the composed instances which are not
- self
- var_name_to_model_instances (dict): a dict going from var_name
- to the model_instance which holds that var_name
- the model_instance may be self or an instance of one of the
- classes in self.composed_instances()
- additional_properties_model_instances (list): a list of the
- model instances which have the property
- additional_properties_type. This list can include self
- """
- # create composed_instances
- composed_instances = []
- allof_instances = get_allof_instances(self, model_args, constant_args)
- composed_instances.extend(allof_instances)
- oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args)
- if oneof_instance is not None:
- 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]
-
- """
- 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)
-
- # 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,
- discarded_args
- ]
diff --git a/data_bridges_client/models/__init__.py b/data_bridges_client/models/__init__.py
index 7790e9c..1ba6fe8 100644
--- a/data_bridges_client/models/__init__.py
+++ b/data_bridges_client/models/__init__.py
@@ -1,66 +1,66 @@
+# coding: utf-8
+
# flake8: noqa
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-# import all models into this package
-# if you have many models here with many references from one model to another this may
-# raise a RecursionError
-# to avoid this, import only the models that you directly need like:
-# from from data_bridges_client.model.pet import Pet
-# or import this package, but before doing it, use:
-# import sys
-# sys.setrecursionlimit(n)
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.commodity_dto import CommodityDTO
-from data_bridges_client.model.commodity_price_dto import CommodityPriceDTO
-from data_bridges_client.model.commodity_processing_dto import CommodityProcessingDTO
-from data_bridges_client.model.commodity_quality_dto import CommodityQualityDTO
-from data_bridges_client.model.coordinate import Coordinate
-from data_bridges_client.model.coordinate_equality_comparer import CoordinateEqualityComparer
-from data_bridges_client.model.coordinate_sequence import CoordinateSequence
-from data_bridges_client.model.coordinate_sequence_factory import CoordinateSequenceFactory
-from data_bridges_client.model.currency_dto import CurrencyDTO
-from data_bridges_client.model.dimension import Dimension
-from data_bridges_client.model.economic_indicator_property import EconomicIndicatorProperty
-from data_bridges_client.model.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
-from data_bridges_client.model.envelope import Envelope
-from data_bridges_client.model.geometry import Geometry
-from data_bridges_client.model.geometry_factory import GeometryFactory
-from data_bridges_client.model.geometry_overlay import GeometryOverlay
-from data_bridges_client.model.gorp_value_with_changes import GorpValueWithChanges
-from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
-from data_bridges_client.model.i_attributes_table import IAttributesTable
-from data_bridges_client.model.i_feature import IFeature
-from data_bridges_client.model.ipc_value import IpcValue
-from data_bridges_client.model.ipc_value_paged_result import IpcValuePagedResult
-from data_bridges_client.model.mfi_processed_data_dto import MFIProcessedDataDTO
-from data_bridges_client.model.nearby_markets_dto import NearbyMarketsDTO
-from data_bridges_client.model.nts_geometry_services import NtsGeometryServices
-from data_bridges_client.model.ogc_geometry_type import OgcGeometryType
-from data_bridges_client.model.ordinates import Ordinates
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
-from data_bridges_client.model.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
-from data_bridges_client.model.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
-from data_bridges_client.model.paged_currency_list_dto import PagedCurrencyListDTO
-from data_bridges_client.model.paged_processed_data_dto import PagedProcessedDataDTO
-from data_bridges_client.model.paged_survey_list_dto import PagedSurveyListDTO
-from data_bridges_client.model.paged_xls_form_list_dto import PagedXlsFormListDTO
-from data_bridges_client.model.point import Point
-from data_bridges_client.model.precision_model import PrecisionModel
-from data_bridges_client.model.precision_models import PrecisionModels
-from data_bridges_client.model.problem_details import ProblemDetails
-from data_bridges_client.model.rpme_assessment import RpmeAssessment
-from data_bridges_client.model.rpme_assessment_paged_result import RpmeAssessmentPagedResult
-from data_bridges_client.model.rpme_output_values import RpmeOutputValues
-from data_bridges_client.model.rpme_variable import RpmeVariable
-from data_bridges_client.model.rpme_variable_paged_result import RpmeVariablePagedResult
-from data_bridges_client.model.survey_details_dto import SurveyDetailsDTO
-from data_bridges_client.model.survey_list_dto import SurveyListDTO
-from data_bridges_client.model.usd_indirect_quotation import UsdIndirectQuotation
-from data_bridges_client.model.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
-from data_bridges_client.model.view_extended_aggregated_price import ViewExtendedAggregatedPrice
-from data_bridges_client.model.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
-from data_bridges_client.model.view_extended_alps_value import ViewExtendedAlpsValue
-from data_bridges_client.model.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
-from data_bridges_client.model.weekly_aggregated_price import WeeklyAggregatedPrice
-from data_bridges_client.model.xls_form_dto import XlsFormDTO
-from data_bridges_client.model.xls_form_definition_dto import XlsFormDefinitionDTO
+# import models into model package
+from data_bridges_client.models.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.commodity_dto import CommodityDTO
+from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO
+from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO
+from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO
+from data_bridges_client.models.currency_dto import CurrencyDTO
+from data_bridges_client.models.economic_data_dto import EconomicDataDTO
+from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty
+from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+from data_bridges_client.models.feature import Feature
+from data_bridges_client.models.geometry import Geometry
+from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO
+from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult
+from data_bridges_client.models.ipc_value import IpcValue
+from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult
+from data_bridges_client.models.key_name_dto import KeyNameDto
+from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO
+from data_bridges_client.models.market_dto import MarketDTO
+from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot
+from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
+from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO
+from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO
+from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO
+from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.models.problem_details import ProblemDetails
+from data_bridges_client.models.properties import Properties
+from data_bridges_client.models.rpme_assessment import RpmeAssessment
+from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+from data_bridges_client.models.rpme_output_values import RpmeOutputValues
+from data_bridges_client.models.rpme_variable import RpmeVariable
+from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult
+from data_bridges_client.models.survey_list_dto import SurveyListDTO
+from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation
+from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue
+from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice
+from data_bridges_client.models.xls_form_dto import XlsFormDTO
+from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
diff --git a/data_bridges_client/models/bad_request_dto.py b/data_bridges_client/models/bad_request_dto.py
new file mode 100644
index 0000000..c724104
--- /dev/null
+++ b/data_bridges_client/models/bad_request_dto.py
@@ -0,0 +1,108 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class BadRequestDTO(BaseModel):
+ """
+
+ """ # noqa: E501
+ error: Optional[StrictStr] = Field(default=None, description="The error message returned by the application")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["error"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of BadRequestDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if error (nullable) is None
+ # and model_fields_set contains the field
+ if self.error is None and "error" in self.model_fields_set:
+ _dict['error'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of BadRequestDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "error": obj.get("error")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/commodity_dto.py b/data_bridges_client/models/commodity_dto.py
new file mode 100644
index 0000000..318ad25
--- /dev/null
+++ b/data_bridges_client/models/commodity_dto.py
@@ -0,0 +1,172 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO
+from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CommodityDTO(BaseModel):
+ """
+ CommodityDTO
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="The internal ID of the commodity")
+ parent_id: Optional[StrictInt] = Field(default=None, description="The internal parent ID of the commodity", alias="parentId")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the commodity")
+ coicop2018: Optional[StrictStr] = Field(default=None, description="The COICOP 2018 definition")
+ supply: Optional[StrictInt] = None
+ category_id: Optional[StrictInt] = Field(default=None, alias="categoryId")
+ create_date: Optional[datetime] = Field(default=None, alias="createDate")
+ update_date: Optional[datetime] = Field(default=None, alias="updateDate")
+ qualities: Optional[List[CommodityQualityDTO]] = None
+ processing: Optional[List[CommodityProcessingDTO]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "parentId", "name", "coicop2018", "supply", "categoryId", "createDate", "updateDate", "qualities", "processing"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CommodityDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in qualities (list)
+ _items = []
+ if self.qualities:
+ for _item in self.qualities:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['qualities'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in processing (list)
+ _items = []
+ if self.processing:
+ for _item in self.processing:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['processing'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if parent_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.parent_id is None and "parent_id" in self.model_fields_set:
+ _dict['parentId'] = None
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if coicop2018 (nullable) is None
+ # and model_fields_set contains the field
+ if self.coicop2018 is None and "coicop2018" in self.model_fields_set:
+ _dict['coicop2018'] = None
+
+ # set to None if supply (nullable) is None
+ # and model_fields_set contains the field
+ if self.supply is None and "supply" in self.model_fields_set:
+ _dict['supply'] = None
+
+ # set to None if update_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.update_date is None and "update_date" in self.model_fields_set:
+ _dict['updateDate'] = None
+
+ # set to None if qualities (nullable) is None
+ # and model_fields_set contains the field
+ if self.qualities is None and "qualities" in self.model_fields_set:
+ _dict['qualities'] = None
+
+ # set to None if processing (nullable) is None
+ # and model_fields_set contains the field
+ if self.processing is None and "processing" in self.model_fields_set:
+ _dict['processing'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CommodityDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "parentId": obj.get("parentId"),
+ "name": obj.get("name"),
+ "coicop2018": obj.get("coicop2018"),
+ "supply": obj.get("supply"),
+ "categoryId": obj.get("categoryId"),
+ "createDate": obj.get("createDate"),
+ "updateDate": obj.get("updateDate"),
+ "qualities": [CommodityQualityDTO.from_dict(_item) for _item in obj.get("qualities")] if obj.get("qualities") is not None else None,
+ "processing": [CommodityProcessingDTO.from_dict(_item) for _item in obj.get("processing")] if obj.get("processing") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/commodity_price_dto.py b/data_bridges_client/models/commodity_price_dto.py
new file mode 100644
index 0000000..d09a96c
--- /dev/null
+++ b/data_bridges_client/models/commodity_price_dto.py
@@ -0,0 +1,233 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CommodityPriceDTO(BaseModel):
+ """
+ CommodityPriceDTO
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="The internal ID of the commodity")
+ commodity_id: Optional[StrictInt] = Field(default=None, alias="commodityId")
+ market_id: Optional[StrictInt] = Field(default=None, alias="marketId")
+ price_type_id: Optional[StrictInt] = Field(default=None, alias="priceTypeId")
+ commodity_unit_id: Optional[StrictInt] = Field(default=None, alias="commodityUnitId")
+ currency_id: Optional[StrictInt] = Field(default=None, alias="currencyId")
+ commodity_name: Optional[StrictStr] = Field(default=None, alias="commodityName")
+ market_name: Optional[StrictStr] = Field(default=None, alias="marketName")
+ price_type_name: Optional[StrictStr] = Field(default=None, alias="priceTypeName")
+ unit_name: Optional[StrictStr] = Field(default=None, alias="unitName")
+ currency_name: Optional[StrictStr] = Field(default=None, alias="currencyName")
+ original_frequency: Optional[StrictStr] = Field(default=None, alias="originalFrequency")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ country_iso3: Optional[StrictStr] = Field(default=None, alias="countryISO3")
+ country_name: Optional[StrictStr] = Field(default=None, alias="countryName")
+ commodity_price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="commodityPrice")
+ commodity_price_source_name: Optional[StrictStr] = Field(default=None, alias="commodityPriceSourceName")
+ commodity_price_metadata: Optional[Any] = Field(default=None, alias="commodityPriceMetadata")
+ commodity_price_date: Optional[datetime] = Field(default=None, alias="commodityPriceDate")
+ commodity_price_observations: Optional[StrictInt] = Field(default=None, alias="commodityPriceObservations")
+ commodity_price_date_day: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateDay")
+ commodity_price_date_week: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateWeek")
+ commodity_price_date_month: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateMonth")
+ commodity_price_date_year: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateYear")
+ commodity_price_insert_date: Optional[datetime] = Field(default=None, alias="commodityPriceInsertDate")
+ commodity_price_flag: Optional[StrictStr] = Field(default=None, alias="commodityPriceFlag")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "commodityId", "marketId", "priceTypeId", "commodityUnitId", "currencyId", "commodityName", "marketName", "priceTypeName", "unitName", "currencyName", "originalFrequency", "adm0Code", "countryISO3", "countryName", "commodityPrice", "commodityPriceSourceName", "commodityPriceMetadata", "commodityPriceDate", "commodityPriceObservations", "commodityPriceDateDay", "commodityPriceDateWeek", "commodityPriceDateMonth", "commodityPriceDateYear", "commodityPriceInsertDate", "commodityPriceFlag"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CommodityPriceDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if commodity_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_name is None and "commodity_name" in self.model_fields_set:
+ _dict['commodityName'] = None
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ # set to None if price_type_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.price_type_name is None and "price_type_name" in self.model_fields_set:
+ _dict['priceTypeName'] = None
+
+ # set to None if unit_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.unit_name is None and "unit_name" in self.model_fields_set:
+ _dict['unitName'] = None
+
+ # set to None if currency_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency_name is None and "currency_name" in self.model_fields_set:
+ _dict['currencyName'] = None
+
+ # set to None if original_frequency (nullable) is None
+ # and model_fields_set contains the field
+ if self.original_frequency is None and "original_frequency" in self.model_fields_set:
+ _dict['originalFrequency'] = None
+
+ # set to None if country_iso3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_iso3 is None and "country_iso3" in self.model_fields_set:
+ _dict['countryISO3'] = None
+
+ # set to None if country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_name is None and "country_name" in self.model_fields_set:
+ _dict['countryName'] = None
+
+ # set to None if commodity_price_source_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_source_name is None and "commodity_price_source_name" in self.model_fields_set:
+ _dict['commodityPriceSourceName'] = None
+
+ # set to None if commodity_price_metadata (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_metadata is None and "commodity_price_metadata" in self.model_fields_set:
+ _dict['commodityPriceMetadata'] = None
+
+ # set to None if commodity_price_observations (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_observations is None and "commodity_price_observations" in self.model_fields_set:
+ _dict['commodityPriceObservations'] = None
+
+ # set to None if commodity_price_date_day (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date_day is None and "commodity_price_date_day" in self.model_fields_set:
+ _dict['commodityPriceDateDay'] = None
+
+ # set to None if commodity_price_date_week (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date_week is None and "commodity_price_date_week" in self.model_fields_set:
+ _dict['commodityPriceDateWeek'] = None
+
+ # set to None if commodity_price_date_month (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date_month is None and "commodity_price_date_month" in self.model_fields_set:
+ _dict['commodityPriceDateMonth'] = None
+
+ # set to None if commodity_price_insert_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_insert_date is None and "commodity_price_insert_date" in self.model_fields_set:
+ _dict['commodityPriceInsertDate'] = None
+
+ # set to None if commodity_price_flag (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_flag is None and "commodity_price_flag" in self.model_fields_set:
+ _dict['commodityPriceFlag'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CommodityPriceDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "commodityId": obj.get("commodityId"),
+ "marketId": obj.get("marketId"),
+ "priceTypeId": obj.get("priceTypeId"),
+ "commodityUnitId": obj.get("commodityUnitId"),
+ "currencyId": obj.get("currencyId"),
+ "commodityName": obj.get("commodityName"),
+ "marketName": obj.get("marketName"),
+ "priceTypeName": obj.get("priceTypeName"),
+ "unitName": obj.get("unitName"),
+ "currencyName": obj.get("currencyName"),
+ "originalFrequency": obj.get("originalFrequency"),
+ "adm0Code": obj.get("adm0Code"),
+ "countryISO3": obj.get("countryISO3"),
+ "countryName": obj.get("countryName"),
+ "commodityPrice": obj.get("commodityPrice"),
+ "commodityPriceSourceName": obj.get("commodityPriceSourceName"),
+ "commodityPriceMetadata": obj.get("commodityPriceMetadata"),
+ "commodityPriceDate": obj.get("commodityPriceDate"),
+ "commodityPriceObservations": obj.get("commodityPriceObservations"),
+ "commodityPriceDateDay": obj.get("commodityPriceDateDay"),
+ "commodityPriceDateWeek": obj.get("commodityPriceDateWeek"),
+ "commodityPriceDateMonth": obj.get("commodityPriceDateMonth"),
+ "commodityPriceDateYear": obj.get("commodityPriceDateYear"),
+ "commodityPriceInsertDate": obj.get("commodityPriceInsertDate"),
+ "commodityPriceFlag": obj.get("commodityPriceFlag")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/commodity_processing_dto.py b/data_bridges_client/models/commodity_processing_dto.py
new file mode 100644
index 0000000..307518c
--- /dev/null
+++ b/data_bridges_client/models/commodity_processing_dto.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CommodityProcessingDTO(BaseModel):
+ """
+ CommodityProcessingDTO
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="The internal ID of the commodity")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the process")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CommodityProcessingDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CommodityProcessingDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/commodity_quality_dto.py b/data_bridges_client/models/commodity_quality_dto.py
new file mode 100644
index 0000000..b916882
--- /dev/null
+++ b/data_bridges_client/models/commodity_quality_dto.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CommodityQualityDTO(BaseModel):
+ """
+ CommodityQualityDTO
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="The internal ID of the commodity")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the commodity")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CommodityQualityDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CommodityQualityDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/currency_dto.py b/data_bridges_client/models/currency_dto.py
new file mode 100644
index 0000000..4bb7b6c
--- /dev/null
+++ b/data_bridges_client/models/currency_dto.py
@@ -0,0 +1,126 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class CurrencyDTO(BaseModel):
+ """
+ CurrencyDTO
+ """ # noqa: E501
+ id: Optional[StrictInt] = Field(default=None, description="The internal ID of the unit")
+ name: Optional[StrictStr] = Field(default=None, description="The name of the unit")
+ extended_name: Optional[StrictStr] = Field(default=None, alias="extendedName")
+ create_date: Optional[datetime] = Field(default=None, alias="createDate")
+ update_date: Optional[datetime] = Field(default=None, alias="updateDate")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "name", "extendedName", "createDate", "updateDate"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of CurrencyDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if extended_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.extended_name is None and "extended_name" in self.model_fields_set:
+ _dict['extendedName'] = None
+
+ # set to None if update_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.update_date is None and "update_date" in self.model_fields_set:
+ _dict['updateDate'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of CurrencyDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "extendedName": obj.get("extendedName"),
+ "createDate": obj.get("createDate"),
+ "updateDate": obj.get("updateDate")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/economic_data_dto.py b/data_bridges_client/models/economic_data_dto.py
new file mode 100644
index 0000000..9d35529
--- /dev/null
+++ b/data_bridges_client/models/economic_data_dto.py
@@ -0,0 +1,105 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EconomicDataDTO(BaseModel):
+ """
+ EconomicDataDTO
+ """ # noqa: E501
+ var_date: Optional[datetime] = Field(default=None, alias="date")
+ value: Optional[Union[StrictFloat, StrictInt]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["date", "value"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EconomicDataDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EconomicDataDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "date": obj.get("date"),
+ "value": obj.get("value")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/economic_indicator_property.py b/data_bridges_client/models/economic_indicator_property.py
new file mode 100644
index 0000000..6a75368
--- /dev/null
+++ b/data_bridges_client/models/economic_indicator_property.py
@@ -0,0 +1,142 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EconomicIndicatorProperty(BaseModel):
+ """
+ EconomicIndicatorProperty
+ """ # noqa: E501
+ id: Optional[StrictInt] = None
+ name: Optional[StrictStr] = None
+ frequency: Optional[StrictStr] = None
+ unit: Optional[StrictStr] = None
+ data_source: Optional[StrictStr] = Field(default=None, alias="dataSource")
+ country_iso3: Optional[StrictStr] = Field(default=None, alias="countryIso3")
+ latest_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="latestValue")
+ latest_value_date: Optional[datetime] = Field(default=None, alias="latestValueDate")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "name", "frequency", "unit", "dataSource", "countryIso3", "latestValue", "latestValueDate"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EconomicIndicatorProperty from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if frequency (nullable) is None
+ # and model_fields_set contains the field
+ if self.frequency is None and "frequency" in self.model_fields_set:
+ _dict['frequency'] = None
+
+ # set to None if unit (nullable) is None
+ # and model_fields_set contains the field
+ if self.unit is None and "unit" in self.model_fields_set:
+ _dict['unit'] = None
+
+ # set to None if data_source (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_source is None and "data_source" in self.model_fields_set:
+ _dict['dataSource'] = None
+
+ # set to None if country_iso3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_iso3 is None and "country_iso3" in self.model_fields_set:
+ _dict['countryIso3'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EconomicIndicatorProperty from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "frequency": obj.get("frequency"),
+ "unit": obj.get("unit"),
+ "dataSource": obj.get("dataSource"),
+ "countryIso3": obj.get("countryIso3"),
+ "latestValue": obj.get("latestValue"),
+ "latestValueDate": obj.get("latestValueDate")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/economic_indicator_property_paged_result.py b/data_bridges_client/models/economic_indicator_property_paged_result.py
new file mode 100644
index 0000000..1f6b8d5
--- /dev/null
+++ b/data_bridges_client/models/economic_indicator_property_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class EconomicIndicatorPropertyPagedResult(BaseModel):
+ """
+ EconomicIndicatorPropertyPagedResult
+ """ # noqa: E501
+ items: Optional[List[EconomicIndicatorProperty]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of EconomicIndicatorPropertyPagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of EconomicIndicatorPropertyPagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [EconomicIndicatorProperty.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/feature.py b/data_bridges_client/models/feature.py
new file mode 100644
index 0000000..e13ebbe
--- /dev/null
+++ b/data_bridges_client/models/feature.py
@@ -0,0 +1,128 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from data_bridges_client.models.geometry import Geometry
+from data_bridges_client.models.properties import Properties
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Feature(BaseModel):
+ """
+ Feature
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ id: Optional[StrictInt] = None
+ bbox: Optional[List[Union[StrictFloat, StrictInt]]] = None
+ geometry: Optional[Geometry] = None
+ properties: Optional[Properties] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["type", "id", "bbox", "geometry", "properties"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Feature from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of geometry
+ if self.geometry:
+ _dict['geometry'] = self.geometry.to_dict()
+ # override the default output from pydantic by calling `to_dict()` of properties
+ if self.properties:
+ _dict['properties'] = self.properties.to_dict()
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if bbox (nullable) is None
+ # and model_fields_set contains the field
+ if self.bbox is None and "bbox" in self.model_fields_set:
+ _dict['bbox'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Feature from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "id": obj.get("id"),
+ "bbox": obj.get("bbox"),
+ "geometry": Geometry.from_dict(obj.get("geometry")) if obj.get("geometry") is not None else None,
+ "properties": Properties.from_dict(obj.get("properties")) if obj.get("properties") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/geometry.py b/data_bridges_client/models/geometry.py
new file mode 100644
index 0000000..b080ac8
--- /dev/null
+++ b/data_bridges_client/models/geometry.py
@@ -0,0 +1,114 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Geometry(BaseModel):
+ """
+ Geometry
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ coordinates: Optional[List[Union[StrictFloat, StrictInt]]] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["type", "coordinates"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Geometry from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if coordinates (nullable) is None
+ # and model_fields_set contains the field
+ if self.coordinates is None and "coordinates" in self.model_fields_set:
+ _dict['coordinates'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Geometry from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "coordinates": obj.get("coordinates")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/gorp_value_with_changes.py b/data_bridges_client/models/gorp_value_with_changes.py
new file mode 100644
index 0000000..3cef22a
--- /dev/null
+++ b/data_bridges_client/models/gorp_value_with_changes.py
@@ -0,0 +1,134 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GorpValueWithChanges(BaseModel):
+ """
+ GorpValueWithChanges
+ """ # noqa: E501
+ year: Optional[StrictInt] = None
+ month: Optional[StrictStr] = None
+ region_name: Optional[StrictStr] = Field(default=None, alias="regionName")
+ actual_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="actualValue")
+ baseline_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="baselineValue")
+ percentage_change: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="percentageChange")
+ absolute_change: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="absoluteChange")
+ comments: Optional[StrictStr] = None
+ number_of_countries: Optional[StrictInt] = Field(default=None, alias="numberOfCountries")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["year", "month", "regionName", "actualValue", "baselineValue", "percentageChange", "absoluteChange", "comments", "numberOfCountries"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GorpValueWithChanges from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if month (nullable) is None
+ # and model_fields_set contains the field
+ if self.month is None and "month" in self.model_fields_set:
+ _dict['month'] = None
+
+ # set to None if region_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.region_name is None and "region_name" in self.model_fields_set:
+ _dict['regionName'] = None
+
+ # set to None if comments (nullable) is None
+ # and model_fields_set contains the field
+ if self.comments is None and "comments" in self.model_fields_set:
+ _dict['comments'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GorpValueWithChanges from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "year": obj.get("year"),
+ "month": obj.get("month"),
+ "regionName": obj.get("regionName"),
+ "actualValue": obj.get("actualValue"),
+ "baselineValue": obj.get("baselineValue"),
+ "percentageChange": obj.get("percentageChange"),
+ "absoluteChange": obj.get("absoluteChange"),
+ "comments": obj.get("comments"),
+ "numberOfCountries": obj.get("numberOfCountries")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/gorp_value_with_changes_paged_result.py b/data_bridges_client/models/gorp_value_with_changes_paged_result.py
new file mode 100644
index 0000000..241721d
--- /dev/null
+++ b/data_bridges_client/models/gorp_value_with_changes_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class GorpValueWithChangesPagedResult(BaseModel):
+ """
+ GorpValueWithChangesPagedResult
+ """ # noqa: E501
+ items: Optional[List[GorpValueWithChanges]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of GorpValueWithChangesPagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of GorpValueWithChangesPagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [GorpValueWithChanges.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/household_survey_list_dto.py b/data_bridges_client/models/household_survey_list_dto.py
new file mode 100644
index 0000000..22cf4af
--- /dev/null
+++ b/data_bridges_client/models/household_survey_list_dto.py
@@ -0,0 +1,267 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+from data_bridges_client.models.key_name_dto import KeyNameDto
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class HouseholdSurveyListDTO(BaseModel):
+ """
+ HouseholdSurveyListDTO
+ """ # noqa: E501
+ survey_id: Optional[StrictInt] = Field(default=None, description="The Id of the Survey", alias="surveyID")
+ survey_status_id: Optional[StrictInt] = Field(default=None, description="The Id of the Survey status", alias="surveyStatusID")
+ survey_start_date: Optional[datetime] = Field(default=None, description="The date when the survey has started", alias="surveyStartDate")
+ survey_end_date: Optional[datetime] = Field(default=None, description="The date when the survey has ended", alias="surveyEndDate")
+ survey_create_date: Optional[datetime] = Field(default=None, description="The date when the survey has been uploaded in the Data Bridges platform", alias="surveyCreateDate")
+ survey_validation_report: Optional[StrictStr] = Field(default=None, description="The detailed report on the validation performed on the survey schema", alias="surveyValidationReport")
+ survey_original_filename: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=256)]] = Field(default=None, description="The filename of the survey CSV file", alias="surveyOriginalFilename")
+ xls_form_name: Optional[StrictStr] = Field(default=None, description="The name of the XLSForm used to collect data", alias="xlsFormName")
+ base_xls_form_name: Optional[StrictStr] = Field(default=None, description="The name of the base XLSForm used to build the XLSForm", alias="baseXlsFormName")
+ country_name: Optional[StrictStr] = Field(default=None, description="The name of the country where the survey has taken place", alias="countryName")
+ adm0_code: Optional[StrictInt] = Field(default=None, description="The internal code of the country where the survey has taken place", alias="adm0Code")
+ iso3_alpha3: Optional[StrictStr] = Field(default=None, description="The ISO3 alpha code of the country where the survey has taken place", alias="iso3Alpha3")
+ user_name: Optional[StrictStr] = Field(default=None, description="The name of the user that has uploaded the survey data", alias="userName")
+ approved_by: Optional[StrictStr] = Field(default=None, alias="approvedBy")
+ original_csv_file: Optional[StrictStr] = Field(default=None, description="The link to download the original CSV file", alias="originalCsvFile")
+ base_data: Optional[StrictStr] = Field(default=None, description="The link to the JSON data reshaped on the base XLSForm", alias="baseData")
+ survey_attributes: Optional[List[KeyNameDto]] = Field(default=None, alias="surveyAttributes")
+ organizations: Optional[List[KeyNameDto]] = None
+ survey_modality_name: Optional[StrictStr] = Field(default=None, alias="surveyModalityName")
+ survey_category_name: Optional[StrictStr] = Field(default=None, alias="surveyCategoryName")
+ survey_sub_category_name: Optional[StrictStr] = Field(default=None, alias="surveySubCategoryName")
+ survey_phase_name: Optional[StrictStr] = Field(default=None, alias="surveyPhaseName")
+ survey_visibilty: Optional[StrictStr] = Field(default=None, alias="surveyVisibilty")
+ is_continuous_monitoring: Optional[StrictBool] = Field(default=None, alias="isContinuousMonitoring")
+ survey_name: Optional[StrictStr] = Field(default=None, alias="surveyName")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["surveyID", "surveyStatusID", "surveyStartDate", "surveyEndDate", "surveyCreateDate", "surveyValidationReport", "surveyOriginalFilename", "xlsFormName", "baseXlsFormName", "countryName", "adm0Code", "iso3Alpha3", "userName", "approvedBy", "originalCsvFile", "baseData", "surveyAttributes", "organizations", "surveyModalityName", "surveyCategoryName", "surveySubCategoryName", "surveyPhaseName", "surveyVisibilty", "isContinuousMonitoring", "surveyName"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of HouseholdSurveyListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in survey_attributes (list)
+ _items = []
+ if self.survey_attributes:
+ for _item in self.survey_attributes:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['surveyAttributes'] = _items
+ # override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
+ _items = []
+ if self.organizations:
+ for _item in self.organizations:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['organizations'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if survey_start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_start_date is None and "survey_start_date" in self.model_fields_set:
+ _dict['surveyStartDate'] = None
+
+ # set to None if survey_end_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_end_date is None and "survey_end_date" in self.model_fields_set:
+ _dict['surveyEndDate'] = None
+
+ # set to None if survey_validation_report (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_validation_report is None and "survey_validation_report" in self.model_fields_set:
+ _dict['surveyValidationReport'] = None
+
+ # set to None if survey_original_filename (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_original_filename is None and "survey_original_filename" in self.model_fields_set:
+ _dict['surveyOriginalFilename'] = None
+
+ # set to None if xls_form_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_name is None and "xls_form_name" in self.model_fields_set:
+ _dict['xlsFormName'] = None
+
+ # set to None if base_xls_form_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.base_xls_form_name is None and "base_xls_form_name" in self.model_fields_set:
+ _dict['baseXlsFormName'] = None
+
+ # set to None if country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_name is None and "country_name" in self.model_fields_set:
+ _dict['countryName'] = None
+
+ # set to None if iso3_alpha3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.iso3_alpha3 is None and "iso3_alpha3" in self.model_fields_set:
+ _dict['iso3Alpha3'] = None
+
+ # set to None if user_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_name is None and "user_name" in self.model_fields_set:
+ _dict['userName'] = None
+
+ # set to None if approved_by (nullable) is None
+ # and model_fields_set contains the field
+ if self.approved_by is None and "approved_by" in self.model_fields_set:
+ _dict['approvedBy'] = None
+
+ # set to None if original_csv_file (nullable) is None
+ # and model_fields_set contains the field
+ if self.original_csv_file is None and "original_csv_file" in self.model_fields_set:
+ _dict['originalCsvFile'] = None
+
+ # set to None if base_data (nullable) is None
+ # and model_fields_set contains the field
+ if self.base_data is None and "base_data" in self.model_fields_set:
+ _dict['baseData'] = None
+
+ # set to None if survey_attributes (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_attributes is None and "survey_attributes" in self.model_fields_set:
+ _dict['surveyAttributes'] = None
+
+ # set to None if organizations (nullable) is None
+ # and model_fields_set contains the field
+ if self.organizations is None and "organizations" in self.model_fields_set:
+ _dict['organizations'] = None
+
+ # set to None if survey_modality_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_modality_name is None and "survey_modality_name" in self.model_fields_set:
+ _dict['surveyModalityName'] = None
+
+ # set to None if survey_category_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_category_name is None and "survey_category_name" in self.model_fields_set:
+ _dict['surveyCategoryName'] = None
+
+ # set to None if survey_sub_category_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_sub_category_name is None and "survey_sub_category_name" in self.model_fields_set:
+ _dict['surveySubCategoryName'] = None
+
+ # set to None if survey_phase_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_phase_name is None and "survey_phase_name" in self.model_fields_set:
+ _dict['surveyPhaseName'] = None
+
+ # set to None if survey_visibilty (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_visibilty is None and "survey_visibilty" in self.model_fields_set:
+ _dict['surveyVisibilty'] = None
+
+ # set to None if survey_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_name is None and "survey_name" in self.model_fields_set:
+ _dict['surveyName'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of HouseholdSurveyListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "surveyID": obj.get("surveyID"),
+ "surveyStatusID": obj.get("surveyStatusID"),
+ "surveyStartDate": obj.get("surveyStartDate"),
+ "surveyEndDate": obj.get("surveyEndDate"),
+ "surveyCreateDate": obj.get("surveyCreateDate"),
+ "surveyValidationReport": obj.get("surveyValidationReport"),
+ "surveyOriginalFilename": obj.get("surveyOriginalFilename"),
+ "xlsFormName": obj.get("xlsFormName"),
+ "baseXlsFormName": obj.get("baseXlsFormName"),
+ "countryName": obj.get("countryName"),
+ "adm0Code": obj.get("adm0Code"),
+ "iso3Alpha3": obj.get("iso3Alpha3"),
+ "userName": obj.get("userName"),
+ "approvedBy": obj.get("approvedBy"),
+ "originalCsvFile": obj.get("originalCsvFile"),
+ "baseData": obj.get("baseData"),
+ "surveyAttributes": [KeyNameDto.from_dict(_item) for _item in obj.get("surveyAttributes")] if obj.get("surveyAttributes") is not None else None,
+ "organizations": [KeyNameDto.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None,
+ "surveyModalityName": obj.get("surveyModalityName"),
+ "surveyCategoryName": obj.get("surveyCategoryName"),
+ "surveySubCategoryName": obj.get("surveySubCategoryName"),
+ "surveyPhaseName": obj.get("surveyPhaseName"),
+ "surveyVisibilty": obj.get("surveyVisibilty"),
+ "isContinuousMonitoring": obj.get("isContinuousMonitoring"),
+ "surveyName": obj.get("surveyName")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/household_survey_list_dto_paged_result.py b/data_bridges_client/models/household_survey_list_dto_paged_result.py
new file mode 100644
index 0000000..985643e
--- /dev/null
+++ b/data_bridges_client/models/household_survey_list_dto_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class HouseholdSurveyListDTOPagedResult(BaseModel):
+ """
+ HouseholdSurveyListDTOPagedResult
+ """ # noqa: E501
+ items: Optional[List[HouseholdSurveyListDTO]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of HouseholdSurveyListDTOPagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of HouseholdSurveyListDTOPagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [HouseholdSurveyListDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/ipc_value.py b/data_bridges_client/models/ipc_value.py
new file mode 100644
index 0000000..76ab8be
--- /dev/null
+++ b/data_bridges_client/models/ipc_value.py
@@ -0,0 +1,222 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class IpcValue(BaseModel):
+ """
+ IpcValue
+ """ # noqa: E501
+ ipc_id: Optional[StrictInt] = Field(default=None, alias="ipcId")
+ ipc_year: Optional[StrictInt] = Field(default=None, alias="ipcYear")
+ iso3_alpha3: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=3)]] = Field(default=None, alias="iso3Alpha3")
+ ipc_is_latest_value: Optional[StrictBool] = Field(default=None, alias="ipcIsLatestValue")
+ ipc_country_name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=128)]] = Field(default=None, alias="ipcCountryName")
+ ipc_area_name: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=128)]] = Field(default=None, alias="ipcAreaName")
+ ipc_phase3_population: Optional[StrictInt] = Field(default=None, alias="ipcPhase3Population")
+ ipc_phase4_population: Optional[StrictInt] = Field(default=None, alias="ipcPhase4Population")
+ ipc_phase5_population: Optional[StrictInt] = Field(default=None, alias="ipcPhase5Population")
+ ipc_phase3_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="ipcPhase3Percentage")
+ ipc_phase4_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="ipcPhase4Percentage")
+ ipc_phase5_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="ipcPhase5Percentage")
+ ipc_analysed_population: Optional[StrictInt] = Field(default=None, alias="ipcAnalysedPopulation")
+ ipc_analysed_percentage: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="ipcAnalysedPercentage")
+ ipc_analysis_comment: Optional[StrictStr] = Field(default=None, alias="ipcAnalysisComment")
+ ipc_data_type: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=256)]] = Field(default=None, alias="ipcDataType")
+ ipc_data_source: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=128)]] = Field(default=None, alias="ipcDataSource")
+ ipc_reference_period: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=256)]] = Field(default=None, alias="ipcReferencePeriod")
+ ipc_create_date: Optional[datetime] = Field(default=None, alias="ipcCreateDate")
+ ipc_update_date: Optional[datetime] = Field(default=None, alias="ipcUpdateDate")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["ipcId", "ipcYear", "iso3Alpha3", "ipcIsLatestValue", "ipcCountryName", "ipcAreaName", "ipcPhase3Population", "ipcPhase4Population", "ipcPhase5Population", "ipcPhase3Percentage", "ipcPhase4Percentage", "ipcPhase5Percentage", "ipcAnalysedPopulation", "ipcAnalysedPercentage", "ipcAnalysisComment", "ipcDataType", "ipcDataSource", "ipcReferencePeriod", "ipcCreateDate", "ipcUpdateDate"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of IpcValue from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if iso3_alpha3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.iso3_alpha3 is None and "iso3_alpha3" in self.model_fields_set:
+ _dict['iso3Alpha3'] = None
+
+ # set to None if ipc_country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_country_name is None and "ipc_country_name" in self.model_fields_set:
+ _dict['ipcCountryName'] = None
+
+ # set to None if ipc_area_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_area_name is None and "ipc_area_name" in self.model_fields_set:
+ _dict['ipcAreaName'] = None
+
+ # set to None if ipc_phase3_population (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_phase3_population is None and "ipc_phase3_population" in self.model_fields_set:
+ _dict['ipcPhase3Population'] = None
+
+ # set to None if ipc_phase4_population (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_phase4_population is None and "ipc_phase4_population" in self.model_fields_set:
+ _dict['ipcPhase4Population'] = None
+
+ # set to None if ipc_phase5_population (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_phase5_population is None and "ipc_phase5_population" in self.model_fields_set:
+ _dict['ipcPhase5Population'] = None
+
+ # set to None if ipc_phase3_percentage (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_phase3_percentage is None and "ipc_phase3_percentage" in self.model_fields_set:
+ _dict['ipcPhase3Percentage'] = None
+
+ # set to None if ipc_phase4_percentage (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_phase4_percentage is None and "ipc_phase4_percentage" in self.model_fields_set:
+ _dict['ipcPhase4Percentage'] = None
+
+ # set to None if ipc_phase5_percentage (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_phase5_percentage is None and "ipc_phase5_percentage" in self.model_fields_set:
+ _dict['ipcPhase5Percentage'] = None
+
+ # set to None if ipc_analysed_population (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_analysed_population is None and "ipc_analysed_population" in self.model_fields_set:
+ _dict['ipcAnalysedPopulation'] = None
+
+ # set to None if ipc_analysed_percentage (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_analysed_percentage is None and "ipc_analysed_percentage" in self.model_fields_set:
+ _dict['ipcAnalysedPercentage'] = None
+
+ # set to None if ipc_analysis_comment (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_analysis_comment is None and "ipc_analysis_comment" in self.model_fields_set:
+ _dict['ipcAnalysisComment'] = None
+
+ # set to None if ipc_data_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_data_type is None and "ipc_data_type" in self.model_fields_set:
+ _dict['ipcDataType'] = None
+
+ # set to None if ipc_data_source (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_data_source is None and "ipc_data_source" in self.model_fields_set:
+ _dict['ipcDataSource'] = None
+
+ # set to None if ipc_reference_period (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_reference_period is None and "ipc_reference_period" in self.model_fields_set:
+ _dict['ipcReferencePeriod'] = None
+
+ # set to None if ipc_update_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.ipc_update_date is None and "ipc_update_date" in self.model_fields_set:
+ _dict['ipcUpdateDate'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of IpcValue from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "ipcId": obj.get("ipcId"),
+ "ipcYear": obj.get("ipcYear"),
+ "iso3Alpha3": obj.get("iso3Alpha3"),
+ "ipcIsLatestValue": obj.get("ipcIsLatestValue"),
+ "ipcCountryName": obj.get("ipcCountryName"),
+ "ipcAreaName": obj.get("ipcAreaName"),
+ "ipcPhase3Population": obj.get("ipcPhase3Population"),
+ "ipcPhase4Population": obj.get("ipcPhase4Population"),
+ "ipcPhase5Population": obj.get("ipcPhase5Population"),
+ "ipcPhase3Percentage": obj.get("ipcPhase3Percentage"),
+ "ipcPhase4Percentage": obj.get("ipcPhase4Percentage"),
+ "ipcPhase5Percentage": obj.get("ipcPhase5Percentage"),
+ "ipcAnalysedPopulation": obj.get("ipcAnalysedPopulation"),
+ "ipcAnalysedPercentage": obj.get("ipcAnalysedPercentage"),
+ "ipcAnalysisComment": obj.get("ipcAnalysisComment"),
+ "ipcDataType": obj.get("ipcDataType"),
+ "ipcDataSource": obj.get("ipcDataSource"),
+ "ipcReferencePeriod": obj.get("ipcReferencePeriod"),
+ "ipcCreateDate": obj.get("ipcCreateDate"),
+ "ipcUpdateDate": obj.get("ipcUpdateDate")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/ipc_value_paged_result.py b/data_bridges_client/models/ipc_value_paged_result.py
new file mode 100644
index 0000000..a5d5003
--- /dev/null
+++ b/data_bridges_client/models/ipc_value_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.ipc_value import IpcValue
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class IpcValuePagedResult(BaseModel):
+ """
+ IpcValuePagedResult
+ """ # noqa: E501
+ items: Optional[List[IpcValue]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of IpcValuePagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of IpcValuePagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [IpcValue.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/key_name_dto.py b/data_bridges_client/models/key_name_dto.py
new file mode 100644
index 0000000..ac45da7
--- /dev/null
+++ b/data_bridges_client/models/key_name_dto.py
@@ -0,0 +1,109 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class KeyNameDto(BaseModel):
+ """
+ KeyNameDto
+ """ # noqa: E501
+ id: Optional[StrictInt] = None
+ name: Optional[StrictStr] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of KeyNameDto from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of KeyNameDto from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/market_dto.py b/data_bridges_client/models/market_dto.py
new file mode 100644
index 0000000..a2ffc46
--- /dev/null
+++ b/data_bridges_client/models/market_dto.py
@@ -0,0 +1,159 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class MarketDTO(BaseModel):
+ """
+ MarketDTO
+ """ # noqa: E501
+ market_id: Optional[StrictInt] = Field(default=None, description="The internal ID of the market", alias="marketId")
+ market_name: Optional[StrictStr] = Field(default=None, description="The name of the market", alias="marketName")
+ market_local_name: Optional[StrictStr] = Field(default=None, description="The local name of the market", alias="marketLocalName")
+ market_latitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The decimal latitude", alias="marketLatitude")
+ market_longitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The decimal longitude", alias="marketLongitude")
+ admin1_name: Optional[StrictStr] = Field(default=None, description="The name of the first level administrative division where the market is placed", alias="admin1Name")
+ admin1_code: Optional[StrictInt] = Field(default=None, description="The code of the first level administrative division where the market is placed", alias="admin1Code")
+ admin2_name: Optional[StrictStr] = Field(default=None, description="The name of the second level administrative division where the market is placed", alias="admin2Name")
+ admin2_code: Optional[StrictInt] = Field(default=None, description="The code of the second level administrative division where the market is placed", alias="admin2Code")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["marketId", "marketName", "marketLocalName", "marketLatitude", "marketLongitude", "admin1Name", "admin1Code", "admin2Name", "admin2Code"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MarketDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ # set to None if market_local_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_local_name is None and "market_local_name" in self.model_fields_set:
+ _dict['marketLocalName'] = None
+
+ # set to None if market_latitude (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_latitude is None and "market_latitude" in self.model_fields_set:
+ _dict['marketLatitude'] = None
+
+ # set to None if market_longitude (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_longitude is None and "market_longitude" in self.model_fields_set:
+ _dict['marketLongitude'] = None
+
+ # set to None if admin1_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.admin1_name is None and "admin1_name" in self.model_fields_set:
+ _dict['admin1Name'] = None
+
+ # set to None if admin1_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.admin1_code is None and "admin1_code" in self.model_fields_set:
+ _dict['admin1Code'] = None
+
+ # set to None if admin2_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.admin2_name is None and "admin2_name" in self.model_fields_set:
+ _dict['admin2Name'] = None
+
+ # set to None if admin2_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.admin2_code is None and "admin2_code" in self.model_fields_set:
+ _dict['admin2Code'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of MarketDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "marketId": obj.get("marketId"),
+ "marketName": obj.get("marketName"),
+ "marketLocalName": obj.get("marketLocalName"),
+ "marketLatitude": obj.get("marketLatitude"),
+ "marketLongitude": obj.get("marketLongitude"),
+ "admin1Name": obj.get("admin1Name"),
+ "admin1Code": obj.get("admin1Code"),
+ "admin2Name": obj.get("admin2Name"),
+ "admin2Code": obj.get("admin2Code")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/market_geo_json_root.py b/data_bridges_client/models/market_geo_json_root.py
new file mode 100644
index 0000000..63a7a5f
--- /dev/null
+++ b/data_bridges_client/models/market_geo_json_root.py
@@ -0,0 +1,129 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+from data_bridges_client.models.feature import Feature
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class MarketGeoJsonRoot(BaseModel):
+ """
+ MarketGeoJsonRoot
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ features: Optional[List[Feature]] = None
+ bbox: Optional[Any] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["type", "features", "bbox"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MarketGeoJsonRoot from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in features (list)
+ _items = []
+ if self.features:
+ for _item in self.features:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['features'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if features (nullable) is None
+ # and model_fields_set contains the field
+ if self.features is None and "features" in self.model_fields_set:
+ _dict['features'] = None
+
+ # set to None if bbox (nullable) is None
+ # and model_fields_set contains the field
+ if self.bbox is None and "bbox" in self.model_fields_set:
+ _dict['bbox'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of MarketGeoJsonRoot from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "features": [Feature.from_dict(_item) for _item in obj.get("features")] if obj.get("features") is not None else None,
+ "bbox": obj.get("bbox")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/mfi_processed_data_dto.py b/data_bridges_client/models/mfi_processed_data_dto.py
new file mode 100644
index 0000000..03f1545
--- /dev/null
+++ b/data_bridges_client/models/mfi_processed_data_dto.py
@@ -0,0 +1,233 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class MFIProcessedDataDTO(BaseModel):
+ """
+ MFIProcessedDataDTO
+ """ # noqa: E501
+ survey_id: Optional[StrictInt] = Field(default=None, description="The Id of the Survey", alias="surveyID")
+ start_date: Optional[datetime] = Field(default=None, description="The Id of the Survey status", alias="startDate")
+ end_date: Optional[datetime] = Field(default=None, alias="endDate")
+ market_id: Optional[StrictInt] = Field(default=None, alias="marketID")
+ market_name: Optional[StrictStr] = Field(default=None, alias="marketName")
+ market_latitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="marketLatitude")
+ market_longitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="marketLongitude")
+ regional_bureau_id: Optional[StrictInt] = Field(default=None, alias="regionalBureauID")
+ regional_bureau_name: Optional[StrictStr] = Field(default=None, alias="regionalBureauName")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ adm0_name: Optional[StrictStr] = Field(default=None, alias="adm0Name")
+ adm1_code: Optional[StrictInt] = Field(default=None, alias="adm1Code")
+ adm1_name: Optional[StrictStr] = Field(default=None, alias="adm1Name")
+ adm2_code: Optional[StrictInt] = Field(default=None, alias="adm2Code")
+ adm2_name: Optional[StrictStr] = Field(default=None, alias="adm2Name")
+ level_id: Optional[StrictInt] = Field(default=None, alias="levelID")
+ level_name: Optional[StrictStr] = Field(default=None, alias="levelName")
+ dimension_id: Optional[StrictInt] = Field(default=None, alias="dimensionID")
+ dimension_name: Optional[StrictStr] = Field(default=None, alias="dimensionName")
+ variable_id: Optional[StrictInt] = Field(default=None, alias="variableID")
+ variable_name: Optional[StrictStr] = Field(default=None, alias="variableName")
+ variable_label: Optional[StrictStr] = Field(default=None, alias="variableLabel")
+ output_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="outputValue")
+ traders_sample_size: Optional[StrictInt] = Field(default=None, alias="tradersSampleSize")
+ base_xls_form_id: Optional[StrictInt] = Field(default=None, alias="baseXlsFormID")
+ base_xls_form_name: Optional[StrictStr] = Field(default=None, alias="baseXlsFormName")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["surveyID", "startDate", "endDate", "marketID", "marketName", "marketLatitude", "marketLongitude", "regionalBureauID", "regionalBureauName", "adm0Code", "adm0Name", "adm1Code", "adm1Name", "adm2Code", "adm2Name", "levelID", "levelName", "dimensionID", "dimensionName", "variableID", "variableName", "variableLabel", "outputValue", "tradersSampleSize", "baseXlsFormID", "baseXlsFormName"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of MFIProcessedDataDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.start_date is None and "start_date" in self.model_fields_set:
+ _dict['startDate'] = None
+
+ # set to None if end_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.end_date is None and "end_date" in self.model_fields_set:
+ _dict['endDate'] = None
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ # set to None if market_latitude (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_latitude is None and "market_latitude" in self.model_fields_set:
+ _dict['marketLatitude'] = None
+
+ # set to None if market_longitude (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_longitude is None and "market_longitude" in self.model_fields_set:
+ _dict['marketLongitude'] = None
+
+ # set to None if regional_bureau_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.regional_bureau_name is None and "regional_bureau_name" in self.model_fields_set:
+ _dict['regionalBureauName'] = None
+
+ # set to None if adm0_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm0_name is None and "adm0_name" in self.model_fields_set:
+ _dict['adm0Name'] = None
+
+ # set to None if adm1_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm1_name is None and "adm1_name" in self.model_fields_set:
+ _dict['adm1Name'] = None
+
+ # set to None if adm2_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm2_name is None and "adm2_name" in self.model_fields_set:
+ _dict['adm2Name'] = None
+
+ # set to None if level_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.level_name is None and "level_name" in self.model_fields_set:
+ _dict['levelName'] = None
+
+ # set to None if dimension_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.dimension_name is None and "dimension_name" in self.model_fields_set:
+ _dict['dimensionName'] = None
+
+ # set to None if variable_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.variable_name is None and "variable_name" in self.model_fields_set:
+ _dict['variableName'] = None
+
+ # set to None if variable_label (nullable) is None
+ # and model_fields_set contains the field
+ if self.variable_label is None and "variable_label" in self.model_fields_set:
+ _dict['variableLabel'] = None
+
+ # set to None if output_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.output_value is None and "output_value" in self.model_fields_set:
+ _dict['outputValue'] = None
+
+ # set to None if traders_sample_size (nullable) is None
+ # and model_fields_set contains the field
+ if self.traders_sample_size is None and "traders_sample_size" in self.model_fields_set:
+ _dict['tradersSampleSize'] = None
+
+ # set to None if base_xls_form_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.base_xls_form_name is None and "base_xls_form_name" in self.model_fields_set:
+ _dict['baseXlsFormName'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of MFIProcessedDataDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "surveyID": obj.get("surveyID"),
+ "startDate": obj.get("startDate"),
+ "endDate": obj.get("endDate"),
+ "marketID": obj.get("marketID"),
+ "marketName": obj.get("marketName"),
+ "marketLatitude": obj.get("marketLatitude"),
+ "marketLongitude": obj.get("marketLongitude"),
+ "regionalBureauID": obj.get("regionalBureauID"),
+ "regionalBureauName": obj.get("regionalBureauName"),
+ "adm0Code": obj.get("adm0Code"),
+ "adm0Name": obj.get("adm0Name"),
+ "adm1Code": obj.get("adm1Code"),
+ "adm1Name": obj.get("adm1Name"),
+ "adm2Code": obj.get("adm2Code"),
+ "adm2Name": obj.get("adm2Name"),
+ "levelID": obj.get("levelID"),
+ "levelName": obj.get("levelName"),
+ "dimensionID": obj.get("dimensionID"),
+ "dimensionName": obj.get("dimensionName"),
+ "variableID": obj.get("variableID"),
+ "variableName": obj.get("variableName"),
+ "variableLabel": obj.get("variableLabel"),
+ "outputValue": obj.get("outputValue"),
+ "tradersSampleSize": obj.get("tradersSampleSize"),
+ "baseXlsFormID": obj.get("baseXlsFormID"),
+ "baseXlsFormName": obj.get("baseXlsFormName")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/nearby_markets_dto.py b/data_bridges_client/models/nearby_markets_dto.py
new file mode 100644
index 0000000..351e0d3
--- /dev/null
+++ b/data_bridges_client/models/nearby_markets_dto.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class NearbyMarketsDTO(BaseModel):
+ """
+ NearbyMarketsDTO
+ """ # noqa: E501
+ market_id: Optional[StrictInt] = Field(default=None, description="The internal ID of the market", alias="marketId")
+ market_name: Optional[StrictStr] = Field(default=None, description="The name of the market", alias="marketName")
+ distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The distance in meters of the market from the provided point")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["marketId", "marketName", "distance"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of NearbyMarketsDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of NearbyMarketsDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "marketId": obj.get("marketId"),
+ "marketName": obj.get("marketName"),
+ "distance": obj.get("distance")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_commodity_list_dto.py b/data_bridges_client/models/paged_commodity_list_dto.py
new file mode 100644
index 0000000..aed067e
--- /dev/null
+++ b/data_bridges_client/models/paged_commodity_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.commodity_dto import CommodityDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedCommodityListDTO(BaseModel):
+ """
+ PagedCommodityListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[CommodityDTO]] = Field(default=None, description="The list of paged items")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedCommodityListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedCommodityListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [CommodityDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_commodity_price_list_dto.py b/data_bridges_client/models/paged_commodity_price_list_dto.py
new file mode 100644
index 0000000..857eaac
--- /dev/null
+++ b/data_bridges_client/models/paged_commodity_price_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedCommodityPriceListDTO(BaseModel):
+ """
+ PagedCommodityPriceListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[CommodityPriceDTO]] = Field(default=None, description="The list of paged items")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedCommodityPriceListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedCommodityPriceListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [CommodityPriceDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py b/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py
new file mode 100644
index 0000000..eb22b06
--- /dev/null
+++ b/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedCommodityWeeklyAggregatedPriceListDTO(BaseModel):
+ """
+ PagedCommodityWeeklyAggregatedPriceListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[WeeklyAggregatedPrice]] = Field(default=None, description="The list of paged items")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [WeeklyAggregatedPrice.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_currency_list_dto.py b/data_bridges_client/models/paged_currency_list_dto.py
new file mode 100644
index 0000000..cf9bfdf
--- /dev/null
+++ b/data_bridges_client/models/paged_currency_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.currency_dto import CurrencyDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedCurrencyListDTO(BaseModel):
+ """
+ PagedCurrencyListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[CurrencyDTO]] = Field(default=None, description="The list of paged items")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedCurrencyListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedCurrencyListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [CurrencyDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_economic_data_dto.py b/data_bridges_client/models/paged_economic_data_dto.py
new file mode 100644
index 0000000..163dbdc
--- /dev/null
+++ b/data_bridges_client/models/paged_economic_data_dto.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from data_bridges_client.models.economic_data_dto import EconomicDataDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedEconomicDataDTO(BaseModel):
+ """
+ PagedEconomicDataDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ unit: Optional[StrictStr] = None
+ frequency: Optional[StrictStr] = None
+ data_source: Optional[StrictStr] = Field(default=None, alias="dataSource")
+ items: Optional[List[EconomicDataDTO]] = Field(default=None, description="The list of paged items")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "unit", "frequency", "dataSource", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedEconomicDataDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if unit (nullable) is None
+ # and model_fields_set contains the field
+ if self.unit is None and "unit" in self.model_fields_set:
+ _dict['unit'] = None
+
+ # set to None if frequency (nullable) is None
+ # and model_fields_set contains the field
+ if self.frequency is None and "frequency" in self.model_fields_set:
+ _dict['frequency'] = None
+
+ # set to None if data_source (nullable) is None
+ # and model_fields_set contains the field
+ if self.data_source is None and "data_source" in self.model_fields_set:
+ _dict['dataSource'] = None
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedEconomicDataDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "unit": obj.get("unit"),
+ "frequency": obj.get("frequency"),
+ "dataSource": obj.get("dataSource"),
+ "items": [EconomicDataDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_market_list_dto.py b/data_bridges_client/models/paged_market_list_dto.py
new file mode 100644
index 0000000..f2e58e1
--- /dev/null
+++ b/data_bridges_client/models/paged_market_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.market_dto import MarketDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedMarketListDTO(BaseModel):
+ """
+ PagedMarketListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[MarketDTO]] = Field(default=None, description="The list of markets")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedMarketListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedMarketListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [MarketDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_processed_data_dto.py b/data_bridges_client/models/paged_processed_data_dto.py
new file mode 100644
index 0000000..82bd332
--- /dev/null
+++ b/data_bridges_client/models/paged_processed_data_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedProcessedDataDTO(BaseModel):
+ """
+ PagedProcessedDataDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[MFIProcessedDataDTO]] = Field(default=None, description="The list of processed data")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedProcessedDataDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedProcessedDataDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [MFIProcessedDataDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_survey_list_dto.py b/data_bridges_client/models/paged_survey_list_dto.py
new file mode 100644
index 0000000..f73b75c
--- /dev/null
+++ b/data_bridges_client/models/paged_survey_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.survey_list_dto import SurveyListDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedSurveyListDTO(BaseModel):
+ """
+ PagedSurveyListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[SurveyListDTO]] = Field(default=None, description="The list of surveys")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedSurveyListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedSurveyListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [SurveyListDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_survey_responses_dto.py b/data_bridges_client/models/paged_survey_responses_dto.py
new file mode 100644
index 0000000..7e73e4f
--- /dev/null
+++ b/data_bridges_client/models/paged_survey_responses_dto.py
@@ -0,0 +1,112 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedSurveyResponsesDTO(BaseModel):
+ """
+ PagedSurveyResponsesDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of responses", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[Any]] = Field(default=None, description="The list of survey responses")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedSurveyResponsesDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedSurveyResponsesDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": obj.get("items")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/paged_xls_form_list_dto.py b/data_bridges_client/models/paged_xls_form_list_dto.py
new file mode 100644
index 0000000..64c98c2
--- /dev/null
+++ b/data_bridges_client/models/paged_xls_form_list_dto.py
@@ -0,0 +1,120 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.xls_form_dto import XlsFormDTO
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class PagedXlsFormListDTO(BaseModel):
+ """
+ PagedXlsFormListDTO
+ """ # noqa: E501
+ total_items: Optional[StrictInt] = Field(default=None, description="The total number of items", alias="totalItems")
+ page: Optional[StrictInt] = Field(default=None, description="The current page")
+ items: Optional[List[XlsFormDTO]] = Field(default=None, description="The list of XlsForms")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["totalItems", "page", "items"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of PagedXlsFormListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of PagedXlsFormListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "totalItems": obj.get("totalItems"),
+ "page": obj.get("page"),
+ "items": [XlsFormDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/problem_details.py b/data_bridges_client/models/problem_details.py
new file mode 100644
index 0000000..6d83035
--- /dev/null
+++ b/data_bridges_client/models/problem_details.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ProblemDetails(BaseModel):
+ """
+ ProblemDetails
+ """ # noqa: E501
+ type: Optional[StrictStr] = None
+ title: Optional[StrictStr] = None
+ status: Optional[StrictInt] = None
+ detail: Optional[StrictStr] = None
+ instance: Optional[StrictStr] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ProblemDetails from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if type (nullable) is None
+ # and model_fields_set contains the field
+ if self.type is None and "type" in self.model_fields_set:
+ _dict['type'] = None
+
+ # set to None if title (nullable) is None
+ # and model_fields_set contains the field
+ if self.title is None and "title" in self.model_fields_set:
+ _dict['title'] = None
+
+ # set to None if status (nullable) is None
+ # and model_fields_set contains the field
+ if self.status is None and "status" in self.model_fields_set:
+ _dict['status'] = None
+
+ # set to None if detail (nullable) is None
+ # and model_fields_set contains the field
+ if self.detail is None and "detail" in self.model_fields_set:
+ _dict['detail'] = None
+
+ # set to None if instance (nullable) is None
+ # and model_fields_set contains the field
+ if self.instance is None and "instance" in self.model_fields_set:
+ _dict['instance'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ProblemDetails from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "type": obj.get("type"),
+ "title": obj.get("title"),
+ "status": obj.get("status"),
+ "detail": obj.get("detail"),
+ "instance": obj.get("instance")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/properties.py b/data_bridges_client/models/properties.py
new file mode 100644
index 0000000..af468a6
--- /dev/null
+++ b/data_bridges_client/models/properties.py
@@ -0,0 +1,107 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictStr
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class Properties(BaseModel):
+ """
+ Properties
+ """ # noqa: E501
+ name: Optional[StrictStr] = None
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["name"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of Properties from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of Properties from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "name": obj.get("name")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/rpme_assessment.py b/data_bridges_client/models/rpme_assessment.py
new file mode 100644
index 0000000..e3afe90
--- /dev/null
+++ b/data_bridges_client/models/rpme_assessment.py
@@ -0,0 +1,204 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+from data_bridges_client.models.rpme_output_values import RpmeOutputValues
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class RpmeAssessment(BaseModel):
+ """
+ RpmeAssessment
+ """ # noqa: E501
+ survey_id: Optional[StrictInt] = Field(default=None, alias="surveyId")
+ assessment_date: Optional[datetime] = Field(default=None, alias="assessmentDate")
+ shop_id: Optional[StrictInt] = Field(default=None, alias="shopId")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ adm1_code: Optional[StrictInt] = Field(default=None, alias="adm1Code")
+ adm2_code: Optional[StrictInt] = Field(default=None, alias="adm2Code")
+ adm0_code_dots: Optional[StrictStr] = Field(default=None, alias="adm0CodeDOTS")
+ adm1_code_dots: Optional[StrictStr] = Field(default=None, alias="adm1CodeDOTS")
+ adm2_code_dots: Optional[StrictStr] = Field(default=None, alias="adm2CodeDOTS")
+ market_id: Optional[StrictInt] = Field(default=None, alias="marketId")
+ sh_latitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="shLatitude")
+ sh_longitude: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="shLongitude")
+ nb_beneficiaries_interviewed: Optional[StrictInt] = Field(default=None, alias="nbBeneficiariesInterviewed")
+ price_score_tbu: Optional[StrictBool] = Field(default=None, alias="priceScoreTbu")
+ price_score_tbd: Optional[StrictBool] = Field(default=None, alias="priceScoreTbd")
+ beneficiaries_score_tbu: Optional[StrictBool] = Field(default=None, alias="beneficiariesScoreTbu")
+ trd_name: Optional[StrictStr] = Field(default=None, alias="trdName")
+ sev_cntr_dev: Optional[StrictStr] = Field(default=None, alias="sevCntrDev")
+ ben_sev_cntr_dev: Optional[StrictStr] = Field(default=None, alias="benSevCntrDev")
+ output_values: Optional[List[RpmeOutputValues]] = Field(default=None, alias="outputValues")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["surveyId", "assessmentDate", "shopId", "adm0Code", "adm1Code", "adm2Code", "adm0CodeDOTS", "adm1CodeDOTS", "adm2CodeDOTS", "marketId", "shLatitude", "shLongitude", "nbBeneficiariesInterviewed", "priceScoreTbu", "priceScoreTbd", "beneficiariesScoreTbu", "trdName", "sevCntrDev", "benSevCntrDev", "outputValues"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RpmeAssessment from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in output_values (list)
+ _items = []
+ if self.output_values:
+ for _item in self.output_values:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['outputValues'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if adm0_code_dots (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm0_code_dots is None and "adm0_code_dots" in self.model_fields_set:
+ _dict['adm0CodeDOTS'] = None
+
+ # set to None if adm1_code_dots (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm1_code_dots is None and "adm1_code_dots" in self.model_fields_set:
+ _dict['adm1CodeDOTS'] = None
+
+ # set to None if adm2_code_dots (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm2_code_dots is None and "adm2_code_dots" in self.model_fields_set:
+ _dict['adm2CodeDOTS'] = None
+
+ # set to None if market_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_id is None and "market_id" in self.model_fields_set:
+ _dict['marketId'] = None
+
+ # set to None if sh_latitude (nullable) is None
+ # and model_fields_set contains the field
+ if self.sh_latitude is None and "sh_latitude" in self.model_fields_set:
+ _dict['shLatitude'] = None
+
+ # set to None if sh_longitude (nullable) is None
+ # and model_fields_set contains the field
+ if self.sh_longitude is None and "sh_longitude" in self.model_fields_set:
+ _dict['shLongitude'] = None
+
+ # set to None if nb_beneficiaries_interviewed (nullable) is None
+ # and model_fields_set contains the field
+ if self.nb_beneficiaries_interviewed is None and "nb_beneficiaries_interviewed" in self.model_fields_set:
+ _dict['nbBeneficiariesInterviewed'] = None
+
+ # set to None if trd_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.trd_name is None and "trd_name" in self.model_fields_set:
+ _dict['trdName'] = None
+
+ # set to None if sev_cntr_dev (nullable) is None
+ # and model_fields_set contains the field
+ if self.sev_cntr_dev is None and "sev_cntr_dev" in self.model_fields_set:
+ _dict['sevCntrDev'] = None
+
+ # set to None if ben_sev_cntr_dev (nullable) is None
+ # and model_fields_set contains the field
+ if self.ben_sev_cntr_dev is None and "ben_sev_cntr_dev" in self.model_fields_set:
+ _dict['benSevCntrDev'] = None
+
+ # set to None if output_values (nullable) is None
+ # and model_fields_set contains the field
+ if self.output_values is None and "output_values" in self.model_fields_set:
+ _dict['outputValues'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of RpmeAssessment from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "surveyId": obj.get("surveyId"),
+ "assessmentDate": obj.get("assessmentDate"),
+ "shopId": obj.get("shopId"),
+ "adm0Code": obj.get("adm0Code"),
+ "adm1Code": obj.get("adm1Code"),
+ "adm2Code": obj.get("adm2Code"),
+ "adm0CodeDOTS": obj.get("adm0CodeDOTS"),
+ "adm1CodeDOTS": obj.get("adm1CodeDOTS"),
+ "adm2CodeDOTS": obj.get("adm2CodeDOTS"),
+ "marketId": obj.get("marketId"),
+ "shLatitude": obj.get("shLatitude"),
+ "shLongitude": obj.get("shLongitude"),
+ "nbBeneficiariesInterviewed": obj.get("nbBeneficiariesInterviewed"),
+ "priceScoreTbu": obj.get("priceScoreTbu"),
+ "priceScoreTbd": obj.get("priceScoreTbd"),
+ "beneficiariesScoreTbu": obj.get("beneficiariesScoreTbu"),
+ "trdName": obj.get("trdName"),
+ "sevCntrDev": obj.get("sevCntrDev"),
+ "benSevCntrDev": obj.get("benSevCntrDev"),
+ "outputValues": [RpmeOutputValues.from_dict(_item) for _item in obj.get("outputValues")] if obj.get("outputValues") is not None else None
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/rpme_assessment_paged_result.py b/data_bridges_client/models/rpme_assessment_paged_result.py
new file mode 100644
index 0000000..94da6ec
--- /dev/null
+++ b/data_bridges_client/models/rpme_assessment_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.rpme_assessment import RpmeAssessment
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class RpmeAssessmentPagedResult(BaseModel):
+ """
+ RpmeAssessmentPagedResult
+ """ # noqa: E501
+ items: Optional[List[RpmeAssessment]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RpmeAssessmentPagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of RpmeAssessmentPagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [RpmeAssessment.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/rpme_output_values.py b/data_bridges_client/models/rpme_output_values.py
new file mode 100644
index 0000000..f4b864b
--- /dev/null
+++ b/data_bridges_client/models/rpme_output_values.py
@@ -0,0 +1,110 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class RpmeOutputValues(BaseModel):
+ """
+ RpmeOutputValues
+ """ # noqa: E501
+ variable_id: Optional[StrictInt] = Field(default=None, alias="variableId")
+ output_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="outputValue")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["variableId", "outputValue"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RpmeOutputValues from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if output_value (nullable) is None
+ # and model_fields_set contains the field
+ if self.output_value is None and "output_value" in self.model_fields_set:
+ _dict['outputValue'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of RpmeOutputValues from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "variableId": obj.get("variableId"),
+ "outputValue": obj.get("outputValue")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/rpme_variable.py b/data_bridges_client/models/rpme_variable.py
new file mode 100644
index 0000000..4601cb0
--- /dev/null
+++ b/data_bridges_client/models/rpme_variable.py
@@ -0,0 +1,144 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class RpmeVariable(BaseModel):
+ """
+ RpmeVariable
+ """ # noqa: E501
+ variable_id: Optional[StrictInt] = Field(default=None, alias="variableId")
+ variable_name: Optional[StrictStr] = Field(default=None, alias="variableName")
+ variable_description: Optional[StrictStr] = Field(default=None, alias="variableDescription")
+ dimension_id: Optional[StrictInt] = Field(default=None, alias="dimensionId")
+ dimension_name: Optional[StrictStr] = Field(default=None, alias="dimensionName")
+ level_id: Optional[StrictInt] = Field(default=None, alias="levelId")
+ level_name: Optional[StrictStr] = Field(default=None, alias="levelName")
+ survey_mode_id: Optional[StrictInt] = Field(default=None, alias="surveyModeId")
+ survey_mode_name: Optional[StrictStr] = Field(default=None, alias="surveyModeName")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["variableId", "variableName", "variableDescription", "dimensionId", "dimensionName", "levelId", "levelName", "surveyModeId", "surveyModeName"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RpmeVariable from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if variable_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.variable_name is None and "variable_name" in self.model_fields_set:
+ _dict['variableName'] = None
+
+ # set to None if variable_description (nullable) is None
+ # and model_fields_set contains the field
+ if self.variable_description is None and "variable_description" in self.model_fields_set:
+ _dict['variableDescription'] = None
+
+ # set to None if dimension_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.dimension_name is None and "dimension_name" in self.model_fields_set:
+ _dict['dimensionName'] = None
+
+ # set to None if level_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.level_name is None and "level_name" in self.model_fields_set:
+ _dict['levelName'] = None
+
+ # set to None if survey_mode_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_mode_name is None and "survey_mode_name" in self.model_fields_set:
+ _dict['surveyModeName'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of RpmeVariable from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "variableId": obj.get("variableId"),
+ "variableName": obj.get("variableName"),
+ "variableDescription": obj.get("variableDescription"),
+ "dimensionId": obj.get("dimensionId"),
+ "dimensionName": obj.get("dimensionName"),
+ "levelId": obj.get("levelId"),
+ "levelName": obj.get("levelName"),
+ "surveyModeId": obj.get("surveyModeId"),
+ "surveyModeName": obj.get("surveyModeName")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/rpme_variable_paged_result.py b/data_bridges_client/models/rpme_variable_paged_result.py
new file mode 100644
index 0000000..8faf1b3
--- /dev/null
+++ b/data_bridges_client/models/rpme_variable_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.rpme_variable import RpmeVariable
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class RpmeVariablePagedResult(BaseModel):
+ """
+ RpmeVariablePagedResult
+ """ # noqa: E501
+ items: Optional[List[RpmeVariable]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of RpmeVariablePagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of RpmeVariablePagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [RpmeVariable.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/survey_list_dto.py b/data_bridges_client/models/survey_list_dto.py
new file mode 100644
index 0000000..e2c66c2
--- /dev/null
+++ b/data_bridges_client/models/survey_list_dto.py
@@ -0,0 +1,187 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+from typing_extensions import Annotated
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class SurveyListDTO(BaseModel):
+ """
+ SurveyListDTO
+ """ # noqa: E501
+ survey_id: Optional[StrictInt] = Field(default=None, description="The Id of the Survey", alias="surveyID")
+ survey_status_id: Optional[StrictInt] = Field(default=None, description="The Id of the Survey status", alias="surveyStatusID")
+ survey_start_date: Optional[datetime] = Field(default=None, description="The date when the survey has started", alias="surveyStartDate")
+ survey_end_date: Optional[datetime] = Field(default=None, description="The date when the survey has ended", alias="surveyEndDate")
+ survey_create_date: Optional[datetime] = Field(default=None, description="The date when the survey has been uploaded in the Data Bridges platform", alias="surveyCreateDate")
+ survey_validation_report: Optional[StrictStr] = Field(default=None, description="The detailed report on the validation performed on the survey schema", alias="surveyValidationReport")
+ survey_original_filename: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=256)]] = Field(default=None, description="The filename of the survey CSV file", alias="surveyOriginalFilename")
+ xls_form_name: Optional[StrictStr] = Field(default=None, description="The name of the XLSForm used to collect data", alias="xlsFormName")
+ base_xls_form_name: Optional[StrictStr] = Field(default=None, description="The name of the base XLSForm used to build the XLSForm", alias="baseXlsFormName")
+ country_name: Optional[StrictStr] = Field(default=None, description="The name of the country where the survey has taken place", alias="countryName")
+ adm0_code: Optional[StrictInt] = Field(default=None, description="The internal code of the country where the survey has taken place", alias="adm0Code")
+ iso3_alpha3: Optional[StrictStr] = Field(default=None, description="The ISO3 alpha code of the country where the survey has taken place", alias="iso3Alpha3")
+ user_name: Optional[StrictStr] = Field(default=None, description="The name of the user that has uploaded the survey data", alias="userName")
+ original_csv_file: Optional[StrictStr] = Field(default=None, description="The link to download the original CSV file", alias="originalCsvFile")
+ base_data: Optional[StrictStr] = Field(default=None, description="The link to the JSON data reshaped on the base XLSForm", alias="baseData")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["surveyID", "surveyStatusID", "surveyStartDate", "surveyEndDate", "surveyCreateDate", "surveyValidationReport", "surveyOriginalFilename", "xlsFormName", "baseXlsFormName", "countryName", "adm0Code", "iso3Alpha3", "userName", "originalCsvFile", "baseData"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of SurveyListDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if survey_start_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_start_date is None and "survey_start_date" in self.model_fields_set:
+ _dict['surveyStartDate'] = None
+
+ # set to None if survey_end_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_end_date is None and "survey_end_date" in self.model_fields_set:
+ _dict['surveyEndDate'] = None
+
+ # set to None if survey_validation_report (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_validation_report is None and "survey_validation_report" in self.model_fields_set:
+ _dict['surveyValidationReport'] = None
+
+ # set to None if survey_original_filename (nullable) is None
+ # and model_fields_set contains the field
+ if self.survey_original_filename is None and "survey_original_filename" in self.model_fields_set:
+ _dict['surveyOriginalFilename'] = None
+
+ # set to None if xls_form_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_name is None and "xls_form_name" in self.model_fields_set:
+ _dict['xlsFormName'] = None
+
+ # set to None if base_xls_form_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.base_xls_form_name is None and "base_xls_form_name" in self.model_fields_set:
+ _dict['baseXlsFormName'] = None
+
+ # set to None if country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_name is None and "country_name" in self.model_fields_set:
+ _dict['countryName'] = None
+
+ # set to None if iso3_alpha3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.iso3_alpha3 is None and "iso3_alpha3" in self.model_fields_set:
+ _dict['iso3Alpha3'] = None
+
+ # set to None if user_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_name is None and "user_name" in self.model_fields_set:
+ _dict['userName'] = None
+
+ # set to None if original_csv_file (nullable) is None
+ # and model_fields_set contains the field
+ if self.original_csv_file is None and "original_csv_file" in self.model_fields_set:
+ _dict['originalCsvFile'] = None
+
+ # set to None if base_data (nullable) is None
+ # and model_fields_set contains the field
+ if self.base_data is None and "base_data" in self.model_fields_set:
+ _dict['baseData'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of SurveyListDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "surveyID": obj.get("surveyID"),
+ "surveyStatusID": obj.get("surveyStatusID"),
+ "surveyStartDate": obj.get("surveyStartDate"),
+ "surveyEndDate": obj.get("surveyEndDate"),
+ "surveyCreateDate": obj.get("surveyCreateDate"),
+ "surveyValidationReport": obj.get("surveyValidationReport"),
+ "surveyOriginalFilename": obj.get("surveyOriginalFilename"),
+ "xlsFormName": obj.get("xlsFormName"),
+ "baseXlsFormName": obj.get("baseXlsFormName"),
+ "countryName": obj.get("countryName"),
+ "adm0Code": obj.get("adm0Code"),
+ "iso3Alpha3": obj.get("iso3Alpha3"),
+ "userName": obj.get("userName"),
+ "originalCsvFile": obj.get("originalCsvFile"),
+ "baseData": obj.get("baseData")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/usd_indirect_quotation.py b/data_bridges_client/models/usd_indirect_quotation.py
new file mode 100644
index 0000000..ce62e29
--- /dev/null
+++ b/data_bridges_client/models/usd_indirect_quotation.py
@@ -0,0 +1,137 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UsdIndirectQuotation(BaseModel):
+ """
+ UsdIndirectQuotation
+ """ # noqa: E501
+ id: Optional[StrictInt] = None
+ name: Optional[StrictStr] = Field(default=None, description="the ISO3 code for the currency, based on ISO4217")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ country_iso3: Optional[StrictStr] = Field(default=None, alias="countryISO3")
+ is_official: Optional[StrictBool] = Field(default=None, description="The field IsOfficial is a boolean which can be set to true for the Trading Economics data and to false for the data coming from a commodity saved in the DataBridges database", alias="isOfficial")
+ frequency: Optional[StrictStr] = Field(default=None, description="(it’s from the reporting commodity named Exchange Rate")
+ value: Optional[Union[StrictFloat, StrictInt]] = None
+ var_date: Optional[datetime] = Field(default=None, alias="date")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["id", "name", "adm0Code", "countryISO3", "isOfficial", "frequency", "value", "date"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UsdIndirectQuotation from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if name (nullable) is None
+ # and model_fields_set contains the field
+ if self.name is None and "name" in self.model_fields_set:
+ _dict['name'] = None
+
+ # set to None if country_iso3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_iso3 is None and "country_iso3" in self.model_fields_set:
+ _dict['countryISO3'] = None
+
+ # set to None if frequency (nullable) is None
+ # and model_fields_set contains the field
+ if self.frequency is None and "frequency" in self.model_fields_set:
+ _dict['frequency'] = None
+
+ # set to None if value (nullable) is None
+ # and model_fields_set contains the field
+ if self.value is None and "value" in self.model_fields_set:
+ _dict['value'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UsdIndirectQuotation from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "id": obj.get("id"),
+ "name": obj.get("name"),
+ "adm0Code": obj.get("adm0Code"),
+ "countryISO3": obj.get("countryISO3"),
+ "isOfficial": obj.get("isOfficial"),
+ "frequency": obj.get("frequency"),
+ "value": obj.get("value"),
+ "date": obj.get("date")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/usd_indirect_quotation_paged_result.py b/data_bridges_client/models/usd_indirect_quotation_paged_result.py
new file mode 100644
index 0000000..779861b
--- /dev/null
+++ b/data_bridges_client/models/usd_indirect_quotation_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class UsdIndirectQuotationPagedResult(BaseModel):
+ """
+ UsdIndirectQuotationPagedResult
+ """ # noqa: E501
+ items: Optional[List[UsdIndirectQuotation]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of UsdIndirectQuotationPagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of UsdIndirectQuotationPagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [UsdIndirectQuotation.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/view_extended_aggregated_price.py b/data_bridges_client/models/view_extended_aggregated_price.py
new file mode 100644
index 0000000..de8b77c
--- /dev/null
+++ b/data_bridges_client/models/view_extended_aggregated_price.py
@@ -0,0 +1,230 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ViewExtendedAggregatedPrice(BaseModel):
+ """
+ ViewExtendedAggregatedPrice
+ """ # noqa: E501
+ commodity_id: Optional[StrictInt] = Field(default=None, alias="commodityID")
+ market_id: Optional[StrictInt] = Field(default=None, alias="marketID")
+ price_type_id: Optional[StrictInt] = Field(default=None, alias="priceTypeID")
+ commodity_unit_id: Optional[StrictInt] = Field(default=None, alias="commodityUnitID")
+ currency_id: Optional[StrictInt] = Field(default=None, alias="currencyID")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ commodity_date_week: Optional[StrictInt] = Field(default=None, alias="commodityDateWeek")
+ commodity_date_month: Optional[StrictInt] = Field(default=None, alias="commodityDateMonth")
+ commodity_date_year: Optional[StrictInt] = Field(default=None, alias="commodityDateYear")
+ commodity_price_date: Optional[datetime] = Field(default=None, alias="commodityPriceDate")
+ commodity_name: Optional[StrictStr] = Field(default=None, alias="commodityName")
+ market_name: Optional[StrictStr] = Field(default=None, alias="marketName")
+ price_type_name: Optional[StrictStr] = Field(default=None, alias="priceTypeName")
+ commodity_unit_name: Optional[StrictStr] = Field(default=None, alias="commodityUnitName")
+ currency_name: Optional[StrictStr] = Field(default=None, alias="currencyName")
+ country_iso3: Optional[StrictStr] = Field(default=None, alias="countryISO3")
+ country_name: Optional[StrictStr] = Field(default=None, alias="countryName")
+ commodity_price_source_name: Optional[StrictStr] = Field(default=None, alias="commodityPriceSourceName")
+ original_frequency: Optional[StrictStr] = Field(default=None, alias="originalFrequency")
+ commodity_price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="commodityPrice")
+ commodity_price_observations: Optional[StrictInt] = Field(default=None, alias="commodityPriceObservations")
+ commodity_price_flag: Optional[StrictStr] = Field(default=None, alias="commodityPriceFlag")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["commodityID", "marketID", "priceTypeID", "commodityUnitID", "currencyID", "adm0Code", "commodityDateWeek", "commodityDateMonth", "commodityDateYear", "commodityPriceDate", "commodityName", "marketName", "priceTypeName", "commodityUnitName", "currencyName", "countryISO3", "countryName", "commodityPriceSourceName", "originalFrequency", "commodityPrice", "commodityPriceObservations", "commodityPriceFlag"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ViewExtendedAggregatedPrice from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if adm0_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm0_code is None and "adm0_code" in self.model_fields_set:
+ _dict['adm0Code'] = None
+
+ # set to None if commodity_date_week (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_date_week is None and "commodity_date_week" in self.model_fields_set:
+ _dict['commodityDateWeek'] = None
+
+ # set to None if commodity_date_month (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_date_month is None and "commodity_date_month" in self.model_fields_set:
+ _dict['commodityDateMonth'] = None
+
+ # set to None if commodity_date_year (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_date_year is None and "commodity_date_year" in self.model_fields_set:
+ _dict['commodityDateYear'] = None
+
+ # set to None if commodity_price_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date is None and "commodity_price_date" in self.model_fields_set:
+ _dict['commodityPriceDate'] = None
+
+ # set to None if commodity_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_name is None and "commodity_name" in self.model_fields_set:
+ _dict['commodityName'] = None
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ # set to None if price_type_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.price_type_name is None and "price_type_name" in self.model_fields_set:
+ _dict['priceTypeName'] = None
+
+ # set to None if commodity_unit_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_unit_name is None and "commodity_unit_name" in self.model_fields_set:
+ _dict['commodityUnitName'] = None
+
+ # set to None if currency_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency_name is None and "currency_name" in self.model_fields_set:
+ _dict['currencyName'] = None
+
+ # set to None if country_iso3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_iso3 is None and "country_iso3" in self.model_fields_set:
+ _dict['countryISO3'] = None
+
+ # set to None if country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_name is None and "country_name" in self.model_fields_set:
+ _dict['countryName'] = None
+
+ # set to None if commodity_price_source_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_source_name is None and "commodity_price_source_name" in self.model_fields_set:
+ _dict['commodityPriceSourceName'] = None
+
+ # set to None if original_frequency (nullable) is None
+ # and model_fields_set contains the field
+ if self.original_frequency is None and "original_frequency" in self.model_fields_set:
+ _dict['originalFrequency'] = None
+
+ # set to None if commodity_price (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price is None and "commodity_price" in self.model_fields_set:
+ _dict['commodityPrice'] = None
+
+ # set to None if commodity_price_observations (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_observations is None and "commodity_price_observations" in self.model_fields_set:
+ _dict['commodityPriceObservations'] = None
+
+ # set to None if commodity_price_flag (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_flag is None and "commodity_price_flag" in self.model_fields_set:
+ _dict['commodityPriceFlag'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ViewExtendedAggregatedPrice from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "commodityID": obj.get("commodityID"),
+ "marketID": obj.get("marketID"),
+ "priceTypeID": obj.get("priceTypeID"),
+ "commodityUnitID": obj.get("commodityUnitID"),
+ "currencyID": obj.get("currencyID"),
+ "adm0Code": obj.get("adm0Code"),
+ "commodityDateWeek": obj.get("commodityDateWeek"),
+ "commodityDateMonth": obj.get("commodityDateMonth"),
+ "commodityDateYear": obj.get("commodityDateYear"),
+ "commodityPriceDate": obj.get("commodityPriceDate"),
+ "commodityName": obj.get("commodityName"),
+ "marketName": obj.get("marketName"),
+ "priceTypeName": obj.get("priceTypeName"),
+ "commodityUnitName": obj.get("commodityUnitName"),
+ "currencyName": obj.get("currencyName"),
+ "countryISO3": obj.get("countryISO3"),
+ "countryName": obj.get("countryName"),
+ "commodityPriceSourceName": obj.get("commodityPriceSourceName"),
+ "originalFrequency": obj.get("originalFrequency"),
+ "commodityPrice": obj.get("commodityPrice"),
+ "commodityPriceObservations": obj.get("commodityPriceObservations"),
+ "commodityPriceFlag": obj.get("commodityPriceFlag")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/view_extended_aggregated_price_paged_result.py b/data_bridges_client/models/view_extended_aggregated_price_paged_result.py
new file mode 100644
index 0000000..fef2d40
--- /dev/null
+++ b/data_bridges_client/models/view_extended_aggregated_price_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ViewExtendedAggregatedPricePagedResult(BaseModel):
+ """
+ ViewExtendedAggregatedPricePagedResult
+ """ # noqa: E501
+ items: Optional[List[ViewExtendedAggregatedPrice]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ViewExtendedAggregatedPricePagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ViewExtendedAggregatedPricePagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [ViewExtendedAggregatedPrice.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/view_extended_alps_value.py b/data_bridges_client/models/view_extended_alps_value.py
new file mode 100644
index 0000000..7561d26
--- /dev/null
+++ b/data_bridges_client/models/view_extended_alps_value.py
@@ -0,0 +1,194 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ViewExtendedAlpsValue(BaseModel):
+ """
+ ViewExtendedAlpsValue
+ """ # noqa: E501
+ commodity_id: Optional[StrictInt] = Field(default=None, alias="commodityID")
+ market_id: Optional[StrictInt] = Field(default=None, alias="marketID")
+ price_type_id: Optional[StrictInt] = Field(default=None, alias="priceTypeID")
+ commodity_unit_id: Optional[StrictInt] = Field(default=None, alias="commodityUnitID")
+ currency_id: Optional[StrictInt] = Field(default=None, alias="currencyID")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ country_name: Optional[StrictStr] = Field(default=None, alias="countryName")
+ commodity_price_date_year: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateYear")
+ commodity_price_date_month: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateMonth")
+ commodity_price_date_week: Optional[StrictInt] = Field(default=None, alias="commodityPriceDateWeek")
+ commodity_price_date: Optional[datetime] = Field(default=None, alias="commodityPriceDate")
+ commodity_name: Optional[StrictStr] = Field(default=None, alias="commodityName")
+ market_name: Optional[StrictStr] = Field(default=None, alias="marketName")
+ price_type_name: Optional[StrictStr] = Field(default=None, alias="priceTypeName")
+ commodity_unit_name: Optional[StrictStr] = Field(default=None, alias="commodityUnitName")
+ currency_name: Optional[StrictStr] = Field(default=None, alias="currencyName")
+ analysis_value_estimated_price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="analysisValueEstimatedPrice")
+ analysis_value_pewi_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="analysisValuePewiValue")
+ analysis_value_price_flag: Optional[StrictStr] = Field(default=None, alias="analysisValuePriceFlag")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["commodityID", "marketID", "priceTypeID", "commodityUnitID", "currencyID", "adm0Code", "countryName", "commodityPriceDateYear", "commodityPriceDateMonth", "commodityPriceDateWeek", "commodityPriceDate", "commodityName", "marketName", "priceTypeName", "commodityUnitName", "currencyName", "analysisValueEstimatedPrice", "analysisValuePewiValue", "analysisValuePriceFlag"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ViewExtendedAlpsValue from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if adm0_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm0_code is None and "adm0_code" in self.model_fields_set:
+ _dict['adm0Code'] = None
+
+ # set to None if country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_name is None and "country_name" in self.model_fields_set:
+ _dict['countryName'] = None
+
+ # set to None if commodity_price_date_month (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date_month is None and "commodity_price_date_month" in self.model_fields_set:
+ _dict['commodityPriceDateMonth'] = None
+
+ # set to None if commodity_price_date_week (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date_week is None and "commodity_price_date_week" in self.model_fields_set:
+ _dict['commodityPriceDateWeek'] = None
+
+ # set to None if commodity_price_date (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_date is None and "commodity_price_date" in self.model_fields_set:
+ _dict['commodityPriceDate'] = None
+
+ # set to None if commodity_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_name is None and "commodity_name" in self.model_fields_set:
+ _dict['commodityName'] = None
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ # set to None if price_type_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.price_type_name is None and "price_type_name" in self.model_fields_set:
+ _dict['priceTypeName'] = None
+
+ # set to None if commodity_unit_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_unit_name is None and "commodity_unit_name" in self.model_fields_set:
+ _dict['commodityUnitName'] = None
+
+ # set to None if currency_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency_name is None and "currency_name" in self.model_fields_set:
+ _dict['currencyName'] = None
+
+ # set to None if analysis_value_price_flag (nullable) is None
+ # and model_fields_set contains the field
+ if self.analysis_value_price_flag is None and "analysis_value_price_flag" in self.model_fields_set:
+ _dict['analysisValuePriceFlag'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ViewExtendedAlpsValue from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "commodityID": obj.get("commodityID"),
+ "marketID": obj.get("marketID"),
+ "priceTypeID": obj.get("priceTypeID"),
+ "commodityUnitID": obj.get("commodityUnitID"),
+ "currencyID": obj.get("currencyID"),
+ "adm0Code": obj.get("adm0Code"),
+ "countryName": obj.get("countryName"),
+ "commodityPriceDateYear": obj.get("commodityPriceDateYear"),
+ "commodityPriceDateMonth": obj.get("commodityPriceDateMonth"),
+ "commodityPriceDateWeek": obj.get("commodityPriceDateWeek"),
+ "commodityPriceDate": obj.get("commodityPriceDate"),
+ "commodityName": obj.get("commodityName"),
+ "marketName": obj.get("marketName"),
+ "priceTypeName": obj.get("priceTypeName"),
+ "commodityUnitName": obj.get("commodityUnitName"),
+ "currencyName": obj.get("currencyName"),
+ "analysisValueEstimatedPrice": obj.get("analysisValueEstimatedPrice"),
+ "analysisValuePewiValue": obj.get("analysisValuePewiValue"),
+ "analysisValuePriceFlag": obj.get("analysisValuePriceFlag")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/view_extended_alps_value_paged_result.py b/data_bridges_client/models/view_extended_alps_value_paged_result.py
new file mode 100644
index 0000000..eeac6d7
--- /dev/null
+++ b/data_bridges_client/models/view_extended_alps_value_paged_result.py
@@ -0,0 +1,122 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt
+from pydantic import Field
+from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class ViewExtendedAlpsValuePagedResult(BaseModel):
+ """
+ ViewExtendedAlpsValuePagedResult
+ """ # noqa: E501
+ items: Optional[List[ViewExtendedAlpsValue]] = None
+ page: Optional[StrictInt] = None
+ total_items: Optional[StrictInt] = Field(default=None, alias="totalItems")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["items", "page", "totalItems"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of ViewExtendedAlpsValuePagedResult from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * OpenAPI `readOnly` fields are excluded.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "items",
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
+ _items = []
+ if self.items:
+ for _item in self.items:
+ if _item:
+ _items.append(_item.to_dict())
+ _dict['items'] = _items
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if items (nullable) is None
+ # and model_fields_set contains the field
+ if self.items is None and "items" in self.model_fields_set:
+ _dict['items'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of ViewExtendedAlpsValuePagedResult from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "items": [ViewExtendedAlpsValue.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None,
+ "page": obj.get("page"),
+ "totalItems": obj.get("totalItems")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/weekly_aggregated_price.py b/data_bridges_client/models/weekly_aggregated_price.py
new file mode 100644
index 0000000..fdcd88b
--- /dev/null
+++ b/data_bridges_client/models/weekly_aggregated_price.py
@@ -0,0 +1,198 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional, Union
+from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class WeeklyAggregatedPrice(BaseModel):
+ """
+ WeeklyAggregatedPrice
+ """ # noqa: E501
+ commodity_id: Optional[StrictInt] = Field(default=None, alias="commodityId")
+ market_id: Optional[StrictInt] = Field(default=None, alias="marketId")
+ price_type_id: Optional[StrictInt] = Field(default=None, alias="priceTypeId")
+ commodity_unit_id: Optional[StrictInt] = Field(default=None, alias="commodityUnitId")
+ currency_id: Optional[StrictInt] = Field(default=None, alias="currencyId")
+ commodity_name: Optional[StrictStr] = Field(default=None, alias="commodityName")
+ market_name: Optional[StrictStr] = Field(default=None, alias="marketName")
+ price_type_name: Optional[StrictStr] = Field(default=None, alias="priceTypeName")
+ commodity_unit_name: Optional[StrictStr] = Field(default=None, alias="commodityUnitName")
+ currency_name: Optional[StrictStr] = Field(default=None, alias="currencyName")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ country_iso3: Optional[StrictStr] = Field(default=None, alias="countryISO3")
+ country_name: Optional[StrictStr] = Field(default=None, alias="countryName")
+ commodity_price: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="commodityPrice")
+ original_frequency: Optional[StrictStr] = Field(default=None, alias="originalFrequency")
+ commodity_price_source_name: Optional[StrictStr] = Field(default=None, alias="commodityPriceSourceName")
+ commodity_price_observations: Optional[StrictInt] = Field(default=None, alias="commodityPriceObservations")
+ commodity_date_month: Optional[StrictInt] = Field(default=None, alias="commodityDateMonth")
+ commodity_date_year: Optional[StrictInt] = Field(default=None, alias="commodityDateYear")
+ commodity_price_date: Optional[datetime] = Field(default=None, alias="commodityPriceDate")
+ commodity_price_flag: Optional[StrictStr] = Field(default=None, alias="commodityPriceFlag")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["commodityId", "marketId", "priceTypeId", "commodityUnitId", "currencyId", "commodityName", "marketName", "priceTypeName", "commodityUnitName", "currencyName", "adm0Code", "countryISO3", "countryName", "commodityPrice", "originalFrequency", "commodityPriceSourceName", "commodityPriceObservations", "commodityDateMonth", "commodityDateYear", "commodityPriceDate", "commodityPriceFlag"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of WeeklyAggregatedPrice from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if commodity_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_name is None and "commodity_name" in self.model_fields_set:
+ _dict['commodityName'] = None
+
+ # set to None if market_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.market_name is None and "market_name" in self.model_fields_set:
+ _dict['marketName'] = None
+
+ # set to None if price_type_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.price_type_name is None and "price_type_name" in self.model_fields_set:
+ _dict['priceTypeName'] = None
+
+ # set to None if commodity_unit_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_unit_name is None and "commodity_unit_name" in self.model_fields_set:
+ _dict['commodityUnitName'] = None
+
+ # set to None if currency_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.currency_name is None and "currency_name" in self.model_fields_set:
+ _dict['currencyName'] = None
+
+ # set to None if country_iso3 (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_iso3 is None and "country_iso3" in self.model_fields_set:
+ _dict['countryISO3'] = None
+
+ # set to None if country_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.country_name is None and "country_name" in self.model_fields_set:
+ _dict['countryName'] = None
+
+ # set to None if original_frequency (nullable) is None
+ # and model_fields_set contains the field
+ if self.original_frequency is None and "original_frequency" in self.model_fields_set:
+ _dict['originalFrequency'] = None
+
+ # set to None if commodity_price_source_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_source_name is None and "commodity_price_source_name" in self.model_fields_set:
+ _dict['commodityPriceSourceName'] = None
+
+ # set to None if commodity_price_observations (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_observations is None and "commodity_price_observations" in self.model_fields_set:
+ _dict['commodityPriceObservations'] = None
+
+ # set to None if commodity_price_flag (nullable) is None
+ # and model_fields_set contains the field
+ if self.commodity_price_flag is None and "commodity_price_flag" in self.model_fields_set:
+ _dict['commodityPriceFlag'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of WeeklyAggregatedPrice from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "commodityId": obj.get("commodityId"),
+ "marketId": obj.get("marketId"),
+ "priceTypeId": obj.get("priceTypeId"),
+ "commodityUnitId": obj.get("commodityUnitId"),
+ "currencyId": obj.get("currencyId"),
+ "commodityName": obj.get("commodityName"),
+ "marketName": obj.get("marketName"),
+ "priceTypeName": obj.get("priceTypeName"),
+ "commodityUnitName": obj.get("commodityUnitName"),
+ "currencyName": obj.get("currencyName"),
+ "adm0Code": obj.get("adm0Code"),
+ "countryISO3": obj.get("countryISO3"),
+ "countryName": obj.get("countryName"),
+ "commodityPrice": obj.get("commodityPrice"),
+ "originalFrequency": obj.get("originalFrequency"),
+ "commodityPriceSourceName": obj.get("commodityPriceSourceName"),
+ "commodityPriceObservations": obj.get("commodityPriceObservations"),
+ "commodityDateMonth": obj.get("commodityDateMonth"),
+ "commodityDateYear": obj.get("commodityDateYear"),
+ "commodityPriceDate": obj.get("commodityPriceDate"),
+ "commodityPriceFlag": obj.get("commodityPriceFlag")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/xls_form_definition_dto.py b/data_bridges_client/models/xls_form_definition_dto.py
new file mode 100644
index 0000000..a6bccd9
--- /dev/null
+++ b/data_bridges_client/models/xls_form_definition_dto.py
@@ -0,0 +1,131 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class XlsFormDefinitionDTO(BaseModel):
+ """
+ XlsFormDefinitionDTO
+ """ # noqa: E501
+ xls_form_field_name: Optional[StrictStr] = Field(default=None, alias="xlsFormFieldName")
+ xls_form_field_label: Optional[StrictStr] = Field(default=None, alias="xlsFormFieldLabel")
+ xls_form_field_row: Optional[StrictInt] = Field(default=None, alias="xlsFormFieldRow")
+ xls_form_field_type: Optional[StrictStr] = Field(default=None, alias="xlsFormFieldType")
+ xls_form_list_id: Optional[StrictInt] = Field(default=None, alias="xlsFormListId")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["xlsFormFieldName", "xlsFormFieldLabel", "xlsFormFieldRow", "xlsFormFieldType", "xlsFormListId"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of XlsFormDefinitionDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if xls_form_field_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_field_name is None and "xls_form_field_name" in self.model_fields_set:
+ _dict['xlsFormFieldName'] = None
+
+ # set to None if xls_form_field_label (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_field_label is None and "xls_form_field_label" in self.model_fields_set:
+ _dict['xlsFormFieldLabel'] = None
+
+ # set to None if xls_form_field_type (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_field_type is None and "xls_form_field_type" in self.model_fields_set:
+ _dict['xlsFormFieldType'] = None
+
+ # set to None if xls_form_list_id (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_list_id is None and "xls_form_list_id" in self.model_fields_set:
+ _dict['xlsFormListId'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of XlsFormDefinitionDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xlsFormFieldName": obj.get("xlsFormFieldName"),
+ "xlsFormFieldLabel": obj.get("xlsFormFieldLabel"),
+ "xlsFormFieldRow": obj.get("xlsFormFieldRow"),
+ "xlsFormFieldType": obj.get("xlsFormFieldType"),
+ "xlsFormListId": obj.get("xlsFormListId")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/models/xls_form_dto.py b/data_bridges_client/models/xls_form_dto.py
new file mode 100644
index 0000000..a19cd53
--- /dev/null
+++ b/data_bridges_client/models/xls_form_dto.py
@@ -0,0 +1,135 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+from __future__ import annotations
+import pprint
+import re # noqa: F401
+import json
+
+from datetime import datetime
+from typing import Any, ClassVar, Dict, List, Optional
+from pydantic import BaseModel, StrictBool, StrictInt, StrictStr
+from pydantic import Field
+try:
+ from typing import Self
+except ImportError:
+ from typing_extensions import Self
+
+class XlsFormDTO(BaseModel):
+ """
+ XlsFormDTO
+ """ # noqa: E501
+ xls_form_id: Optional[StrictInt] = Field(default=None, alias="xlsFormID")
+ xls_form_name: Optional[StrictStr] = Field(default=None, alias="xlsFormName")
+ xls_form_create_date: Optional[datetime] = Field(default=None, alias="xlsFormCreateDate")
+ user_name: Optional[StrictStr] = Field(default=None, alias="userName")
+ xls_form_source_file: Optional[StrictStr] = Field(default=None, alias="xlsFormSourceFile")
+ xls_form_is_base_schema: Optional[StrictBool] = Field(default=None, alias="xlsFormIsBaseSchema")
+ adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code")
+ additional_properties: Dict[str, Any] = {}
+ __properties: ClassVar[List[str]] = ["xlsFormID", "xlsFormName", "xlsFormCreateDate", "userName", "xlsFormSourceFile", "xlsFormIsBaseSchema", "adm0Code"]
+
+ model_config = {
+ "populate_by_name": True,
+ "validate_assignment": True,
+ "protected_namespaces": (),
+ }
+
+
+ def to_str(self) -> str:
+ """Returns the string representation of the model using alias"""
+ return pprint.pformat(self.model_dump(by_alias=True))
+
+ def to_json(self) -> str:
+ """Returns the JSON representation of the model using alias"""
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
+ return json.dumps(self.to_dict())
+
+ @classmethod
+ def from_json(cls, json_str: str) -> Self:
+ """Create an instance of XlsFormDTO from a JSON string"""
+ return cls.from_dict(json.loads(json_str))
+
+ def to_dict(self) -> Dict[str, Any]:
+ """Return the dictionary representation of the model using alias.
+
+ This has the following differences from calling pydantic's
+ `self.model_dump(by_alias=True)`:
+
+ * `None` is only added to the output dict for nullable fields that
+ were set at model initialization. Other fields with value `None`
+ are ignored.
+ * Fields in `self.additional_properties` are added to the output dict.
+ """
+ _dict = self.model_dump(
+ by_alias=True,
+ exclude={
+ "additional_properties",
+ },
+ exclude_none=True,
+ )
+ # puts key-value pairs in additional_properties in the top level
+ if self.additional_properties is not None:
+ for _key, _value in self.additional_properties.items():
+ _dict[_key] = _value
+
+ # set to None if xls_form_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_name is None and "xls_form_name" in self.model_fields_set:
+ _dict['xlsFormName'] = None
+
+ # set to None if user_name (nullable) is None
+ # and model_fields_set contains the field
+ if self.user_name is None and "user_name" in self.model_fields_set:
+ _dict['userName'] = None
+
+ # set to None if xls_form_source_file (nullable) is None
+ # and model_fields_set contains the field
+ if self.xls_form_source_file is None and "xls_form_source_file" in self.model_fields_set:
+ _dict['xlsFormSourceFile'] = None
+
+ # set to None if adm0_code (nullable) is None
+ # and model_fields_set contains the field
+ if self.adm0_code is None and "adm0_code" in self.model_fields_set:
+ _dict['adm0Code'] = None
+
+ return _dict
+
+ @classmethod
+ def from_dict(cls, obj: Dict) -> Self:
+ """Create an instance of XlsFormDTO from a dict"""
+ if obj is None:
+ return None
+
+ if not isinstance(obj, dict):
+ return cls.model_validate(obj)
+
+ _obj = cls.model_validate({
+ "xlsFormID": obj.get("xlsFormID"),
+ "xlsFormName": obj.get("xlsFormName"),
+ "xlsFormCreateDate": obj.get("xlsFormCreateDate"),
+ "userName": obj.get("userName"),
+ "xlsFormSourceFile": obj.get("xlsFormSourceFile"),
+ "xlsFormIsBaseSchema": obj.get("xlsFormIsBaseSchema"),
+ "adm0Code": obj.get("adm0Code")
+ })
+ # store additional fields in additional_properties
+ for _key in obj.keys():
+ if _key not in cls.__properties:
+ _obj.additional_properties[_key] = obj.get(_key)
+
+ return _obj
+
+
diff --git a/data_bridges_client/py.typed b/data_bridges_client/py.typed
new file mode 100644
index 0000000..e69de29
diff --git a/data_bridges_client/rest.py b/data_bridges_client/rest.py
index b74682a..4fecf74 100644
--- a/data_bridges_client/rest.py
+++ b/data_bridges_client/rest.py
@@ -1,55 +1,69 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import io
import json
-import logging
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 data_bridges_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError
+from data_bridges_client.exceptions import ApiException, ApiValueError
+SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
+RESTResponseType = urllib3.HTTPResponse
-logger = logging.getLogger(__name__)
+
+def is_socks_proxy_url(url):
+ if url is None:
+ return False
+ split_section = url.split("://")
+ if len(split_section) < 2:
+ return False
+ else:
+ return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
class RESTResponse(io.IOBase):
- def __init__(self, resp):
- self.urllib3_response = resp
+ def __init__(self, resp) -> None:
+ self.response = resp
self.status = resp.status
self.reason = resp.reason
- self.data = resp.data
+ self.data = None
+
+ def read(self):
+ if self.data is None:
+ self.data = self.response.data
+ return self.data
def getheaders(self):
"""Returns a dictionary of the response headers."""
- return self.urllib3_response.getheaders()
+ return self.response.headers
def getheader(self, name, default=None):
"""Returns a given response header."""
- return self.urllib3_response.getheader(name, default)
+ return self.response.headers.get(name, default)
-class RESTClientObject(object):
+class RESTClientObject:
- def __init__(self, configuration, pools_size=4, maxsize=None):
+ def __init__(self, configuration) -> None:
# urllib3.PoolManager will pass all kw parameters to connectionpool
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
# Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
# cert_reqs
@@ -60,37 +74,48 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
addition_pool_args = {}
if configuration.assert_hostname is not None:
- addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
+ addition_pool_args['assert_hostname'] = (
+ configuration.assert_hostname
+ )
if configuration.retries is not None:
addition_pool_args['retries'] = configuration.retries
+ if configuration.tls_server_name:
+ addition_pool_args['server_hostname'] = configuration.tls_server_name
+
+
if configuration.socket_options is not None:
addition_pool_args['socket_options'] = configuration.socket_options
- if maxsize is None:
- if configuration.connection_pool_maxsize is not None:
- maxsize = configuration.connection_pool_maxsize
- else:
- maxsize = 4
+ if configuration.connection_pool_maxsize is not None:
+ addition_pool_args['maxsize'] = configuration.connection_pool_maxsize
# https pool manager
- 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,
- cert_reqs=cert_reqs,
- ca_certs=configuration.ssl_ca_cert,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- proxy_url=configuration.proxy,
- proxy_headers=configuration.proxy_headers,
- **addition_pool_args
- )
+ if configuration.proxy:
+ if is_socks_proxy_url(configuration.proxy):
+ from urllib3.contrib.socks import SOCKSProxyManager
+ self.pool_manager = SOCKSProxyManager(
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ headers=configuration.proxy_headers,
+ **addition_pool_args
+ )
+ else:
+ self.pool_manager = urllib3.ProxyManager(
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ proxy_headers=configuration.proxy_headers,
+ **addition_pool_args
+ )
else:
self.pool_manager = urllib3.PoolManager(
- num_pools=pools_size,
- maxsize=maxsize,
cert_reqs=cert_reqs,
ca_certs=configuration.ssl_ca_cert,
cert_file=configuration.cert_file,
@@ -98,30 +123,39 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
**addition_pool_args
)
- def request(self, method, url, query_params=None, headers=None,
- body=None, post_params=None, _preload_content=True,
- _request_timeout=None):
+ def request(
+ self,
+ method,
+ url,
+ headers=None,
+ body=None,
+ post_params=None,
+ _request_timeout=None
+ ):
"""Perform requests.
:param method: http request method
:param url: http request url
- :param query_params: query parameters in the url
:param headers: http request headers
:param body: request json body, for `application/json`
:param post_params: request post parameters,
`application/x-www-form-urlencoded`
and `multipart/form-data`
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
"""
method = method.upper()
- assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
- 'PATCH', 'OPTIONS']
+ assert method in [
+ 'GET',
+ 'HEAD',
+ 'DELETE',
+ 'POST',
+ 'PUT',
+ 'PATCH',
+ 'OPTIONS'
+ ]
if post_params and body:
raise ApiValueError(
@@ -133,60 +167,82 @@ def request(self, method, url, query_params=None, headers=None,
timeout = None
if _request_timeout:
- if isinstance(_request_timeout, (int, float)): # noqa: E501,F821
+ if isinstance(_request_timeout, (int, float)):
timeout = urllib3.Timeout(total=_request_timeout)
- elif (isinstance(_request_timeout, tuple) and
- len(_request_timeout) == 2):
+ elif (
+ isinstance(_request_timeout, tuple)
+ and len(_request_timeout) == 2
+ ):
timeout = urllib3.Timeout(
- connect=_request_timeout[0], read=_request_timeout[1])
+ connect=_request_timeout[0],
+ read=_request_timeout[1]
+ )
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 ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)):
+
+ # no content type provided or payload is json
+ content_type = headers.get('Content-Type')
+ if (
+ not content_type
+ or re.search('json', content_type, re.IGNORECASE)
+ ):
request_body = None
if body is not None:
request_body = json.dumps(body)
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
body=request_body,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
- elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'application/x-www-form-urlencoded':
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
fields=post_params,
encode_multipart=False,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
- elif headers['Content-Type'] == 'multipart/form-data':
+ headers=headers,
+ preload_content=False
+ )
+ elif content_type == 'multipart/form-data':
# must del headers['Content-Type'], or the correct
# Content-Type which generated by urllib3 will be
# overwritten.
del headers['Content-Type']
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
fields=post_params,
encode_multipart=True,
- preload_content=_preload_content,
timeout=timeout,
- headers=headers)
+ headers=headers,
+ preload_content=False
+ )
# Pass a `string` parameter directly in the body to support
# other content types than Json when `body` argument is
# provided in serialized form
elif isinstance(body, str) or isinstance(body, bytes):
request_body = body
r = self.pool_manager.request(
- method, url,
+ method,
+ url,
+ body=request_body,
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
+ elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
+ request_body = "true" if body else "false"
+ r = self.pool_manager.request(
+ method,
+ url,
body=request_body,
- preload_content=_preload_content,
+ preload_content=False,
timeout=timeout,
headers=headers)
else:
@@ -197,151 +253,16 @@ def request(self, method, url, query_params=None, headers=None,
raise ApiException(status=0, reason=msg)
# For `GET`, `HEAD`
else:
- r = self.pool_manager.request(method, url,
- fields=query_params,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers)
+ r = self.pool_manager.request(
+ method,
+ url,
+ fields={},
+ timeout=timeout,
+ headers=headers,
+ preload_content=False
+ )
except urllib3.exceptions.SSLError as e:
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
+ msg = "\n".join([type(e).__name__, str(e)])
raise ApiException(status=0, reason=msg)
- if _preload_content:
- r = RESTResponse(r)
-
- # log response body
- logger.debug("response body: %s", r.data)
-
- if not 200 <= r.status <= 299:
- if r.status == 401:
- raise UnauthorizedException(http_resp=r)
-
- if r.status == 403:
- raise ForbiddenException(http_resp=r)
-
- if r.status == 404:
- raise NotFoundException(http_resp=r)
-
- if 500 <= r.status <= 599:
- raise ServiceException(http_resp=r)
-
- raise ApiException(http_resp=r)
-
- return r
-
- def GET(self, url, headers=None, query_params=None, _preload_content=True,
- _request_timeout=None):
- return self.request("GET", url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params)
-
- def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
- _request_timeout=None):
- return self.request("HEAD", url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params)
-
- def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("OPTIONS", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def DELETE(self, url, headers=None, query_params=None, body=None,
- _preload_content=True, _request_timeout=None):
- return self.request("DELETE", url,
- headers=headers,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def POST(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("POST", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def PUT(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("PUT", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body)
-
- def PATCH(self, url, headers=None, query_params=None, post_params=None,
- body=None, _preload_content=True, _request_timeout=None):
- return self.request("PATCH", url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _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} )
+ return RESTResponse(r)
diff --git a/data_bridges_client/token.py b/data_bridges_client/token.py
deleted file mode 100644
index 148ea04..0000000
--- a/data_bridges_client/token.py
+++ /dev/null
@@ -1,63 +0,0 @@
-import httpx
-import datetime
-from typing import Optional, Any, List, Dict
-import data_bridges_client
-import urllib3
-import json
-
-
-class WfpApiToken:
- BASE_URL = "https://api.wfp.org"
-
- def __init__(self, api_key: str, api_secret: str):
- """
- Args:
- api_key: API key credential to make API requests
- api_secret: API secrets credential to make API requests
- """
- self.api_key = api_key
- self.api_secret = api_secret
-
- def refresh(self, scopes: Optional[str] = None):
- """
- Refreshes token to make API requests
- Args:
- scopes: API scopes. The default is None
- """
- if scopes is None:
- scopes = []
- resp = httpx.post(
- f"{self.BASE_URL}/token",
- data={"grant_type": "client_credentials", "scope": " ".join(scopes)},
- auth=(self.api_key, self.api_secret),
- )
- resp.raise_for_status()
- resp_data = resp.json()
- received_scopes = set(resp_data["scope"].split(" "))
- if not set(scopes).issubset(received_scopes):
- raise TokenScopeError(f"Could not acquire requested scopes: {scopes}")
- return resp_data["access_token"]
-
- def refresh_urllib3(self, scopes: Optional[str] = None):
- """
- Refreshes token to make API requests
- Same function as self.refresh but uses urllib3
- """
-
- if scopes is None:
- scopes = []
- resp = urllib3.request(
- "POST",
- f"{self.BASE_URL}/token",
- body={"grant_type": "client_credentials", "scope": " ".join(scopes)},
- headers=urllib3.make_headers(basic_auth=f"{self.api_key}:{self.api_secret}"),
- )
- return resp
-
- def refresh_configuration(self):
- """
- Instantiate new client.Configuration with fresh OAuth2 access token
- """
- configuration = data_bridges_client.Configuration()
- configuration.access_token = self.refresh()
- return configuration
diff --git a/docs/BadRequestDTO.md b/docs/BadRequestDTO.md
index 744e3c4..8caf2b0 100644
--- a/docs/BadRequestDTO.md
+++ b/docs/BadRequestDTO.md
@@ -1,12 +1,30 @@
# BadRequestDTO
+
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**error** | **str, none_type** | The error message returned by the application | [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]
+**error** | **str** | The error message returned by the application | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.bad_request_dto import BadRequestDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of BadRequestDTO from a JSON string
+bad_request_dto_instance = BadRequestDTO.from_json(json)
+# print the JSON string representation of the object
+print BadRequestDTO.to_json()
+# convert the object into a dict
+bad_request_dto_dict = bad_request_dto_instance.to_dict()
+# create an instance of BadRequestDTO from a dict
+bad_request_dto_form_dict = bad_request_dto.from_dict(bad_request_dto_dict)
+```
[[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/docs/CommoditiesApi.md b/docs/CommoditiesApi.md
index 1b531b7..cbe3b1d 100644
--- a/docs/CommoditiesApi.md
+++ b/docs/CommoditiesApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.CommoditiesApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **commodities_categories_list_get**
-> PagedCommodityListDTO commodities_categories_list_get()
+> PagedCommodityListDTO commodities_categories_list_get(country_code=country_code, category_name=category_name, category_id=category_id, page=page, format=format, env=env)
Provides the list of categories.
@@ -21,15 +21,16 @@ Provides the list of categories.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import commodities_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -37,44 +38,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = commodities_api.CommoditiesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
- category_name = "categoryName_example" # str | The name, even partial and case insensitive, of a commodity category. (optional)
- category_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List. (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.CommoditiesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
+ category_name = 'category_name_example' # str | The name, even partial and case insensitive, of a commodity category. (optional)
+ category_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List. (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Provides the list of categories.
api_response = api_instance.commodities_categories_list_get(country_code=country_code, category_name=category_name, category_id=category_id, page=page, format=format, env=env)
+ print("The response of CommoditiesApi->commodities_categories_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling CommoditiesApi->commodities_categories_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
- **category_name** | **str**| The name, even partial and case insensitive, of a commodity category. | [optional]
- **category_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List. | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
+ **category_name** | **str**| The name, even partial and case insensitive, of a commodity category. | [optional]
+ **category_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List. | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -87,8 +85,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -100,7 +97,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **commodities_list_get**
-> PagedCommodityListDTO commodities_list_get()
+> PagedCommodityListDTO commodities_list_get(country_code=country_code, commodity_name=commodity_name, commodity_id=commodity_id, page=page, format=format, env=env)
Provide the detailed list of the commodities available in DataBridges platform
@@ -112,15 +109,16 @@ Provide the detailed list of the commodities available in DataBridges platform
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import commodities_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -128,44 +126,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = commodities_api.CommoditiesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
- commodity_name = "commodityName_example" # str | The name, even partial and case insensitive, of a commodity (optional)
- commodity_id = 0 # int | The exact ID of a commodity (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.CommoditiesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
+ commodity_name = 'commodity_name_example' # str | The name, even partial and case insensitive, of a commodity (optional)
+ commodity_id = 0 # int | The exact ID of a commodity (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Provide the detailed list of the commodities available in DataBridges platform
api_response = api_instance.commodities_list_get(country_code=country_code, commodity_name=commodity_name, commodity_id=commodity_id, page=page, format=format, env=env)
+ print("The response of CommoditiesApi->commodities_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling CommoditiesApi->commodities_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
- **commodity_name** | **str**| The name, even partial and case insensitive, of a commodity | [optional]
- **commodity_id** | **int**| The exact ID of a commodity | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
+ **commodity_name** | **str**| The name, even partial and case insensitive, of a commodity | [optional]
+ **commodity_id** | **int**| The exact ID of a commodity | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -178,8 +173,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/CommodityDTO.md b/docs/CommodityDTO.md
index cb45eeb..e78b91d 100644
--- a/docs/CommodityDTO.md
+++ b/docs/CommodityDTO.md
@@ -2,20 +2,37 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**id** | **int** | The internal ID of the commodity | [optional]
+**parent_id** | **int** | The internal parent ID of the commodity | [optional]
+**name** | **str** | The name of the commodity | [optional]
+**coicop2018** | **str** | The COICOP 2018 definition | [optional]
+**supply** | **int** | | [optional]
**category_id** | **int** | | [optional]
-**coicop2018** | **str, none_type** | The COICOP 2018 definition | [optional]
**create_date** | **datetime** | | [optional]
-**id** | **int** | The internal ID of the commodity | [optional]
-**name** | **str, none_type** | The name of the commodity | [optional]
-**parent_id** | **int, none_type** | The internal parent ID of the commodity | [optional]
-**processing** | [**[CommodityProcessingDTO], none_type**](CommodityProcessingDTO.md) | | [optional]
-**qualities** | [**[CommodityQualityDTO], none_type**](CommodityQualityDTO.md) | | [optional]
-**supply** | **int, none_type** | | [optional]
-**update_date** | **datetime, none_type** | | [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]
+**update_date** | **datetime** | | [optional]
+**qualities** | [**List[CommodityQualityDTO]**](CommodityQualityDTO.md) | | [optional]
+**processing** | [**List[CommodityProcessingDTO]**](CommodityProcessingDTO.md) | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.commodity_dto import CommodityDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CommodityDTO from a JSON string
+commodity_dto_instance = CommodityDTO.from_json(json)
+# print the JSON string representation of the object
+print CommodityDTO.to_json()
+# convert the object into a dict
+commodity_dto_dict = commodity_dto_instance.to_dict()
+# create an instance of CommodityDTO from a dict
+commodity_dto_form_dict = commodity_dto.from_dict(commodity_dto_dict)
+```
[[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/docs/CommodityPriceDTO.md b/docs/CommodityPriceDTO.md
index 3237803..2c9ead6 100644
--- a/docs/CommodityPriceDTO.md
+++ b/docs/CommodityPriceDTO.md
@@ -2,36 +2,53 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**adm0_code** | **int** | | [optional]
+**id** | **int** | The internal ID of the commodity | [optional]
**commodity_id** | **int** | | [optional]
-**commodity_name** | **str, none_type** | | [optional]
+**market_id** | **int** | | [optional]
+**price_type_id** | **int** | | [optional]
+**commodity_unit_id** | **int** | | [optional]
+**currency_id** | **int** | | [optional]
+**commodity_name** | **str** | | [optional]
+**market_name** | **str** | | [optional]
+**price_type_name** | **str** | | [optional]
+**unit_name** | **str** | | [optional]
+**currency_name** | **str** | | [optional]
+**original_frequency** | **str** | | [optional]
+**adm0_code** | **int** | | [optional]
+**country_iso3** | **str** | | [optional]
+**country_name** | **str** | | [optional]
**commodity_price** | **float** | | [optional]
+**commodity_price_source_name** | **str** | | [optional]
+**commodity_price_metadata** | **object** | | [optional]
**commodity_price_date** | **datetime** | | [optional]
-**commodity_price_date_day** | **int, none_type** | | [optional]
-**commodity_price_date_month** | **int, none_type** | | [optional]
-**commodity_price_date_week** | **int, none_type** | | [optional]
+**commodity_price_observations** | **int** | | [optional]
+**commodity_price_date_day** | **int** | | [optional]
+**commodity_price_date_week** | **int** | | [optional]
+**commodity_price_date_month** | **int** | | [optional]
**commodity_price_date_year** | **int** | | [optional]
-**commodity_price_flag** | **str, none_type** | | [optional]
-**commodity_price_insert_date** | **datetime, none_type** | | [optional]
-**commodity_price_metadata** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
-**commodity_price_observations** | **int, none_type** | | [optional]
-**commodity_price_source_name** | **str, none_type** | | [optional]
-**commodity_unit_id** | **int** | | [optional]
-**country_iso3** | **str, none_type** | | [optional]
-**country_name** | **str, none_type** | | [optional]
-**currency_id** | **int** | | [optional]
-**currency_name** | **str, none_type** | | [optional]
-**id** | **int** | The internal ID of the commodity | [optional]
-**market_id** | **int** | | [optional]
-**market_name** | **str, none_type** | | [optional]
-**original_frequency** | **str, none_type** | | [optional]
-**price_type_id** | **int** | | [optional]
-**price_type_name** | **str, none_type** | | [optional]
-**unit_name** | **str, none_type** | | [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]
+**commodity_price_insert_date** | **datetime** | | [optional]
+**commodity_price_flag** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CommodityPriceDTO from a JSON string
+commodity_price_dto_instance = CommodityPriceDTO.from_json(json)
+# print the JSON string representation of the object
+print CommodityPriceDTO.to_json()
+# convert the object into a dict
+commodity_price_dto_dict = commodity_price_dto_instance.to_dict()
+# create an instance of CommodityPriceDTO from a dict
+commodity_price_dto_form_dict = commodity_price_dto.from_dict(commodity_price_dto_dict)
+```
[[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/docs/CommodityProcessingDTO.md b/docs/CommodityProcessingDTO.md
index 70808ec..c2c8495 100644
--- a/docs/CommodityProcessingDTO.md
+++ b/docs/CommodityProcessingDTO.md
@@ -2,12 +2,29 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | The internal ID of the commodity | [optional]
-**name** | **str, none_type** | The name of the process | [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]
+**name** | **str** | The name of the process | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CommodityProcessingDTO from a JSON string
+commodity_processing_dto_instance = CommodityProcessingDTO.from_json(json)
+# print the JSON string representation of the object
+print CommodityProcessingDTO.to_json()
+# convert the object into a dict
+commodity_processing_dto_dict = commodity_processing_dto_instance.to_dict()
+# create an instance of CommodityProcessingDTO from a dict
+commodity_processing_dto_form_dict = commodity_processing_dto.from_dict(commodity_processing_dto_dict)
+```
[[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/docs/CommodityQualityDTO.md b/docs/CommodityQualityDTO.md
index 8987f91..daefc1a 100644
--- a/docs/CommodityQualityDTO.md
+++ b/docs/CommodityQualityDTO.md
@@ -2,12 +2,29 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | The internal ID of the commodity | [optional]
-**name** | **str, none_type** | The name of the commodity | [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]
+**name** | **str** | The name of the commodity | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CommodityQualityDTO from a JSON string
+commodity_quality_dto_instance = CommodityQualityDTO.from_json(json)
+# print the JSON string representation of the object
+print CommodityQualityDTO.to_json()
+# convert the object into a dict
+commodity_quality_dto_dict = commodity_quality_dto_instance.to_dict()
+# create an instance of CommodityQualityDTO from a dict
+commodity_quality_dto_form_dict = commodity_quality_dto.from_dict(commodity_quality_dto_dict)
+```
[[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/docs/CommodityUnitsApi.md b/docs/CommodityUnitsApi.md
index b40dc36..3d2dbfe 100644
--- a/docs/CommodityUnitsApi.md
+++ b/docs/CommodityUnitsApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.CommodityUnitsApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **commodity_units_conversion_list_get**
-> PagedCommodityListDTO commodity_units_conversion_list_get()
+> PagedCommodityListDTO commodity_units_conversion_list_get(country_code=country_code, commodity_id=commodity_id, from_unit_id=from_unit_id, to_unit_id=to_unit_id, page=page, format=format, env=env)
Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
@@ -21,15 +21,16 @@ Provides conversion factors to Kilogram or Litres for each convertible unit of m
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import commodity_units_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -37,46 +38,43 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = commodity_units_api.CommodityUnitsApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) if omitted the server will use the default value of 0
- from_unit_id = 0 # int | The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List (optional) if omitted the server will use the default value of 0
- to_unit_id = 0 # int | The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List (optional) if omitted the server will use the default value of 0
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.CommodityUnitsApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) (default to 0)
+ from_unit_id = 0 # int | The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List (optional) (default to 0)
+ to_unit_id = 0 # int | The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List (optional) (default to 0)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
api_response = api_instance.commodity_units_conversion_list_get(country_code=country_code, commodity_id=commodity_id, from_unit_id=from_unit_id, to_unit_id=to_unit_id, page=page, format=format, env=env)
+ print("The response of CommodityUnitsApi->commodity_units_conversion_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling CommodityUnitsApi->commodity_units_conversion_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] if omitted the server will use the default value of 0
- **from_unit_id** | **int**| The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List | [optional] if omitted the server will use the default value of 0
- **to_unit_id** | **int**| The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List | [optional] if omitted the server will use the default value of 0
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] [default to 0]
+ **from_unit_id** | **int**| The exact ID of the original unit of measure of the price of a commodity, as found in /CommodityUnits/List | [optional] [default to 0]
+ **to_unit_id** | **int**| The exact ID of the converted unit of measure of the price of a commodity, as found in /CommodityUnits/List | [optional] [default to 0]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -89,8 +87,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -102,7 +99,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **commodity_units_list_get**
-> PagedCommodityListDTO commodity_units_list_get()
+> PagedCommodityListDTO commodity_units_list_get(country_code=country_code, commodity_unit_name=commodity_unit_name, commodity_unit_id=commodity_unit_id, page=page, format=format, env=env)
Provides the detailed list of the unit of measure available in DataBridges platform
@@ -114,15 +111,16 @@ Provides the detailed list of the unit of measure available in DataBridges platf
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import commodity_units_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -130,44 +128,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = commodity_units_api.CommodityUnitsApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
- commodity_unit_name = "commodityUnitName_example" # str | The name, even partial and case insensitive, of a commodity unit (optional)
- commodity_unit_id = 0 # int | The exact ID of a commodity unit (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.CommodityUnitsApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
+ commodity_unit_name = 'commodity_unit_name_example' # str | The name, even partial and case insensitive, of a commodity unit (optional)
+ commodity_unit_id = 0 # int | The exact ID of a commodity unit (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Provides the detailed list of the unit of measure available in DataBridges platform
api_response = api_instance.commodity_units_list_get(country_code=country_code, commodity_unit_name=commodity_unit_name, commodity_unit_id=commodity_unit_id, page=page, format=format, env=env)
+ print("The response of CommodityUnitsApi->commodity_units_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling CommodityUnitsApi->commodity_units_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
- **commodity_unit_name** | **str**| The name, even partial and case insensitive, of a commodity unit | [optional]
- **commodity_unit_id** | **int**| The exact ID of a commodity unit | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
+ **commodity_unit_name** | **str**| The name, even partial and case insensitive, of a commodity unit | [optional]
+ **commodity_unit_id** | **int**| The exact ID of a commodity unit | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -180,8 +175,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/Coordinate.md b/docs/Coordinate.md
deleted file mode 100644
index 9ce566d..0000000
--- a/docs/Coordinate.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Coordinate
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**coordinate_value** | [**Coordinate**](Coordinate.md) | | [optional]
-**m** | **float** | | [optional]
-**x** | **float** | | [optional]
-**y** | **float** | | [optional]
-**z** | **float** | | [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/docs/CoordinateEqualityComparer.md b/docs/CoordinateEqualityComparer.md
deleted file mode 100644
index 5d29a29..0000000
--- a/docs/CoordinateEqualityComparer.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CoordinateEqualityComparer
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**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/docs/CoordinateSequence.md b/docs/CoordinateSequence.md
deleted file mode 100644
index ba7ac5f..0000000
--- a/docs/CoordinateSequence.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# CoordinateSequence
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**count** | **int** | | [optional] [readonly]
-**dimension** | **int** | | [optional] [readonly]
-**has_m** | **bool** | | [optional] [readonly]
-**has_z** | **bool** | | [optional] [readonly]
-**m_ordinate_index** | **int** | | [optional] [readonly]
-**measures** | **int** | | [optional] [readonly]
-**ordinates** | [**Ordinates**](Ordinates.md) | | [optional]
-**spatial** | **int** | | [optional] [readonly]
-**z_ordinate_index** | **int** | | [optional] [readonly]
-**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/docs/CoordinateSequenceFactory.md b/docs/CoordinateSequenceFactory.md
deleted file mode 100644
index b953a9c..0000000
--- a/docs/CoordinateSequenceFactory.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# CoordinateSequenceFactory
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**ordinates** | [**Ordinates**](Ordinates.md) | | [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/docs/CurrencyApi.md b/docs/CurrencyApi.md
index 540af34..0eeb72d 100644
--- a/docs/CurrencyApi.md
+++ b/docs/CurrencyApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.CurrencyApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **currency_list_get**
-> PagedCurrencyListDTO currency_list_get()
+> PagedCurrencyListDTO currency_list_get(country_code=country_code, currency_name=currency_name, currency_id=currency_id, page=page, format=format, env=env)
Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
@@ -21,15 +21,16 @@ Returns the list of currencies available in the internal VAM database, with Curr
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import currency_api
-from data_bridges_client.model.paged_currency_list_dto import PagedCurrencyListDTO
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -37,44 +38,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = currency_api.CurrencyApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- currency_name = "currencyName_example" # str | Currency 3-letter code, matching with ISO 4217. (optional)
- currency_id = 0 # int | Unique code to identify the currency in internal VAM currencies. (optional) if omitted the server will use the default value of 0
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.CurrencyApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ currency_name = 'currency_name_example' # str | Currency 3-letter code, matching with ISO 4217. (optional)
+ currency_id = 0 # int | Unique code to identify the currency in internal VAM currencies. (optional) (default to 0)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
api_response = api_instance.currency_list_get(country_code=country_code, currency_name=currency_name, currency_id=currency_id, page=page, format=format, env=env)
+ print("The response of CurrencyApi->currency_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling CurrencyApi->currency_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **currency_name** | **str**| Currency 3-letter code, matching with ISO 4217. | [optional]
- **currency_id** | **int**| Unique code to identify the currency in internal VAM currencies. | [optional] if omitted the server will use the default value of 0
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **currency_name** | **str**| Currency 3-letter code, matching with ISO 4217. | [optional]
+ **currency_id** | **int**| Unique code to identify the currency in internal VAM currencies. | [optional] [default to 0]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -87,8 +85,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -100,7 +97,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **currency_usd_indirect_quotation_get**
-> UsdIndirectQuotationPagedResult currency_usd_indirect_quotation_get()
+> UsdIndirectQuotationPagedResult currency_usd_indirect_quotation_get(country_iso3=country_iso3, currency_name=currency_name, page=page, format=format, env=env)
Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
@@ -112,15 +109,16 @@ Returns the value of the Exchange rates from Trading Economics, for official rat
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import currency_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -128,42 +126,39 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = currency_api.CurrencyApi(api_client)
- country_iso3 = "" # str | The code to identify the country. Must be a ISO-3166 Alpha 3 code. (optional) if omitted the server will use the default value of ""
- currency_name = "" # str | the ISO3 code for the currency, based on ISO4217 (optional) if omitted the server will use the default value of ""
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.CurrencyApi(api_client)
+ country_iso3 = '' # str | The code to identify the country. Must be a ISO-3166 Alpha 3 code. (optional) (default to '')
+ currency_name = '' # str | the ISO3 code for the currency, based on ISO4217 (optional) (default to '')
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
api_response = api_instance.currency_usd_indirect_quotation_get(country_iso3=country_iso3, currency_name=currency_name, page=page, format=format, env=env)
+ print("The response of CurrencyApi->currency_usd_indirect_quotation_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling CurrencyApi->currency_usd_indirect_quotation_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_iso3** | **str**| The code to identify the country. Must be a ISO-3166 Alpha 3 code. | [optional] if omitted the server will use the default value of ""
- **currency_name** | **str**| the ISO3 code for the currency, based on ISO4217 | [optional] if omitted the server will use the default value of ""
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_iso3** | **str**| The code to identify the country. Must be a ISO-3166 Alpha 3 code. | [optional] [default to '']
+ **currency_name** | **str**| the ISO3 code for the currency, based on ISO4217 | [optional] [default to '']
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -176,8 +171,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/CurrencyDTO.md b/docs/CurrencyDTO.md
index 38f4db4..ada93ae 100644
--- a/docs/CurrencyDTO.md
+++ b/docs/CurrencyDTO.md
@@ -2,15 +2,32 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**create_date** | **datetime** | | [optional]
-**extended_name** | **str, none_type** | | [optional]
**id** | **int** | The internal ID of the unit | [optional]
-**name** | **str, none_type** | The name of the unit | [optional]
-**update_date** | **datetime, none_type** | | [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]
+**name** | **str** | The name of the unit | [optional]
+**extended_name** | **str** | | [optional]
+**create_date** | **datetime** | | [optional]
+**update_date** | **datetime** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.currency_dto import CurrencyDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of CurrencyDTO from a JSON string
+currency_dto_instance = CurrencyDTO.from_json(json)
+# print the JSON string representation of the object
+print CurrencyDTO.to_json()
+# convert the object into a dict
+currency_dto_dict = currency_dto_instance.to_dict()
+# create an instance of CurrencyDTO from a dict
+currency_dto_form_dict = currency_dto.from_dict(currency_dto_dict)
+```
[[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/docs/Dimension.md b/docs/Dimension.md
deleted file mode 100644
index e2353f2..0000000
--- a/docs/Dimension.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Dimension
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**value** | **int** | | must be one of [0, 1, 2, 3, -3, -2, -1, ]
-
-[[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/docs/EconomicDataApi.md b/docs/EconomicDataApi.md
index 1fb98ae..1938629 100644
--- a/docs/EconomicDataApi.md
+++ b/docs/EconomicDataApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.EconomicDataApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **economic_data_indicator_list_get**
-> EconomicIndicatorPropertyPagedResult economic_data_indicator_list_get()
+> EconomicIndicatorPropertyPagedResult economic_data_indicator_list_get(page=page, indicator_name=indicator_name, iso3=iso3, format=format, env=env)
Returns the lists of indicators.
@@ -21,15 +21,16 @@ Returns the lists of indicators.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import economic_data_api
-from data_bridges_client.model.problem_details import ProblemDetails
-from data_bridges_client.model.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -37,42 +38,39 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = economic_data_api.EconomicDataApi(api_client)
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- indicator_name = "" # str | Unique indicator name. (optional) if omitted the server will use the default value of ""
- iso3 = "" # str | The code to identify the country. Must be a ISO-3166 Alpha 3 code. (optional) if omitted the server will use the default value of ""
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.EconomicDataApi(api_client)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ indicator_name = '' # str | Unique indicator name. (optional) (default to '')
+ iso3 = '' # str | The code to identify the country. Must be a ISO-3166 Alpha 3 code. (optional) (default to '')
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns the lists of indicators.
api_response = api_instance.economic_data_indicator_list_get(page=page, indicator_name=indicator_name, iso3=iso3, format=format, env=env)
+ print("The response of EconomicDataApi->economic_data_indicator_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling EconomicDataApi->economic_data_indicator_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **indicator_name** | **str**| Unique indicator name. | [optional] if omitted the server will use the default value of ""
- **iso3** | **str**| The code to identify the country. Must be a ISO-3166 Alpha 3 code. | [optional] if omitted the server will use the default value of ""
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **indicator_name** | **str**| Unique indicator name. | [optional] [default to '']
+ **iso3** | **str**| The code to identify the country. Must be a ISO-3166 Alpha 3 code. | [optional] [default to '']
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -85,20 +83,19 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Success | - |
-**404** | Not Found | - |
+**400** | Bad Request | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **economic_data_indicator_name_get**
-> file_type economic_data_indicator_name_get(indicator_name)
+> PagedEconomicDataDTO economic_data_indicator_name_get(indicator_name, page=page, iso3=iso3, start_date=start_date, end_date=end_date, format=format, env=env)
Returns the time series of values for different indicators.
@@ -110,14 +107,16 @@ Returns the time series of values for different indicators.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import economic_data_api
-from data_bridges_client.model.problem_details import ProblemDetails
+from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -125,58 +124,47 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = economic_data_api.EconomicDataApi(api_client)
- indicator_name = "indicatorName_example" # str | Name of the indicator as found in /EconomicData/IndicatorList.
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- iso3 = "" # str | The code to identify the country. Must be a ISO-3166 Alpha 3 code. (optional) if omitted the server will use the default value of ""
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- try:
- # Returns the time series of values for different indicators.
- api_response = api_instance.economic_data_indicator_name_get(indicator_name)
- pprint(api_response)
- except data_bridges_client.ApiException as e:
- print("Exception when calling EconomicDataApi->economic_data_indicator_name_get: %s\n" % e)
+ api_instance = data_bridges_client.EconomicDataApi(api_client)
+ indicator_name = 'indicator_name_example' # str | Name of the indicator as found in /EconomicData/IndicatorList.
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ iso3 = '' # str | The code to identify the country. Must be a ISO-3166 Alpha 3 code. (optional) (default to '')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Returns the time series of values for different indicators.
api_response = api_instance.economic_data_indicator_name_get(indicator_name, page=page, iso3=iso3, start_date=start_date, end_date=end_date, format=format, env=env)
+ print("The response of EconomicDataApi->economic_data_indicator_name_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling EconomicDataApi->economic_data_indicator_name_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **indicator_name** | **str**| Name of the indicator as found in /EconomicData/IndicatorList. |
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **iso3** | **str**| The code to identify the country. Must be a ISO-3166 Alpha 3 code. | [optional] if omitted the server will use the default value of ""
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **indicator_name** | **str**| Name of the indicator as found in /EconomicData/IndicatorList. |
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **iso3** | **str**| The code to identify the country. Must be a ISO-3166 Alpha 3 code. | [optional] [default to '']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-**file_type**
+[**PagedEconomicDataDTO**](PagedEconomicDataDTO.md)
### Authorization
@@ -185,14 +173,14 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Success | - |
+**400** | Bad Request | - |
**404** | Not Found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/docs/EconomicDataDTO.md b/docs/EconomicDataDTO.md
new file mode 100644
index 0000000..1bc3f11
--- /dev/null
+++ b/docs/EconomicDataDTO.md
@@ -0,0 +1,30 @@
+# EconomicDataDTO
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**var_date** | **datetime** | | [optional]
+**value** | **float** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.economic_data_dto import EconomicDataDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of EconomicDataDTO from a JSON string
+economic_data_dto_instance = EconomicDataDTO.from_json(json)
+# print the JSON string representation of the object
+print EconomicDataDTO.to_json()
+
+# convert the object into a dict
+economic_data_dto_dict = economic_data_dto_instance.to_dict()
+# create an instance of EconomicDataDTO from a dict
+economic_data_dto_form_dict = economic_data_dto.from_dict(economic_data_dto_dict)
+```
+[[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/docs/EconomicIndicatorProperty.md b/docs/EconomicIndicatorProperty.md
index 56bba9c..bd908f3 100644
--- a/docs/EconomicIndicatorProperty.md
+++ b/docs/EconomicIndicatorProperty.md
@@ -2,18 +2,35 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**country_iso3** | **str, none_type** | | [optional]
-**data_source** | **str, none_type** | | [optional]
-**frequency** | **str, none_type** | | [optional]
**id** | **int** | | [optional]
+**name** | **str** | | [optional]
+**frequency** | **str** | | [optional]
+**unit** | **str** | | [optional]
+**data_source** | **str** | | [optional]
+**country_iso3** | **str** | | [optional]
**latest_value** | **float** | | [optional]
**latest_value_date** | **datetime** | | [optional]
-**name** | **str, none_type** | | [optional]
-**unit** | **str, none_type** | | [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]
+## Example
+
+```python
+from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of EconomicIndicatorProperty from a JSON string
+economic_indicator_property_instance = EconomicIndicatorProperty.from_json(json)
+# print the JSON string representation of the object
+print EconomicIndicatorProperty.to_json()
+
+# convert the object into a dict
+economic_indicator_property_dict = economic_indicator_property_instance.to_dict()
+# create an instance of EconomicIndicatorProperty from a dict
+economic_indicator_property_form_dict = economic_indicator_property.from_dict(economic_indicator_property_dict)
+```
[[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/docs/EconomicIndicatorPropertyPagedResult.md b/docs/EconomicIndicatorPropertyPagedResult.md
index 043febf..1fb553f 100644
--- a/docs/EconomicIndicatorPropertyPagedResult.md
+++ b/docs/EconomicIndicatorPropertyPagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[EconomicIndicatorProperty], none_type**](EconomicIndicatorProperty.md) | | [optional] [readonly]
-**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]
+**items** | [**List[EconomicIndicatorProperty]**](EconomicIndicatorProperty.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of EconomicIndicatorPropertyPagedResult from a JSON string
+economic_indicator_property_paged_result_instance = EconomicIndicatorPropertyPagedResult.from_json(json)
+# print the JSON string representation of the object
+print EconomicIndicatorPropertyPagedResult.to_json()
+# convert the object into a dict
+economic_indicator_property_paged_result_dict = economic_indicator_property_paged_result_instance.to_dict()
+# create an instance of EconomicIndicatorPropertyPagedResult from a dict
+economic_indicator_property_paged_result_form_dict = economic_indicator_property_paged_result.from_dict(economic_indicator_property_paged_result_dict)
+```
[[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/docs/Envelope.md b/docs/Envelope.md
deleted file mode 100644
index 1a03a50..0000000
--- a/docs/Envelope.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Envelope
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**area** | **float** | | [optional] [readonly]
-**centre** | [**Coordinate**](Coordinate.md) | | [optional]
-**diameter** | **float** | | [optional] [readonly]
-**height** | **float** | | [optional] [readonly]
-**is_null** | **bool** | | [optional] [readonly]
-**max_extent** | **float** | | [optional] [readonly]
-**max_x** | **float** | | [optional] [readonly]
-**max_y** | **float** | | [optional] [readonly]
-**min_extent** | **float** | | [optional] [readonly]
-**min_x** | **float** | | [optional] [readonly]
-**min_y** | **float** | | [optional] [readonly]
-**width** | **float** | | [optional] [readonly]
-**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/docs/Feature.md b/docs/Feature.md
new file mode 100644
index 0000000..74ee781
--- /dev/null
+++ b/docs/Feature.md
@@ -0,0 +1,33 @@
+# Feature
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**id** | **int** | | [optional]
+**bbox** | **List[float]** | | [optional]
+**geometry** | [**Geometry**](Geometry.md) | | [optional]
+**properties** | [**Properties**](Properties.md) | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.feature import Feature
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Feature from a JSON string
+feature_instance = Feature.from_json(json)
+# print the JSON string representation of the object
+print Feature.to_json()
+
+# convert the object into a dict
+feature_dict = feature_instance.to_dict()
+# create an instance of Feature from a dict
+feature_form_dict = feature.from_dict(feature_dict)
+```
+[[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/docs/FoodSecurityApi.md b/docs/FoodSecurityApi.md
index c1911f9..17146e8 100644
--- a/docs/FoodSecurityApi.md
+++ b/docs/FoodSecurityApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.FoodSecurityApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -8,7 +8,7 @@ Method | HTTP request | Description
# **food_security_list_get**
-> IpcValuePagedResult food_security_list_get()
+> IpcValuePagedResult food_security_list_get(iso3=iso3, year=year, page=page, env=env)
@@ -20,15 +20,16 @@ Method | HTTP request | Description
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import food_security_api
-from data_bridges_client.model.ipc_value_paged_result import IpcValuePagedResult
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -36,39 +37,36 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = food_security_api.FoodSecurityApi(api_client)
- iso3 = "iso3_example" # str | The country ISO3 code (optional)
- year = 1 # int | (optional)
- page = 1 # int | (optional) if omitted the server will use the default value of 1
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.FoodSecurityApi(api_client)
+ iso3 = 'iso3_example' # str | The country ISO3 code (optional)
+ year = 56 # int | (optional)
+ page = 1 # int | (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
api_response = api_instance.food_security_list_get(iso3=iso3, year=year, page=page, env=env)
+ print("The response of FoodSecurityApi->food_security_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling FoodSecurityApi->food_security_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **iso3** | **str**| The country ISO3 code | [optional]
- **year** | **int**| | [optional]
- **page** | **int**| | [optional] if omitted the server will use the default value of 1
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **iso3** | **str**| The country ISO3 code | [optional]
+ **year** | **int**| | [optional]
+ **page** | **int**| | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -81,8 +79,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/Geometry.md b/docs/Geometry.md
index cc32444..a66d908 100644
--- a/docs/Geometry.md
+++ b/docs/Geometry.md
@@ -2,34 +2,29 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**area** | **float** | | [optional] [readonly]
-**boundary** | [**Geometry**](Geometry.md) | | [optional]
-**boundary_dimension** | [**Dimension**](Dimension.md) | | [optional]
-**centroid** | [**Point**](Point.md) | | [optional]
-**coordinate** | [**Coordinate**](Coordinate.md) | | [optional]
-**coordinates** | [**[Coordinate], none_type**](Coordinate.md) | | [optional] [readonly]
-**dimension** | [**Dimension**](Dimension.md) | | [optional]
-**envelope** | [**Geometry**](Geometry.md) | | [optional]
-**envelope_internal** | [**Envelope**](Envelope.md) | | [optional]
-**factory** | [**GeometryFactory**](GeometryFactory.md) | | [optional]
-**geometry_type** | **str, none_type** | | [optional] [readonly]
-**interior_point** | [**Point**](Point.md) | | [optional]
-**is_empty** | **bool** | | [optional] [readonly]
-**is_rectangle** | **bool** | | [optional] [readonly]
-**is_simple** | **bool** | | [optional] [readonly]
-**is_valid** | **bool** | | [optional] [readonly]
-**length** | **float** | | [optional] [readonly]
-**num_geometries** | **int** | | [optional] [readonly]
-**num_points** | **int** | | [optional] [readonly]
-**ogc_geometry_type** | [**OgcGeometryType**](OgcGeometryType.md) | | [optional]
-**point_on_surface** | [**Point**](Point.md) | | [optional]
-**precision_model** | [**PrecisionModel**](PrecisionModel.md) | | [optional]
-**srid** | **int** | | [optional]
-**user_data** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [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]
+**type** | **str** | | [optional]
+**coordinates** | **List[float]** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.geometry import Geometry
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Geometry from a JSON string
+geometry_instance = Geometry.from_json(json)
+# print the JSON string representation of the object
+print Geometry.to_json()
+# convert the object into a dict
+geometry_dict = geometry_instance.to_dict()
+# create an instance of Geometry from a dict
+geometry_form_dict = geometry.from_dict(geometry_dict)
+```
[[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/docs/GeometryFactory.md b/docs/GeometryFactory.md
deleted file mode 100644
index c2b7b7b..0000000
--- a/docs/GeometryFactory.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# GeometryFactory
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**coordinate_sequence_factory** | [**CoordinateSequenceFactory**](CoordinateSequenceFactory.md) | | [optional]
-**geometry_services** | [**NtsGeometryServices**](NtsGeometryServices.md) | | [optional]
-**precision_model** | [**PrecisionModel**](PrecisionModel.md) | | [optional]
-**srid** | **int** | | [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/docs/GeometryOverlay.md b/docs/GeometryOverlay.md
deleted file mode 100644
index ab2528f..0000000
--- a/docs/GeometryOverlay.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# GeometryOverlay
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**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/docs/GorpApi.md b/docs/GorpApi.md
index 2b6cbd2..af90c55 100644
--- a/docs/GorpApi.md
+++ b/docs/GorpApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.GorpApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **gorp_latest_get**
-> GorpValueWithChangesPagedResult gorp_latest_get()
+> GorpValueWithChangesPagedResult gorp_latest_get(page=page, env=env)
Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
@@ -21,15 +21,16 @@ Return the latest dataset of number of acutely food insecure (in millions) base
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import gorp_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -37,36 +38,33 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = gorp_api.GorpApi(api_client)
- page = 1 # int | (optional) if omitted the server will use the default value of 1
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.GorpApi(api_client)
+ page = 1 # int | (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
api_response = api_instance.gorp_latest_get(page=page, env=env)
+ print("The response of GorpApi->gorp_latest_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling GorpApi->gorp_latest_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int**| | [optional] if omitted the server will use the default value of 1
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **page** | **int**| | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -79,8 +77,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -92,7 +89,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **gorp_list_get**
-> GorpValueWithChangesPagedResult gorp_list_get()
+> GorpValueWithChangesPagedResult gorp_list_get(page=page, env=env)
Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
@@ -104,15 +101,16 @@ Return the full dataset of number of acutely food insecure (in millions) based o
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import gorp_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -120,36 +118,33 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = gorp_api.GorpApi(api_client)
- page = 1 # int | (optional) if omitted the server will use the default value of 1
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.GorpApi(api_client)
+ page = 1 # int | (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
api_response = api_instance.gorp_list_get(page=page, env=env)
+ print("The response of GorpApi->gorp_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling GorpApi->gorp_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int**| | [optional] if omitted the server will use the default value of 1
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **page** | **int**| | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -162,8 +157,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/GorpValueWithChanges.md b/docs/GorpValueWithChanges.md
index bbf4803..2729068 100644
--- a/docs/GorpValueWithChanges.md
+++ b/docs/GorpValueWithChanges.md
@@ -2,19 +2,36 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**absolute_change** | **float** | | [optional]
+**year** | **int** | | [optional]
+**month** | **str** | | [optional]
+**region_name** | **str** | | [optional]
**actual_value** | **float** | | [optional]
**baseline_value** | **float** | | [optional]
-**comments** | **str, none_type** | | [optional]
-**month** | **str, none_type** | | [optional]
-**number_of_countries** | **int** | | [optional]
**percentage_change** | **float** | | [optional]
-**region_name** | **str, none_type** | | [optional]
-**year** | **int** | | [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]
+**absolute_change** | **float** | | [optional]
+**comments** | **str** | | [optional]
+**number_of_countries** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GorpValueWithChanges from a JSON string
+gorp_value_with_changes_instance = GorpValueWithChanges.from_json(json)
+# print the JSON string representation of the object
+print GorpValueWithChanges.to_json()
+# convert the object into a dict
+gorp_value_with_changes_dict = gorp_value_with_changes_instance.to_dict()
+# create an instance of GorpValueWithChanges from a dict
+gorp_value_with_changes_form_dict = gorp_value_with_changes.from_dict(gorp_value_with_changes_dict)
+```
[[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/docs/GorpValueWithChangesPagedResult.md b/docs/GorpValueWithChangesPagedResult.md
index dc07d0f..c4a6ce6 100644
--- a/docs/GorpValueWithChangesPagedResult.md
+++ b/docs/GorpValueWithChangesPagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[GorpValueWithChanges], none_type**](GorpValueWithChanges.md) | | [optional] [readonly]
-**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]
+**items** | [**List[GorpValueWithChanges]**](GorpValueWithChanges.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of GorpValueWithChangesPagedResult from a JSON string
+gorp_value_with_changes_paged_result_instance = GorpValueWithChangesPagedResult.from_json(json)
+# print the JSON string representation of the object
+print GorpValueWithChangesPagedResult.to_json()
+# convert the object into a dict
+gorp_value_with_changes_paged_result_dict = gorp_value_with_changes_paged_result_instance.to_dict()
+# create an instance of GorpValueWithChangesPagedResult from a dict
+gorp_value_with_changes_paged_result_form_dict = gorp_value_with_changes_paged_result.from_dict(gorp_value_with_changes_paged_result_dict)
+```
[[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/docs/HouseholdSurveyListDTO.md b/docs/HouseholdSurveyListDTO.md
new file mode 100644
index 0000000..1ce5cfa
--- /dev/null
+++ b/docs/HouseholdSurveyListDTO.md
@@ -0,0 +1,53 @@
+# HouseholdSurveyListDTO
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**survey_id** | **int** | The Id of the Survey | [optional]
+**survey_status_id** | **int** | The Id of the Survey status | [optional]
+**survey_start_date** | **datetime** | The date when the survey has started | [optional]
+**survey_end_date** | **datetime** | The date when the survey has ended | [optional]
+**survey_create_date** | **datetime** | The date when the survey has been uploaded in the Data Bridges platform | [optional]
+**survey_validation_report** | **str** | The detailed report on the validation performed on the survey schema | [optional]
+**survey_original_filename** | **str** | The filename of the survey CSV file | [optional]
+**xls_form_name** | **str** | The name of the XLSForm used to collect data | [optional]
+**base_xls_form_name** | **str** | The name of the base XLSForm used to build the XLSForm | [optional]
+**country_name** | **str** | The name of the country where the survey has taken place | [optional]
+**adm0_code** | **int** | The internal code of the country where the survey has taken place | [optional]
+**iso3_alpha3** | **str** | The ISO3 alpha code of the country where the survey has taken place | [optional]
+**user_name** | **str** | The name of the user that has uploaded the survey data | [optional]
+**approved_by** | **str** | | [optional]
+**original_csv_file** | **str** | The link to download the original CSV file | [optional]
+**base_data** | **str** | The link to the JSON data reshaped on the base XLSForm | [optional]
+**survey_attributes** | [**List[KeyNameDto]**](KeyNameDto.md) | | [optional]
+**organizations** | [**List[KeyNameDto]**](KeyNameDto.md) | | [optional]
+**survey_modality_name** | **str** | | [optional]
+**survey_category_name** | **str** | | [optional]
+**survey_sub_category_name** | **str** | | [optional]
+**survey_phase_name** | **str** | | [optional]
+**survey_visibilty** | **str** | | [optional]
+**is_continuous_monitoring** | **bool** | | [optional]
+**survey_name** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of HouseholdSurveyListDTO from a JSON string
+household_survey_list_dto_instance = HouseholdSurveyListDTO.from_json(json)
+# print the JSON string representation of the object
+print HouseholdSurveyListDTO.to_json()
+
+# convert the object into a dict
+household_survey_list_dto_dict = household_survey_list_dto_instance.to_dict()
+# create an instance of HouseholdSurveyListDTO from a dict
+household_survey_list_dto_form_dict = household_survey_list_dto.from_dict(household_survey_list_dto_dict)
+```
+[[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/docs/HouseholdSurveyListDTOPagedResult.md b/docs/HouseholdSurveyListDTOPagedResult.md
new file mode 100644
index 0000000..8ba509b
--- /dev/null
+++ b/docs/HouseholdSurveyListDTOPagedResult.md
@@ -0,0 +1,31 @@
+# HouseholdSurveyListDTOPagedResult
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**items** | [**List[HouseholdSurveyListDTO]**](HouseholdSurveyListDTO.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of HouseholdSurveyListDTOPagedResult from a JSON string
+household_survey_list_dto_paged_result_instance = HouseholdSurveyListDTOPagedResult.from_json(json)
+# print the JSON string representation of the object
+print HouseholdSurveyListDTOPagedResult.to_json()
+
+# convert the object into a dict
+household_survey_list_dto_paged_result_dict = household_survey_list_dto_paged_result_instance.to_dict()
+# create an instance of HouseholdSurveyListDTOPagedResult from a dict
+household_survey_list_dto_paged_result_form_dict = household_survey_list_dto_paged_result.from_dict(household_survey_list_dto_paged_result_dict)
+```
+[[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/docs/IAttributesTable.md b/docs/IAttributesTable.md
deleted file mode 100644
index c8969eb..0000000
--- a/docs/IAttributesTable.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# IAttributesTable
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**count** | **int** | | [optional] [readonly]
-**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/docs/IFeature.md b/docs/IFeature.md
deleted file mode 100644
index badd1b1..0000000
--- a/docs/IFeature.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# IFeature
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**attributes** | [**IAttributesTable**](IAttributesTable.md) | | [optional]
-**bounding_box** | [**Envelope**](Envelope.md) | | [optional]
-**geometry** | [**Geometry**](Geometry.md) | | [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/docs/IncubationApi.md b/docs/IncubationApi.md
new file mode 100644
index 0000000..7b182a0
--- /dev/null
+++ b/docs/IncubationApi.md
@@ -0,0 +1,433 @@
+# data_bridges_client.IncubationApi
+
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**household_draft_internal_base_data_get**](IncubationApi.md#household_draft_internal_base_data_get) | **GET** /Household/DraftInternalBaseData | Get data that includes the core household fields only by Survey ID
+[**household_full_data_get**](IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+[**household_official_use_base_data_get**](IncubationApi.md#household_official_use_base_data_get) | **GET** /Household/OfficialUseBaseData | Get data that includes the core household fields only by Survey ID
+[**household_public_base_data_get**](IncubationApi.md#household_public_base_data_get) | **GET** /Household/PublicBaseData | Get data that includes the core household fields only by Survey ID
+[**household_surveys_get**](IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+
+
+# **household_draft_internal_base_data_get**
+> PagedSurveyResponsesDTO household_draft_internal_base_data_get(survey_id=survey_id, page=page, env=env)
+
+Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-draftinternalbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
+import data_bridges_client
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.IncubationApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Get data that includes the core household fields only by Survey ID
+ api_response = api_instance.household_draft_internal_base_data_get(survey_id=survey_id, page=page, env=env)
+ print("The response of IncubationApi->household_draft_internal_base_data_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling IncubationApi->household_draft_internal_base_data_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+**404** | Not Found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **household_full_data_get**
+> PagedSurveyResponsesDTO household_full_data_get(survey_id=survey_id, format=format, page=page, env=env)
+
+Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
+import data_bridges_client
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.IncubationApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+ api_response = api_instance.household_full_data_get(survey_id=survey_id, format=format, page=page, env=env)
+ print("The response of IncubationApi->household_full_data_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling IncubationApi->household_full_data_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+**404** | Not Found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **household_official_use_base_data_get**
+> PagedSurveyResponsesDTO household_official_use_base_data_get(survey_id=survey_id, page=page, env=env)
+
+Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-officialusebasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
+import data_bridges_client
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.IncubationApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Get data that includes the core household fields only by Survey ID
+ api_response = api_instance.household_official_use_base_data_get(survey_id=survey_id, page=page, env=env)
+ print("The response of IncubationApi->household_official_use_base_data_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling IncubationApi->household_official_use_base_data_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+**404** | Not Found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **household_public_base_data_get**
+> PagedSurveyResponsesDTO household_public_base_data_get(survey_id=survey_id, page=page, env=env)
+
+Get data that includes the core household fields only by Survey ID
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-publicbasedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
+import data_bridges_client
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.IncubationApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Get data that includes the core household fields only by Survey ID
+ api_response = api_instance.household_public_base_data_get(survey_id=survey_id, page=page, env=env)
+ print("The response of IncubationApi->household_public_base_data_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling IncubationApi->household_public_base_data_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+**404** | Not Found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **household_surveys_get**
+> HouseholdSurveyListDTOPagedResult household_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
+
+Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
+import data_bridges_client
+from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.IncubationApi(api_client)
+ adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+ api_response = api_instance.household_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
+ print("The response of IncubationApi->household_surveys_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling IncubationApi->household_surveys_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **start_date** | **datetime**| starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**HouseholdSurveyListDTOPagedResult**](HouseholdSurveyListDTOPagedResult.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/docs/IpcValue.md b/docs/IpcValue.md
index 0faee1c..36cdf67 100644
--- a/docs/IpcValue.md
+++ b/docs/IpcValue.md
@@ -2,30 +2,47 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**ipc_analysed_percentage** | **float, none_type** | | [optional]
-**ipc_analysed_population** | **int, none_type** | | [optional]
-**ipc_analysis_comment** | **str, none_type** | | [optional]
-**ipc_area_name** | **str, none_type** | | [optional]
-**ipc_country_name** | **str, none_type** | | [optional]
-**ipc_create_date** | **datetime** | | [optional]
-**ipc_data_source** | **str, none_type** | | [optional]
-**ipc_data_type** | **str, none_type** | | [optional]
**ipc_id** | **int** | | [optional]
-**ipc_is_latest_value** | **bool** | | [optional]
-**ipc_phase3_percentage** | **float, none_type** | | [optional]
-**ipc_phase3_population** | **int, none_type** | | [optional]
-**ipc_phase4_percentage** | **float, none_type** | | [optional]
-**ipc_phase4_population** | **int, none_type** | | [optional]
-**ipc_phase5_percentage** | **float, none_type** | | [optional]
-**ipc_phase5_population** | **int, none_type** | | [optional]
-**ipc_reference_period** | **str, none_type** | | [optional]
-**ipc_update_date** | **datetime, none_type** | | [optional]
**ipc_year** | **int** | | [optional]
-**iso3_alpha3** | **str, none_type** | | [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]
+**iso3_alpha3** | **str** | | [optional]
+**ipc_is_latest_value** | **bool** | | [optional]
+**ipc_country_name** | **str** | | [optional]
+**ipc_area_name** | **str** | | [optional]
+**ipc_phase3_population** | **int** | | [optional]
+**ipc_phase4_population** | **int** | | [optional]
+**ipc_phase5_population** | **int** | | [optional]
+**ipc_phase3_percentage** | **float** | | [optional]
+**ipc_phase4_percentage** | **float** | | [optional]
+**ipc_phase5_percentage** | **float** | | [optional]
+**ipc_analysed_population** | **int** | | [optional]
+**ipc_analysed_percentage** | **float** | | [optional]
+**ipc_analysis_comment** | **str** | | [optional]
+**ipc_data_type** | **str** | | [optional]
+**ipc_data_source** | **str** | | [optional]
+**ipc_reference_period** | **str** | | [optional]
+**ipc_create_date** | **datetime** | | [optional]
+**ipc_update_date** | **datetime** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.ipc_value import IpcValue
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of IpcValue from a JSON string
+ipc_value_instance = IpcValue.from_json(json)
+# print the JSON string representation of the object
+print IpcValue.to_json()
+# convert the object into a dict
+ipc_value_dict = ipc_value_instance.to_dict()
+# create an instance of IpcValue from a dict
+ipc_value_form_dict = ipc_value.from_dict(ipc_value_dict)
+```
[[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/docs/IpcValuePagedResult.md b/docs/IpcValuePagedResult.md
index 85c4836..682de6c 100644
--- a/docs/IpcValuePagedResult.md
+++ b/docs/IpcValuePagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[IpcValue], none_type**](IpcValue.md) | | [optional] [readonly]
-**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]
+**items** | [**List[IpcValue]**](IpcValue.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of IpcValuePagedResult from a JSON string
+ipc_value_paged_result_instance = IpcValuePagedResult.from_json(json)
+# print the JSON string representation of the object
+print IpcValuePagedResult.to_json()
+# convert the object into a dict
+ipc_value_paged_result_dict = ipc_value_paged_result_instance.to_dict()
+# create an instance of IpcValuePagedResult from a dict
+ipc_value_paged_result_form_dict = ipc_value_paged_result.from_dict(ipc_value_paged_result_dict)
+```
[[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/docs/KeyNameDto.md b/docs/KeyNameDto.md
new file mode 100644
index 0000000..086b1a1
--- /dev/null
+++ b/docs/KeyNameDto.md
@@ -0,0 +1,30 @@
+# KeyNameDto
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**name** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.key_name_dto import KeyNameDto
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of KeyNameDto from a JSON string
+key_name_dto_instance = KeyNameDto.from_json(json)
+# print the JSON string representation of the object
+print KeyNameDto.to_json()
+
+# convert the object into a dict
+key_name_dto_dict = key_name_dto_instance.to_dict()
+# create an instance of KeyNameDto from a dict
+key_name_dto_form_dict = key_name_dto.from_dict(key_name_dto_dict)
+```
+[[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/docs/MFIProcessedDataDTO.md b/docs/MFIProcessedDataDTO.md
index 2cbcdbd..8ff5424 100644
--- a/docs/MFIProcessedDataDTO.md
+++ b/docs/MFIProcessedDataDTO.md
@@ -2,36 +2,53 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**survey_id** | **int** | The Id of the Survey | [optional]
+**start_date** | **datetime** | The Id of the Survey status | [optional]
+**end_date** | **datetime** | | [optional]
+**market_id** | **int** | | [optional]
+**market_name** | **str** | | [optional]
+**market_latitude** | **float** | | [optional]
+**market_longitude** | **float** | | [optional]
+**regional_bureau_id** | **int** | | [optional]
+**regional_bureau_name** | **str** | | [optional]
**adm0_code** | **int** | | [optional]
-**adm0_name** | **str, none_type** | | [optional]
+**adm0_name** | **str** | | [optional]
**adm1_code** | **int** | | [optional]
-**adm1_name** | **str, none_type** | | [optional]
+**adm1_name** | **str** | | [optional]
**adm2_code** | **int** | | [optional]
-**adm2_name** | **str, none_type** | | [optional]
-**base_xls_form_id** | **int** | | [optional]
-**base_xls_form_name** | **str, none_type** | | [optional]
-**dimension_id** | **int** | | [optional]
-**dimension_name** | **str, none_type** | | [optional]
-**end_date** | **datetime, none_type** | | [optional]
+**adm2_name** | **str** | | [optional]
**level_id** | **int** | | [optional]
-**level_name** | **str, none_type** | | [optional]
-**market_id** | **int** | | [optional]
-**market_latitude** | **float, none_type** | | [optional]
-**market_longitude** | **float, none_type** | | [optional]
-**market_name** | **str, none_type** | | [optional]
-**output_value** | **float, none_type** | | [optional]
-**regional_bureau_id** | **int** | | [optional]
-**regional_bureau_name** | **str, none_type** | | [optional]
-**start_date** | **datetime, none_type** | The Id of the Survey status | [optional]
-**survey_id** | **int** | The Id of the Survey | [optional]
-**traders_sample_size** | **int, none_type** | | [optional]
+**level_name** | **str** | | [optional]
+**dimension_id** | **int** | | [optional]
+**dimension_name** | **str** | | [optional]
**variable_id** | **int** | | [optional]
-**variable_label** | **str, none_type** | | [optional]
-**variable_name** | **str, none_type** | | [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]
+**variable_name** | **str** | | [optional]
+**variable_label** | **str** | | [optional]
+**output_value** | **float** | | [optional]
+**traders_sample_size** | **int** | | [optional]
+**base_xls_form_id** | **int** | | [optional]
+**base_xls_form_name** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MFIProcessedDataDTO from a JSON string
+mfi_processed_data_dto_instance = MFIProcessedDataDTO.from_json(json)
+# print the JSON string representation of the object
+print MFIProcessedDataDTO.to_json()
+# convert the object into a dict
+mfi_processed_data_dto_dict = mfi_processed_data_dto_instance.to_dict()
+# create an instance of MFIProcessedDataDTO from a dict
+mfi_processed_data_dto_form_dict = mfi_processed_data_dto.from_dict(mfi_processed_data_dto_dict)
+```
[[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/docs/MarketDTO.md b/docs/MarketDTO.md
new file mode 100644
index 0000000..8112bcb
--- /dev/null
+++ b/docs/MarketDTO.md
@@ -0,0 +1,37 @@
+# MarketDTO
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**market_id** | **int** | The internal ID of the market | [optional]
+**market_name** | **str** | The name of the market | [optional]
+**market_local_name** | **str** | The local name of the market | [optional]
+**market_latitude** | **float** | The decimal latitude | [optional]
+**market_longitude** | **float** | The decimal longitude | [optional]
+**admin1_name** | **str** | The name of the first level administrative division where the market is placed | [optional]
+**admin1_code** | **int** | The code of the first level administrative division where the market is placed | [optional]
+**admin2_name** | **str** | The name of the second level administrative division where the market is placed | [optional]
+**admin2_code** | **int** | The code of the second level administrative division where the market is placed | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.market_dto import MarketDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MarketDTO from a JSON string
+market_dto_instance = MarketDTO.from_json(json)
+# print the JSON string representation of the object
+print MarketDTO.to_json()
+
+# convert the object into a dict
+market_dto_dict = market_dto_instance.to_dict()
+# create an instance of MarketDTO from a dict
+market_dto_form_dict = market_dto.from_dict(market_dto_dict)
+```
+[[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/docs/MarketGeoJsonRoot.md b/docs/MarketGeoJsonRoot.md
new file mode 100644
index 0000000..2e41b7b
--- /dev/null
+++ b/docs/MarketGeoJsonRoot.md
@@ -0,0 +1,31 @@
+# MarketGeoJsonRoot
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **str** | | [optional]
+**features** | [**List[Feature]**](Feature.md) | | [optional]
+**bbox** | **object** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of MarketGeoJsonRoot from a JSON string
+market_geo_json_root_instance = MarketGeoJsonRoot.from_json(json)
+# print the JSON string representation of the object
+print MarketGeoJsonRoot.to_json()
+
+# convert the object into a dict
+market_geo_json_root_dict = market_geo_json_root_instance.to_dict()
+# create an instance of MarketGeoJsonRoot from a dict
+market_geo_json_root_form_dict = market_geo_json_root.from_dict(market_geo_json_root_dict)
+```
+[[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/docs/MarketPricesApi.md b/docs/MarketPricesApi.md
index 62ce9cf..4fbd55a 100644
--- a/docs/MarketPricesApi.md
+++ b/docs/MarketPricesApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.MarketPricesApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -12,7 +12,7 @@ Method | HTTP request | Description
# **market_prices_alps_get**
-> ViewExtendedAlpsValuePagedResult market_prices_alps_get()
+> ViewExtendedAlpsValuePagedResult market_prices_alps_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
Returns time series values of ALPS and PEWI.
@@ -24,15 +24,16 @@ Returns time series values of ALPS and PEWI.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import market_prices_api
-from data_bridges_client.model.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -40,56 +41,53 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = market_prices_api.MarketPricesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) if omitted the server will use the default value of 0
- commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) if omitted the server will use the default value of 0
- price_type_name = "" # str | Price type: [retail|wholesale|farmgate] (optional) if omitted the server will use the default value of ""
- currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) if omitted the server will use the default value of 0
- price_flag = "" # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) if omitted the server will use the default value of ""
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- latest_value_only = False # bool | [TRUE|FALSE] (optional) if omitted the server will use the default value of False
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketPricesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) (default to 0)
+ commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) (default to 0)
+ price_type_name = '' # str | Price type: [retail|wholesale|farmgate] (optional) (default to '')
+ currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) (default to 0)
+ price_flag = '' # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) (default to '')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ latest_value_only = False # bool | [TRUE|FALSE] (optional) (default to False)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns time series values of ALPS and PEWI.
api_response = api_instance.market_prices_alps_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
+ print("The response of MarketPricesApi->market_prices_alps_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketPricesApi->market_prices_alps_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] if omitted the server will use the default value of 0
- **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] if omitted the server will use the default value of 0
- **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] if omitted the server will use the default value of ""
- **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] if omitted the server will use the default value of 0
- **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] if omitted the server will use the default value of ""
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] if omitted the server will use the default value of False
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] [default to 0]
+ **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] [default to 0]
+ **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] [default to '']
+ **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] [default to 0]
+ **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] [default to '']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] [default to False]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -102,8 +100,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -115,11 +112,11 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **market_prices_price_daily_get**
-> ViewExtendedAggregatedPricePagedResult market_prices_price_daily_get()
+> ViewExtendedAggregatedPricePagedResult market_prices_price_daily_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
Returns a daily time series of commodity market prices.
- [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
### Example
@@ -127,15 +124,16 @@ Returns a daily time series of commodity market prices.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import market_prices_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -143,56 +141,53 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = market_prices_api.MarketPricesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) if omitted the server will use the default value of 0
- commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) if omitted the server will use the default value of 0
- price_type_name = "" # str | Price type: [retail|wholesale|farmgate] (optional) if omitted the server will use the default value of ""
- currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) if omitted the server will use the default value of 0
- price_flag = "" # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) if omitted the server will use the default value of ""
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- latest_value_only = False # bool | [TRUE|FALSE] (optional) if omitted the server will use the default value of False
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketPricesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) (default to 0)
+ commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) (default to 0)
+ price_type_name = '' # str | Price type: [retail|wholesale|farmgate] (optional) (default to '')
+ currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) (default to 0)
+ price_flag = '' # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) (default to '')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ latest_value_only = False # bool | [TRUE|FALSE] (optional) (default to False)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns a daily time series of commodity market prices.
api_response = api_instance.market_prices_price_daily_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
+ print("The response of MarketPricesApi->market_prices_price_daily_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketPricesApi->market_prices_price_daily_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] if omitted the server will use the default value of 0
- **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] if omitted the server will use the default value of 0
- **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] if omitted the server will use the default value of ""
- **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] if omitted the server will use the default value of 0
- **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] if omitted the server will use the default value of ""
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] if omitted the server will use the default value of False
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] [default to 0]
+ **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] [default to 0]
+ **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] [default to '']
+ **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] [default to 0]
+ **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] [default to '']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] [default to False]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -205,8 +200,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -218,7 +212,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **market_prices_price_monthly_get**
-> ViewExtendedAggregatedPricePagedResult market_prices_price_monthly_get()
+> ViewExtendedAggregatedPricePagedResult market_prices_price_monthly_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
Returns a monthly time series of commodity market prices.
@@ -230,15 +224,16 @@ Returns a monthly time series of commodity market prices.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import market_prices_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -246,56 +241,53 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = market_prices_api.MarketPricesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) if omitted the server will use the default value of 0
- commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) if omitted the server will use the default value of 0
- price_type_name = "" # str | Price type: [retail|wholesale|farmgate] (optional) if omitted the server will use the default value of ""
- currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) if omitted the server will use the default value of 0
- price_flag = "" # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) if omitted the server will use the default value of ""
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- latest_value_only = False # bool | [TRUE|FALSE] (optional) if omitted the server will use the default value of False
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketPricesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) (default to 0)
+ commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) (default to 0)
+ price_type_name = '' # str | Price type: [retail|wholesale|farmgate] (optional) (default to '')
+ currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) (default to 0)
+ price_flag = '' # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) (default to '')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ latest_value_only = False # bool | [TRUE|FALSE] (optional) (default to False)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns a monthly time series of commodity market prices.
api_response = api_instance.market_prices_price_monthly_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
+ print("The response of MarketPricesApi->market_prices_price_monthly_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketPricesApi->market_prices_price_monthly_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] if omitted the server will use the default value of 0
- **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] if omitted the server will use the default value of 0
- **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] if omitted the server will use the default value of ""
- **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] if omitted the server will use the default value of 0
- **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] if omitted the server will use the default value of ""
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] if omitted the server will use the default value of False
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] [default to 0]
+ **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] [default to 0]
+ **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] [default to '']
+ **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] [default to 0]
+ **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] [default to '']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] [default to False]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -308,8 +300,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -321,7 +312,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **market_prices_price_raw_get**
-> PagedCommodityPriceListDTO market_prices_price_raw_get()
+> PagedCommodityPriceListDTO market_prices_price_raw_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
Returns original commodity market prices
@@ -333,15 +324,16 @@ Returns original commodity market prices
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import market_prices_api
-from data_bridges_client.model.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -349,56 +341,53 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = market_prices_api.MarketPricesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) if omitted the server will use the default value of 0
- commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) if omitted the server will use the default value of 0
- price_type_name = "" # str | Price type: [retail|wholesale|farmgate] (optional) if omitted the server will use the default value of ""
- currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) if omitted the server will use the default value of 0
- price_flag = "" # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) if omitted the server will use the default value of ""
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- latest_value_only = False # bool | [TRUE|FALSE] (optional) if omitted the server will use the default value of False
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketPricesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) (default to 0)
+ commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) (default to 0)
+ price_type_name = '' # str | Price type: [retail|wholesale|farmgate] (optional) (default to '')
+ currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) (default to 0)
+ price_flag = '' # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) (default to '')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ latest_value_only = False # bool | [TRUE|FALSE] (optional) (default to False)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns original commodity market prices
api_response = api_instance.market_prices_price_raw_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
+ print("The response of MarketPricesApi->market_prices_price_raw_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketPricesApi->market_prices_price_raw_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] if omitted the server will use the default value of 0
- **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] if omitted the server will use the default value of 0
- **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] if omitted the server will use the default value of ""
- **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] if omitted the server will use the default value of 0
- **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] if omitted the server will use the default value of ""
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] if omitted the server will use the default value of False
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] [default to 0]
+ **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] [default to 0]
+ **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] [default to '']
+ **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] [default to 0]
+ **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] [default to '']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] [default to False]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -411,8 +400,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -424,7 +412,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **market_prices_price_weekly_get**
-> PagedCommodityWeeklyAggregatedPriceListDTO market_prices_price_weekly_get()
+> PagedCommodityWeeklyAggregatedPriceListDTO market_prices_price_weekly_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
Returns a weekly time series of commodity market prices.
@@ -436,15 +424,16 @@ Returns a weekly time series of commodity market prices.
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import market_prices_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -452,56 +441,53 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = market_prices_api.MarketPricesApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
- market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) if omitted the server will use the default value of 0
- commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) if omitted the server will use the default value of 0
- price_type_name = "" # str | Price type: [retail|wholesale|farmgate] (optional) if omitted the server will use the default value of ""
- currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) if omitted the server will use the default value of 0
- price_flag = "" # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) if omitted the server will use the default value of ""
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
- latest_value_only = False # bool | [TRUE|FALSE] (optional) if omitted the server will use the default value of False
- page = 1 # int | Page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketPricesApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. (optional)
+ market_id = 0 # int | Unique ID of a Market, as found in /Markets/GeoJSONList (optional) (default to 0)
+ commodity_id = 0 # int | The exact ID of a Commodity, as found in /Commodities/List (optional) (default to 0)
+ price_type_name = '' # str | Price type: [retail|wholesale|farmgate] (optional) (default to '')
+ currency_id = 0 # int | The exact ID of a currency, as found in /Currency/List (optional) (default to 0)
+ price_flag = '' # str | Type of price data: [actual|aggregate|estimated|forecasted] (optional) (default to '')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) (optional)
+ latest_value_only = False # bool | [TRUE|FALSE] (optional) (default to False)
+ page = 1 # int | Page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Returns a weekly time series of commodity market prices.
api_response = api_instance.market_prices_price_weekly_get(country_code=country_code, market_id=market_id, commodity_id=commodity_id, price_type_name=price_type_name, currency_id=currency_id, price_flag=price_flag, start_date=start_date, end_date=end_date, latest_value_only=latest_value_only, page=page, format=format, env=env)
+ print("The response of MarketPricesApi->market_prices_price_weekly_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketPricesApi->market_prices_price_weekly_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
- **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] if omitted the server will use the default value of 0
- **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] if omitted the server will use the default value of 0
- **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] if omitted the server will use the default value of ""
- **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] if omitted the server will use the default value of 0
- **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] if omitted the server will use the default value of ""
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
- **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] if omitted the server will use the default value of False
- **page** | **int**| Page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. | [optional]
+ **market_id** | **int**| Unique ID of a Market, as found in /Markets/GeoJSONList | [optional] [default to 0]
+ **commodity_id** | **int**| The exact ID of a Commodity, as found in /Commodities/List | [optional] [default to 0]
+ **price_type_name** | **str**| Price type: [retail|wholesale|farmgate] | [optional] [default to '']
+ **currency_id** | **int**| The exact ID of a currency, as found in /Currency/List | [optional] [default to 0]
+ **price_flag** | **str**| Type of price data: [actual|aggregate|estimated|forecasted] | [optional] [default to '']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \\\"-\\\" month \\\"-\\\" day (e.g. 2020/06/24) | [optional]
+ **latest_value_only** | **bool**| [TRUE|FALSE] | [optional] [default to False]
+ **page** | **int**| Page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -514,8 +500,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/MarketsApi.md b/docs/MarketsApi.md
index b8c84d2..3c56d29 100644
--- a/docs/MarketsApi.md
+++ b/docs/MarketsApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.MarketsApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -11,7 +11,7 @@ Method | HTTP request | Description
# **markets_geo_json_list_get**
-> [IFeature] markets_geo_json_list_get()
+> MarketGeoJsonRoot markets_geo_json_list_get(adm0code=adm0code, env=env)
Provide a list of geo referenced markets in a specific country
@@ -23,15 +23,16 @@ Provide a list of geo referenced markets in a specific country
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import markets_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.i_feature import IFeature
+from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -39,40 +40,37 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = markets_api.MarketsApi(api_client)
- adm0code = 1 # int | The admin code of the country (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.MarketsApi(api_client)
+ adm0code = 56 # int | The admin code of the country (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Provide a list of geo referenced markets in a specific country
api_response = api_instance.markets_geo_json_list_get(adm0code=adm0code, env=env)
+ print("The response of MarketsApi->markets_geo_json_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketsApi->markets_geo_json_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0code** | **int**| The admin code of the country | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0code** | **int**| The admin code of the country | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[IFeature]**](IFeature.md)
+[**MarketGeoJsonRoot**](MarketGeoJsonRoot.md)
### Authorization
@@ -83,7 +81,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/geo+json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -94,7 +91,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **markets_list_get**
-> file_type markets_list_get()
+> PagedMarketListDTO markets_list_get(country_code=country_code, page=page, format=format, env=env)
Get a complete list of markets in a country
@@ -106,13 +103,16 @@ Get a complete list of markets in a country
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import markets_api
+from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -120,44 +120,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = markets_api.MarketsApi(api_client)
- country_code = "countryCode_example" # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketsApi(api_client)
+ country_code = 'country_code_example' # str | The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Get a complete list of markets in a country
api_response = api_instance.markets_list_get(country_code=country_code, page=page, format=format, env=env)
+ print("The response of MarketsApi->markets_list_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketsApi->markets_list_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **country_code** | **str**| The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-**file_type**
+[**PagedMarketListDTO**](PagedMarketListDTO.md)
### Authorization
@@ -166,8 +163,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -178,7 +174,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **markets_markets_as_csv_get**
-> file_type markets_markets_as_csv_get()
+> bytearray markets_markets_as_csv_get(adm0code=adm0code, local_names=local_names, env=env)
Get a complete list of markets in a country
@@ -190,13 +186,15 @@ Get a complete list of markets in a country
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import markets_api
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -204,42 +202,39 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = markets_api.MarketsApi(api_client)
- adm0code = 1 # int | The admin code of the country (optional)
- local_names = False # bool | If true the name of markets and regions will be localized if available (optional) if omitted the server will use the default value of False
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.MarketsApi(api_client)
+ adm0code = 56 # int | The admin code of the country (optional)
+ local_names = False # bool | If true the name of markets and regions will be localized if available (optional) (default to False)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Get a complete list of markets in a country
api_response = api_instance.markets_markets_as_csv_get(adm0code=adm0code, local_names=local_names, env=env)
+ print("The response of MarketsApi->markets_markets_as_csv_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketsApi->markets_markets_as_csv_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0code** | **int**| The admin code of the country | [optional]
- **local_names** | **bool**| If true the name of markets and regions will be localized if available | [optional] if omitted the server will use the default value of False
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0code** | **int**| The admin code of the country | [optional]
+ **local_names** | **bool**| If true the name of markets and regions will be localized if available | [optional] [default to False]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-**file_type**
+**bytearray**
### Authorization
@@ -248,8 +243,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -260,7 +254,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **markets_nearby_markets_get**
-> [NearbyMarketsDTO] markets_nearby_markets_get()
+> List[NearbyMarketsDTO] markets_nearby_markets_get(adm0code=adm0code, lat=lat, lng=lng, env=env)
Find markets near a given location by longitude and latitude within a 15Km distance
@@ -272,15 +266,16 @@ Find markets near a given location by longitude and latitude within a 15Km dista
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import markets_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.nearby_markets_dto import NearbyMarketsDTO
+from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -288,44 +283,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = markets_api.MarketsApi(api_client)
- adm0code = 1 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional)
- lat = 3.14 # float | latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal (optional)
- lng = 3.14 # float | longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.MarketsApi(api_client)
+ adm0code = 56 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional)
+ lat = 3.4 # float | latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal (optional)
+ lng = 3.4 # float | longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Find markets near a given location by longitude and latitude within a 15Km distance
api_response = api_instance.markets_nearby_markets_get(adm0code=adm0code, lat=lat, lng=lng, env=env)
+ print("The response of MarketsApi->markets_nearby_markets_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling MarketsApi->markets_nearby_markets_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional]
- **lat** | **float**| latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal | [optional]
- **lng** | **float**| longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional]
+ **lat** | **float**| latitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal | [optional]
+ **lng** | **float**| longitude of the point that will be used to search for existing nearby markets. Geo-reference standard used for this coordinate is decimal | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[NearbyMarketsDTO]**](NearbyMarketsDTO.md)
+[**List[NearbyMarketsDTO]**](NearbyMarketsDTO.md)
### Authorization
@@ -336,7 +328,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/NearbyMarketsDTO.md b/docs/NearbyMarketsDTO.md
index 85dd72c..bb9c588 100644
--- a/docs/NearbyMarketsDTO.md
+++ b/docs/NearbyMarketsDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**distance** | **float** | The distance in meters of the market from the provided point | [optional]
**market_id** | **int** | The internal ID of the market | [optional]
-**market_name** | **str, none_type** | The name of the market | [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]
+**market_name** | **str** | The name of the market | [optional]
+**distance** | **float** | The distance in meters of the market from the provided point | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of NearbyMarketsDTO from a JSON string
+nearby_markets_dto_instance = NearbyMarketsDTO.from_json(json)
+# print the JSON string representation of the object
+print NearbyMarketsDTO.to_json()
+# convert the object into a dict
+nearby_markets_dto_dict = nearby_markets_dto_instance.to_dict()
+# create an instance of NearbyMarketsDTO from a dict
+nearby_markets_dto_form_dict = nearby_markets_dto.from_dict(nearby_markets_dto_dict)
+```
[[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/docs/NtsGeometryServices.md b/docs/NtsGeometryServices.md
deleted file mode 100644
index 14a2907..0000000
--- a/docs/NtsGeometryServices.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# NtsGeometryServices
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**coordinate_equality_comparer** | [**CoordinateEqualityComparer**](CoordinateEqualityComparer.md) | | [optional]
-**default_coordinate_sequence_factory** | [**CoordinateSequenceFactory**](CoordinateSequenceFactory.md) | | [optional]
-**default_precision_model** | [**PrecisionModel**](PrecisionModel.md) | | [optional]
-**default_srid** | **int** | | [optional] [readonly]
-**geometry_overlay** | [**GeometryOverlay**](GeometryOverlay.md) | | [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/docs/OgcGeometryType.md b/docs/OgcGeometryType.md
deleted file mode 100644
index 318eeae..0000000
--- a/docs/OgcGeometryType.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# OgcGeometryType
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**value** | **int** | | must be one of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ]
-
-[[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/docs/Ordinates.md b/docs/Ordinates.md
deleted file mode 100644
index 7ae016d..0000000
--- a/docs/Ordinates.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Ordinates
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**value** | **int** | | must be one of [0, 1, 2, 3, 4, 7, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65535, 65536, 65539, 65543, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, -2147483648, -65536, -1, ]
-
-[[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/docs/PagedCommodityListDTO.md b/docs/PagedCommodityListDTO.md
index 17ef802..55d29f8 100644
--- a/docs/PagedCommodityListDTO.md
+++ b/docs/PagedCommodityListDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[CommodityDTO], none_type**](CommodityDTO.md) | The list of paged items | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[CommodityDTO]**](CommodityDTO.md) | The list of paged items | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedCommodityListDTO from a JSON string
+paged_commodity_list_dto_instance = PagedCommodityListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedCommodityListDTO.to_json()
+# convert the object into a dict
+paged_commodity_list_dto_dict = paged_commodity_list_dto_instance.to_dict()
+# create an instance of PagedCommodityListDTO from a dict
+paged_commodity_list_dto_form_dict = paged_commodity_list_dto.from_dict(paged_commodity_list_dto_dict)
+```
[[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/docs/PagedCommodityPriceListDTO.md b/docs/PagedCommodityPriceListDTO.md
index a1b2a1a..56df6fd 100644
--- a/docs/PagedCommodityPriceListDTO.md
+++ b/docs/PagedCommodityPriceListDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[CommodityPriceDTO], none_type**](CommodityPriceDTO.md) | The list of paged items | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[CommodityPriceDTO]**](CommodityPriceDTO.md) | The list of paged items | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedCommodityPriceListDTO from a JSON string
+paged_commodity_price_list_dto_instance = PagedCommodityPriceListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedCommodityPriceListDTO.to_json()
+# convert the object into a dict
+paged_commodity_price_list_dto_dict = paged_commodity_price_list_dto_instance.to_dict()
+# create an instance of PagedCommodityPriceListDTO from a dict
+paged_commodity_price_list_dto_form_dict = paged_commodity_price_list_dto.from_dict(paged_commodity_price_list_dto_dict)
+```
[[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/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md b/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md
index 4d2e8f3..a2a8f33 100644
--- a/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md
+++ b/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[WeeklyAggregatedPrice], none_type**](WeeklyAggregatedPrice.md) | The list of paged items | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[WeeklyAggregatedPrice]**](WeeklyAggregatedPrice.md) | The list of paged items | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a JSON string
+paged_commodity_weekly_aggregated_price_list_dto_instance = PagedCommodityWeeklyAggregatedPriceListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedCommodityWeeklyAggregatedPriceListDTO.to_json()
+# convert the object into a dict
+paged_commodity_weekly_aggregated_price_list_dto_dict = paged_commodity_weekly_aggregated_price_list_dto_instance.to_dict()
+# create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a dict
+paged_commodity_weekly_aggregated_price_list_dto_form_dict = paged_commodity_weekly_aggregated_price_list_dto.from_dict(paged_commodity_weekly_aggregated_price_list_dto_dict)
+```
[[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/docs/PagedCurrencyListDTO.md b/docs/PagedCurrencyListDTO.md
index a805233..1aa6d13 100644
--- a/docs/PagedCurrencyListDTO.md
+++ b/docs/PagedCurrencyListDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[CurrencyDTO], none_type**](CurrencyDTO.md) | The list of paged items | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[CurrencyDTO]**](CurrencyDTO.md) | The list of paged items | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedCurrencyListDTO from a JSON string
+paged_currency_list_dto_instance = PagedCurrencyListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedCurrencyListDTO.to_json()
+# convert the object into a dict
+paged_currency_list_dto_dict = paged_currency_list_dto_instance.to_dict()
+# create an instance of PagedCurrencyListDTO from a dict
+paged_currency_list_dto_form_dict = paged_currency_list_dto.from_dict(paged_currency_list_dto_dict)
+```
[[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/docs/PagedEconomicDataDTO.md b/docs/PagedEconomicDataDTO.md
new file mode 100644
index 0000000..6c99818
--- /dev/null
+++ b/docs/PagedEconomicDataDTO.md
@@ -0,0 +1,34 @@
+# PagedEconomicDataDTO
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total_items** | **int** | The total number of items | [optional]
+**page** | **int** | The current page | [optional]
+**unit** | **str** | | [optional]
+**frequency** | **str** | | [optional]
+**data_source** | **str** | | [optional]
+**items** | [**List[EconomicDataDTO]**](EconomicDataDTO.md) | The list of paged items | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedEconomicDataDTO from a JSON string
+paged_economic_data_dto_instance = PagedEconomicDataDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedEconomicDataDTO.to_json()
+
+# convert the object into a dict
+paged_economic_data_dto_dict = paged_economic_data_dto_instance.to_dict()
+# create an instance of PagedEconomicDataDTO from a dict
+paged_economic_data_dto_form_dict = paged_economic_data_dto.from_dict(paged_economic_data_dto_dict)
+```
+[[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/docs/PagedMarketListDTO.md b/docs/PagedMarketListDTO.md
new file mode 100644
index 0000000..a05edca
--- /dev/null
+++ b/docs/PagedMarketListDTO.md
@@ -0,0 +1,31 @@
+# PagedMarketListDTO
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total_items** | **int** | The total number of items | [optional]
+**page** | **int** | The current page | [optional]
+**items** | [**List[MarketDTO]**](MarketDTO.md) | The list of markets | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedMarketListDTO from a JSON string
+paged_market_list_dto_instance = PagedMarketListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedMarketListDTO.to_json()
+
+# convert the object into a dict
+paged_market_list_dto_dict = paged_market_list_dto_instance.to_dict()
+# create an instance of PagedMarketListDTO from a dict
+paged_market_list_dto_form_dict = paged_market_list_dto.from_dict(paged_market_list_dto_dict)
+```
+[[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/docs/PagedProcessedDataDTO.md b/docs/PagedProcessedDataDTO.md
index 3520575..d1d766f 100644
--- a/docs/PagedProcessedDataDTO.md
+++ b/docs/PagedProcessedDataDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[MFIProcessedDataDTO], none_type**](MFIProcessedDataDTO.md) | The list of processed data | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[MFIProcessedDataDTO]**](MFIProcessedDataDTO.md) | The list of processed data | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedProcessedDataDTO from a JSON string
+paged_processed_data_dto_instance = PagedProcessedDataDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedProcessedDataDTO.to_json()
+# convert the object into a dict
+paged_processed_data_dto_dict = paged_processed_data_dto_instance.to_dict()
+# create an instance of PagedProcessedDataDTO from a dict
+paged_processed_data_dto_form_dict = paged_processed_data_dto.from_dict(paged_processed_data_dto_dict)
+```
[[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/docs/PagedSurveyListDTO.md b/docs/PagedSurveyListDTO.md
index cc10413..d24af31 100644
--- a/docs/PagedSurveyListDTO.md
+++ b/docs/PagedSurveyListDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[SurveyListDTO], none_type**](SurveyListDTO.md) | The list of surveys | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[SurveyListDTO]**](SurveyListDTO.md) | The list of surveys | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedSurveyListDTO from a JSON string
+paged_survey_list_dto_instance = PagedSurveyListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedSurveyListDTO.to_json()
+# convert the object into a dict
+paged_survey_list_dto_dict = paged_survey_list_dto_instance.to_dict()
+# create an instance of PagedSurveyListDTO from a dict
+paged_survey_list_dto_form_dict = paged_survey_list_dto.from_dict(paged_survey_list_dto_dict)
+```
[[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/docs/PagedSurveyResponsesDTO.md b/docs/PagedSurveyResponsesDTO.md
new file mode 100644
index 0000000..c9349c6
--- /dev/null
+++ b/docs/PagedSurveyResponsesDTO.md
@@ -0,0 +1,31 @@
+# PagedSurveyResponsesDTO
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**total_items** | **int** | The total number of responses | [optional]
+**page** | **int** | The current page | [optional]
+**items** | **List[object]** | The list of survey responses | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedSurveyResponsesDTO from a JSON string
+paged_survey_responses_dto_instance = PagedSurveyResponsesDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedSurveyResponsesDTO.to_json()
+
+# convert the object into a dict
+paged_survey_responses_dto_dict = paged_survey_responses_dto_instance.to_dict()
+# create an instance of PagedSurveyResponsesDTO from a dict
+paged_survey_responses_dto_form_dict = paged_survey_responses_dto.from_dict(paged_survey_responses_dto_dict)
+```
+[[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/docs/PagedXlsFormListDTO.md b/docs/PagedXlsFormListDTO.md
index 9a2d832..4da3537 100644
--- a/docs/PagedXlsFormListDTO.md
+++ b/docs/PagedXlsFormListDTO.md
@@ -2,13 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[XlsFormDTO], none_type**](XlsFormDTO.md) | The list of XlsForms | [optional]
-**page** | **int** | The current page | [optional]
**total_items** | **int** | The total number of items | [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]
+**page** | **int** | The current page | [optional]
+**items** | [**List[XlsFormDTO]**](XlsFormDTO.md) | The list of XlsForms | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of PagedXlsFormListDTO from a JSON string
+paged_xls_form_list_dto_instance = PagedXlsFormListDTO.from_json(json)
+# print the JSON string representation of the object
+print PagedXlsFormListDTO.to_json()
+# convert the object into a dict
+paged_xls_form_list_dto_dict = paged_xls_form_list_dto_instance.to_dict()
+# create an instance of PagedXlsFormListDTO from a dict
+paged_xls_form_list_dto_form_dict = paged_xls_form_list_dto.from_dict(paged_xls_form_list_dto_dict)
+```
[[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/docs/Point.md b/docs/Point.md
deleted file mode 100644
index 49021c1..0000000
--- a/docs/Point.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# Point
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**area** | **float** | | [optional] [readonly]
-**boundary** | [**Geometry**](Geometry.md) | | [optional]
-**boundary_dimension** | [**Dimension**](Dimension.md) | | [optional]
-**centroid** | [**Point**](Point.md) | | [optional]
-**coordinate** | [**Coordinate**](Coordinate.md) | | [optional]
-**coordinate_sequence** | [**CoordinateSequence**](CoordinateSequence.md) | | [optional]
-**coordinates** | [**[Coordinate], none_type**](Coordinate.md) | | [optional]
-**dimension** | [**Dimension**](Dimension.md) | | [optional]
-**envelope** | [**Geometry**](Geometry.md) | | [optional]
-**envelope_internal** | [**Envelope**](Envelope.md) | | [optional]
-**factory** | [**GeometryFactory**](GeometryFactory.md) | | [optional]
-**geometry_type** | **str, none_type** | | [optional] [readonly]
-**interior_point** | [**Point**](Point.md) | | [optional]
-**is_empty** | **bool** | | [optional] [readonly]
-**is_rectangle** | **bool** | | [optional] [readonly]
-**is_simple** | **bool** | | [optional] [readonly]
-**is_valid** | **bool** | | [optional] [readonly]
-**length** | **float** | | [optional] [readonly]
-**m** | **float** | | [optional]
-**num_geometries** | **int** | | [optional] [readonly]
-**num_points** | **int** | | [optional] [readonly]
-**ogc_geometry_type** | [**OgcGeometryType**](OgcGeometryType.md) | | [optional]
-**point_on_surface** | [**Point**](Point.md) | | [optional]
-**precision_model** | [**PrecisionModel**](PrecisionModel.md) | | [optional]
-**srid** | **int** | | [optional]
-**user_data** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
-**x** | **float** | | [optional]
-**y** | **float** | | [optional]
-**z** | **float** | | [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/docs/PrecisionModel.md b/docs/PrecisionModel.md
deleted file mode 100644
index 2006c3c..0000000
--- a/docs/PrecisionModel.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# PrecisionModel
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**is_floating** | **bool** | | [optional] [readonly]
-**maximum_significant_digits** | **int** | | [optional] [readonly]
-**precision_model_type** | [**PrecisionModels**](PrecisionModels.md) | | [optional]
-**scale** | **float** | | [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/docs/PrecisionModels.md b/docs/PrecisionModels.md
deleted file mode 100644
index 2a2cacb..0000000
--- a/docs/PrecisionModels.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# PrecisionModels
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**value** | **int** | | must be one of [0, 1, 2, ]
-
-[[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/docs/ProblemDetails.md b/docs/ProblemDetails.md
index ef04701..e3d442b 100644
--- a/docs/ProblemDetails.md
+++ b/docs/ProblemDetails.md
@@ -2,15 +2,32 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**detail** | **str, none_type** | | [optional]
-**instance** | **str, none_type** | | [optional]
-**status** | **int, none_type** | | [optional]
-**title** | **str, none_type** | | [optional]
-**type** | **str, none_type** | | [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]
+**type** | **str** | | [optional]
+**title** | **str** | | [optional]
+**status** | **int** | | [optional]
+**detail** | **str** | | [optional]
+**instance** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.problem_details import ProblemDetails
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ProblemDetails from a JSON string
+problem_details_instance = ProblemDetails.from_json(json)
+# print the JSON string representation of the object
+print ProblemDetails.to_json()
+# convert the object into a dict
+problem_details_dict = problem_details_instance.to_dict()
+# create an instance of ProblemDetails from a dict
+problem_details_form_dict = problem_details.from_dict(problem_details_dict)
+```
[[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/docs/Properties.md b/docs/Properties.md
new file mode 100644
index 0000000..e5c6074
--- /dev/null
+++ b/docs/Properties.md
@@ -0,0 +1,29 @@
+# Properties
+
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.properties import Properties
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of Properties from a JSON string
+properties_instance = Properties.from_json(json)
+# print the JSON string representation of the object
+print Properties.to_json()
+
+# convert the object into a dict
+properties_dict = properties_instance.to_dict()
+# create an instance of Properties from a dict
+properties_form_dict = properties.from_dict(properties_dict)
+```
+[[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/docs/RpmeApi.md b/docs/RpmeApi.md
index aee4c3f..b8a985c 100644
--- a/docs/RpmeApi.md
+++ b/docs/RpmeApi.md
@@ -1,19 +1,21 @@
# data_bridges_client.RpmeApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
+[**rpme_base_data_get**](RpmeApi.md#rpme_base_data_get) | **GET** /Rpme/BaseData | Get data that includes the core RPME fields only by Survey ID
+[**rpme_full_data_get**](RpmeApi.md#rpme_full_data_get) | **GET** /Rpme/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
[**rpme_output_values_get**](RpmeApi.md#rpme_output_values_get) | **GET** /Rpme/OutputValues | Processed values for each variable used in the assessments
[**rpme_surveys_get**](RpmeApi.md#rpme_surveys_get) | **GET** /Rpme/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
[**rpme_variables_get**](RpmeApi.md#rpme_variables_get) | **GET** /Rpme/Variables | List of variables
[**rpme_xls_forms_get**](RpmeApi.md#rpme_xls_forms_get) | **GET** /Rpme/XLSForms | Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
-# **rpme_output_values_get**
-> RpmeAssessmentPagedResult rpme_output_values_get()
+# **rpme_base_data_get**
+> PagedSurveyResponsesDTO rpme_base_data_get(survey_id=survey_id, page=page, env=env)
-Processed values for each variable used in the assessments
+Get data that includes the core RPME fields only by Survey ID
[![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
@@ -23,15 +25,99 @@ Processed values for each variable used in the assessments
```python
import time
+import os
+import data_bridges_client
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
+configuration = data_bridges_client.Configuration(
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.RpmeApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Get data that includes the core RPME fields only by Survey ID
+ api_response = api_instance.rpme_base_data_get(survey_id=survey_id, page=page, env=env)
+ print("The response of RpmeApi->rpme_base_data_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling RpmeApi->rpme_base_data_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+**404** | Not Found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **rpme_full_data_get**
+> PagedSurveyResponsesDTO rpme_full_data_get(survey_id=survey_id, format=format, page=page, env=env)
+
+Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Restricted-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Official%20Use%20Only-yellow)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-fulldata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
import data_bridges_client
-from data_bridges_client.api import rpme_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -39,46 +125,128 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
+configuration.access_token = os.environ["ACCESS_TOKEN"]
+
+# Enter a context with an instance of the API client
+with data_bridges_client.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = data_bridges_client.RpmeApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
+ try:
+ # Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
+ api_response = api_instance.rpme_full_data_get(survey_id=survey_id, format=format, page=page, env=env)
+ print("The response of RpmeApi->rpme_full_data_get:\n")
+ pprint(api_response)
+ except Exception as e:
+ print("Exception when calling RpmeApi->rpme_full_data_get: %s\n" % e)
+```
+
+
+
+### Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+
+### Return type
+
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
+
+### Authorization
+
+[default](../README.md#default)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain, application/json, text/json
+
+### HTTP response details
+
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+**400** | Bad Request | - |
+**404** | Not Found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **rpme_output_values_get**
+> RpmeAssessmentPagedResult rpme_output_values_get(page=page, adm0_code=adm0_code, survey_id=survey_id, shop_id=shop_id, market_id=market_id, adm0_code_dots=adm0_code_dots, env=env)
+
+Processed values for each variable used in the assessments
+
+ [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+### Example
+
+* OAuth Authentication (default):
+
+```python
+import time
+import os
+import data_bridges_client
+from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+from data_bridges_client.rest import ApiException
+from pprint import pprint
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
+# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = rpme_api.RpmeApi(api_client)
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- adm0_code = 1 # int | Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional)
- survey_id = 1 # int | The ID of the survey (optional)
- shop_id = 1 # int | The ID of the shop (optional)
- market_id = 1 # int | The ID of the market (optional)
- adm0_code_dots = "" # str | (optional) if omitted the server will use the default value of ""
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.RpmeApi(api_client)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ adm0_code = 56 # int | Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional)
+ survey_id = 56 # int | The ID of the survey (optional)
+ shop_id = 56 # int | The ID of the shop (optional)
+ market_id = 56 # int | The ID of the market (optional)
+ adm0_code_dots = '' # str | (optional) (default to '')
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Processed values for each variable used in the assessments
api_response = api_instance.rpme_output_values_get(page=page, adm0_code=adm0_code, survey_id=survey_id, shop_id=shop_id, market_id=market_id, adm0_code_dots=adm0_code_dots, env=env)
+ print("The response of RpmeApi->rpme_output_values_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling RpmeApi->rpme_output_values_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **adm0_code** | **int**| Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional]
- **survey_id** | **int**| The ID of the survey | [optional]
- **shop_id** | **int**| The ID of the shop | [optional]
- **market_id** | **int**| The ID of the market | [optional]
- **adm0_code_dots** | **str**| | [optional] if omitted the server will use the default value of ""
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **adm0_code** | **int**| Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional]
+ **survey_id** | **int**| The ID of the survey | [optional]
+ **shop_id** | **int**| The ID of the shop | [optional]
+ **market_id** | **int**| The ID of the market | [optional]
+ **adm0_code_dots** | **str**| | [optional] [default to '']
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -91,8 +259,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -104,7 +271,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **rpme_surveys_get**
-> [PagedSurveyListDTO] rpme_surveys_get()
+> PagedSurveyListDTO rpme_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
@@ -116,15 +283,16 @@ Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS For
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import rpme_api
-from data_bridges_client.model.paged_survey_list_dto import PagedSurveyListDTO
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -132,46 +300,43 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = rpme_api.RpmeApi(api_client)
- adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.RpmeApi(api_client)
+ adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
api_response = api_instance.rpme_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
+ print("The response of RpmeApi->rpme_surveys_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling RpmeApi->rpme_surveys_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **start_date** | **datetime**| starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **start_date** | **datetime**| starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[PagedSurveyListDTO]**](PagedSurveyListDTO.md)
+[**PagedSurveyListDTO**](PagedSurveyListDTO.md)
### Authorization
@@ -180,8 +345,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -193,7 +357,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **rpme_variables_get**
-> RpmeVariablePagedResult rpme_variables_get()
+> RpmeVariablePagedResult rpme_variables_get(page=page, env=env)
List of variables
@@ -205,15 +369,16 @@ List of variables
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import rpme_api
-from data_bridges_client.model.rpme_variable_paged_result import RpmeVariablePagedResult
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -221,36 +386,33 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = rpme_api.RpmeApi(api_client)
- page = 1 # int | (optional) if omitted the server will use the default value of 1
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.RpmeApi(api_client)
+ page = 1 # int | (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# List of variables
api_response = api_instance.rpme_variables_get(page=page, env=env)
+ print("The response of RpmeApi->rpme_variables_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling RpmeApi->rpme_variables_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **page** | **int**| | [optional] if omitted the server will use the default value of 1
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **page** | **int**| | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -263,8 +425,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -276,7 +437,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **rpme_xls_forms_get**
-> [PagedXlsFormListDTO] rpme_xls_forms_get()
+> PagedXlsFormListDTO rpme_xls_forms_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
@@ -288,15 +449,16 @@ Get a complete list of XLS Forms uploaded on the RPME in a given period of data
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import rpme_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -304,46 +466,43 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = rpme_api.RpmeApi(api_client)
- adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.RpmeApi(api_client)
+ adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
api_response = api_instance.rpme_xls_forms_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
+ print("The response of RpmeApi->rpme_xls_forms_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling RpmeApi->rpme_xls_forms_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **start_date** | **datetime**| starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **start_date** | **datetime**| starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[PagedXlsFormListDTO]**](PagedXlsFormListDTO.md)
+[**PagedXlsFormListDTO**](PagedXlsFormListDTO.md)
### Authorization
@@ -354,7 +513,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/docs/RpmeAssessment.md b/docs/RpmeAssessment.md
index e77414a..357bff6 100644
--- a/docs/RpmeAssessment.md
+++ b/docs/RpmeAssessment.md
@@ -2,30 +2,47 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**survey_id** | **int** | | [optional]
+**assessment_date** | **datetime** | | [optional]
+**shop_id** | **int** | | [optional]
**adm0_code** | **int** | | [optional]
-**adm0_code_dots** | **str, none_type** | | [optional]
**adm1_code** | **int** | | [optional]
-**adm1_code_dots** | **str, none_type** | | [optional]
**adm2_code** | **int** | | [optional]
-**adm2_code_dots** | **str, none_type** | | [optional]
-**assessment_date** | **datetime** | | [optional]
-**ben_sev_cntr_dev** | **str, none_type** | | [optional]
-**beneficiaries_score_tbu** | **bool** | | [optional]
-**market_id** | **int, none_type** | | [optional]
-**nb_beneficiaries_interviewed** | **int, none_type** | | [optional]
-**output_values** | [**[RpmeOutputValues], none_type**](RpmeOutputValues.md) | | [optional]
-**price_score_tbd** | **bool** | | [optional]
+**adm0_code_dots** | **str** | | [optional]
+**adm1_code_dots** | **str** | | [optional]
+**adm2_code_dots** | **str** | | [optional]
+**market_id** | **int** | | [optional]
+**sh_latitude** | **float** | | [optional]
+**sh_longitude** | **float** | | [optional]
+**nb_beneficiaries_interviewed** | **int** | | [optional]
**price_score_tbu** | **bool** | | [optional]
-**sev_cntr_dev** | **str, none_type** | | [optional]
-**sh_latitude** | **float, none_type** | | [optional]
-**sh_longitude** | **float, none_type** | | [optional]
-**shop_id** | **int** | | [optional]
-**survey_id** | **int** | | [optional]
-**trd_name** | **str, none_type** | | [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]
+**price_score_tbd** | **bool** | | [optional]
+**beneficiaries_score_tbu** | **bool** | | [optional]
+**trd_name** | **str** | | [optional]
+**sev_cntr_dev** | **str** | | [optional]
+**ben_sev_cntr_dev** | **str** | | [optional]
+**output_values** | [**List[RpmeOutputValues]**](RpmeOutputValues.md) | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.rpme_assessment import RpmeAssessment
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RpmeAssessment from a JSON string
+rpme_assessment_instance = RpmeAssessment.from_json(json)
+# print the JSON string representation of the object
+print RpmeAssessment.to_json()
+# convert the object into a dict
+rpme_assessment_dict = rpme_assessment_instance.to_dict()
+# create an instance of RpmeAssessment from a dict
+rpme_assessment_form_dict = rpme_assessment.from_dict(rpme_assessment_dict)
+```
[[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/docs/RpmeAssessmentPagedResult.md b/docs/RpmeAssessmentPagedResult.md
index ab5a26d..1ba9f34 100644
--- a/docs/RpmeAssessmentPagedResult.md
+++ b/docs/RpmeAssessmentPagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[RpmeAssessment], none_type**](RpmeAssessment.md) | | [optional] [readonly]
-**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]
+**items** | [**List[RpmeAssessment]**](RpmeAssessment.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RpmeAssessmentPagedResult from a JSON string
+rpme_assessment_paged_result_instance = RpmeAssessmentPagedResult.from_json(json)
+# print the JSON string representation of the object
+print RpmeAssessmentPagedResult.to_json()
+# convert the object into a dict
+rpme_assessment_paged_result_dict = rpme_assessment_paged_result_instance.to_dict()
+# create an instance of RpmeAssessmentPagedResult from a dict
+rpme_assessment_paged_result_form_dict = rpme_assessment_paged_result.from_dict(rpme_assessment_paged_result_dict)
+```
[[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/docs/RpmeOutputValues.md b/docs/RpmeOutputValues.md
index 9f4d5cb..00aee27 100644
--- a/docs/RpmeOutputValues.md
+++ b/docs/RpmeOutputValues.md
@@ -2,12 +2,29 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**output_value** | **float, none_type** | | [optional]
**variable_id** | **int** | | [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]
+**output_value** | **float** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.rpme_output_values import RpmeOutputValues
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RpmeOutputValues from a JSON string
+rpme_output_values_instance = RpmeOutputValues.from_json(json)
+# print the JSON string representation of the object
+print RpmeOutputValues.to_json()
+# convert the object into a dict
+rpme_output_values_dict = rpme_output_values_instance.to_dict()
+# create an instance of RpmeOutputValues from a dict
+rpme_output_values_form_dict = rpme_output_values.from_dict(rpme_output_values_dict)
+```
[[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/docs/RpmeVariable.md b/docs/RpmeVariable.md
index 026dca0..bb5640a 100644
--- a/docs/RpmeVariable.md
+++ b/docs/RpmeVariable.md
@@ -2,19 +2,36 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**variable_id** | **int** | | [optional]
+**variable_name** | **str** | | [optional]
+**variable_description** | **str** | | [optional]
**dimension_id** | **int** | | [optional]
-**dimension_name** | **str, none_type** | | [optional]
+**dimension_name** | **str** | | [optional]
**level_id** | **int** | | [optional]
-**level_name** | **str, none_type** | | [optional]
+**level_name** | **str** | | [optional]
**survey_mode_id** | **int** | | [optional]
-**survey_mode_name** | **str, none_type** | | [optional]
-**variable_description** | **str, none_type** | | [optional]
-**variable_id** | **int** | | [optional]
-**variable_name** | **str, none_type** | | [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]
+**survey_mode_name** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.rpme_variable import RpmeVariable
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RpmeVariable from a JSON string
+rpme_variable_instance = RpmeVariable.from_json(json)
+# print the JSON string representation of the object
+print RpmeVariable.to_json()
+# convert the object into a dict
+rpme_variable_dict = rpme_variable_instance.to_dict()
+# create an instance of RpmeVariable from a dict
+rpme_variable_form_dict = rpme_variable.from_dict(rpme_variable_dict)
+```
[[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/docs/RpmeVariablePagedResult.md b/docs/RpmeVariablePagedResult.md
index 953a4e5..2ea6d2c 100644
--- a/docs/RpmeVariablePagedResult.md
+++ b/docs/RpmeVariablePagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[RpmeVariable], none_type**](RpmeVariable.md) | | [optional] [readonly]
-**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]
+**items** | [**List[RpmeVariable]**](RpmeVariable.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of RpmeVariablePagedResult from a JSON string
+rpme_variable_paged_result_instance = RpmeVariablePagedResult.from_json(json)
+# print the JSON string representation of the object
+print RpmeVariablePagedResult.to_json()
+# convert the object into a dict
+rpme_variable_paged_result_dict = rpme_variable_paged_result_instance.to_dict()
+# create an instance of RpmeVariablePagedResult from a dict
+rpme_variable_paged_result_form_dict = rpme_variable_paged_result.from_dict(rpme_variable_paged_result_dict)
+```
[[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/docs/SurveyDetailsDTO.md b/docs/SurveyDetailsDTO.md
deleted file mode 100644
index d0a3918..0000000
--- a/docs/SurveyDetailsDTO.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# SurveyDetailsDTO
-
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**result** | **bool, date, datetime, dict, float, int, list, str, none_type** | The list of responses in the survey | [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/docs/SurveyListDTO.md b/docs/SurveyListDTO.md
index e2752e4..2dfbfb1 100644
--- a/docs/SurveyListDTO.md
+++ b/docs/SurveyListDTO.md
@@ -2,25 +2,42 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**adm0_code** | **int** | The internal code of the country where the survey has taken place | [optional]
-**base_data** | **str, none_type** | The link to the JSON data reshaped on the base XLSForm | [optional]
-**base_xls_form_name** | **str, none_type** | The name of the base XLSForm used to build the XLSForm | [optional]
-**country_name** | **str, none_type** | The name of the country where the survey has taken place | [optional]
-**iso3_alpha3** | **str, none_type** | The ISO3 alpha code of the country where the survey has taken place | [optional]
-**original_csv_file** | **str, none_type** | The link to download the original CSV file | [optional]
-**survey_create_date** | **datetime** | The date when the survey has been uploaded in the Data Bridges platform | [optional]
-**survey_end_date** | **datetime, none_type** | The date when the survey has ended | [optional]
**survey_id** | **int** | The Id of the Survey | [optional]
-**survey_original_filename** | **str, none_type** | The filename of the survey CSV file | [optional]
-**survey_start_date** | **datetime, none_type** | The date when the survey has started | [optional]
**survey_status_id** | **int** | The Id of the Survey status | [optional]
-**survey_validation_report** | **str, none_type** | The detailed report on the validation performed on the survey schema | [optional]
-**user_name** | **str, none_type** | The name of the user that has uploaded the survey data | [optional]
-**xls_form_name** | **str, none_type** | The name of the XLSForm used to collect data | [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]
+**survey_start_date** | **datetime** | The date when the survey has started | [optional]
+**survey_end_date** | **datetime** | The date when the survey has ended | [optional]
+**survey_create_date** | **datetime** | The date when the survey has been uploaded in the Data Bridges platform | [optional]
+**survey_validation_report** | **str** | The detailed report on the validation performed on the survey schema | [optional]
+**survey_original_filename** | **str** | The filename of the survey CSV file | [optional]
+**xls_form_name** | **str** | The name of the XLSForm used to collect data | [optional]
+**base_xls_form_name** | **str** | The name of the base XLSForm used to build the XLSForm | [optional]
+**country_name** | **str** | The name of the country where the survey has taken place | [optional]
+**adm0_code** | **int** | The internal code of the country where the survey has taken place | [optional]
+**iso3_alpha3** | **str** | The ISO3 alpha code of the country where the survey has taken place | [optional]
+**user_name** | **str** | The name of the user that has uploaded the survey data | [optional]
+**original_csv_file** | **str** | The link to download the original CSV file | [optional]
+**base_data** | **str** | The link to the JSON data reshaped on the base XLSForm | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.survey_list_dto import SurveyListDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of SurveyListDTO from a JSON string
+survey_list_dto_instance = SurveyListDTO.from_json(json)
+# print the JSON string representation of the object
+print SurveyListDTO.to_json()
+# convert the object into a dict
+survey_list_dto_dict = survey_list_dto_instance.to_dict()
+# create an instance of SurveyListDTO from a dict
+survey_list_dto_form_dict = survey_list_dto.from_dict(survey_list_dto_dict)
+```
[[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/docs/SurveysApi.md b/docs/SurveysApi.md
index 273c7b7..392d805 100644
--- a/docs/SurveysApi.md
+++ b/docs/SurveysApi.md
@@ -1,17 +1,17 @@
# data_bridges_client.SurveysApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**m_fi_surveys_base_data_get**](SurveysApi.md#m_fi_surveys_base_data_get) | **GET** /MFI/Surveys/BaseData | Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
[**m_fi_surveys_full_data_get**](SurveysApi.md#m_fi_surveys_full_data_get) | **GET** /MFI/Surveys/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
-[**m_fi_surveys_get**](SurveysApi.md#m_fi_surveys_get) | **GET** /MFI/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
-[**m_fi_surveys_processed_data_get**](SurveysApi.md#m_fi_surveys_processed_data_get) | **GET** /MFI/Surveys/ProcessedData | Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+[**m_fi_surveys_get**](SurveysApi.md#m_fi_surveys_get) | **GET** /MFI/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
+[**m_fi_surveys_processed_data_get**](SurveysApi.md#m_fi_surveys_processed_data_get) | **GET** /MFI/Surveys/ProcessedData | Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
# **m_fi_surveys_base_data_get**
-> SurveyDetailsDTO m_fi_surveys_base_data_get()
+> PagedSurveyResponsesDTO m_fi_surveys_base_data_get(survey_id=survey_id, page=page, env=env)
Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
@@ -23,16 +23,16 @@ Get data that includes the core Market Functionality Index (MFI) fields only by
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import surveys_api
-from data_bridges_client.model.survey_details_dto import SurveyDetailsDTO
-from data_bridges_client.model.problem_details import ProblemDetails
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -40,42 +40,39 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = surveys_api.SurveysApi(api_client)
- survey_id = 1 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.SurveysApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
api_response = api_instance.m_fi_surveys_base_data_get(survey_id=survey_id, page=page, env=env)
+ print("The response of SurveysApi->m_fi_surveys_base_data_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling SurveysApi->m_fi_surveys_base_data_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**SurveyDetailsDTO**](SurveyDetailsDTO.md)
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
### Authorization
@@ -84,8 +81,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -98,7 +94,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **m_fi_surveys_full_data_get**
-> SurveyDetailsDTO m_fi_surveys_full_data_get()
+> PagedSurveyResponsesDTO m_fi_surveys_full_data_get(survey_id=survey_id, format=format, page=page, env=env)
Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
@@ -110,16 +106,16 @@ Get a full dataset that includes all the fields included in the survey in additi
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import surveys_api
-from data_bridges_client.model.survey_details_dto import SurveyDetailsDTO
-from data_bridges_client.model.problem_details import ProblemDetails
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -127,44 +123,41 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = surveys_api.SurveysApi(api_client)
- survey_id = 1 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.SurveysApi(api_client)
+ survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
api_response = api_instance.m_fi_surveys_full_data_get(survey_id=survey_id, format=format, page=page, env=env)
+ print("The response of SurveysApi->m_fi_surveys_full_data_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling SurveysApi->m_fi_surveys_full_data_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**SurveyDetailsDTO**](SurveyDetailsDTO.md)
+[**PagedSurveyResponsesDTO**](PagedSurveyResponsesDTO.md)
### Authorization
@@ -173,8 +166,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
@@ -187,9 +179,9 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **m_fi_surveys_get**
-> [PagedSurveyListDTO] m_fi_surveys_get()
+> PagedSurveyListDTO m_fi_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
-Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
[![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
@@ -199,15 +191,16 @@ Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS For
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import surveys_api
-from data_bridges_client.model.paged_survey_list_dto import PagedSurveyListDTO
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -215,46 +208,43 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = surveys_api.SurveysApi(api_client)
- adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.SurveysApi(api_client)
+ adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
- # Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+ # Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
api_response = api_instance.m_fi_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
+ print("The response of SurveysApi->m_fi_surveys_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling SurveysApi->m_fi_surveys_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **start_date** | **datetime**| starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **start_date** | **datetime**| starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[PagedSurveyListDTO]**](PagedSurveyListDTO.md)
+[**PagedSurveyListDTO**](PagedSurveyListDTO.md)
### Authorization
@@ -265,7 +255,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -276,9 +265,9 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **m_fi_surveys_processed_data_get**
-> PagedProcessedDataDTO m_fi_surveys_processed_data_get()
+> PagedProcessedDataDTO m_fi_surveys_processed_data_get(survey_id=survey_id, page=page, format=format, start_date=start_date, end_date=end_date, adm0_codes=adm0_codes, market_id=market_id, survey_type=survey_type, env=env)
-Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
[![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
@@ -288,15 +277,16 @@ Get a MFI processed data in long format; levels indicate the data aggregation le
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import surveys_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_processed_data_dto import PagedProcessedDataDTO
+from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -304,50 +294,47 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = surveys_api.SurveysApi(api_client)
- survey_id = 1 # int | The ID of the survey (optional)
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- format = "json" # str | Output format: [JSON|CSV] Json is the default value (optional) if omitted the server will use the default value of "json"
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- adm0_codes = "adm0Codes_example" # str | Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional)
- market_id = 1 # int | The ID of the market (optional)
- survey_type = "surveyType_example" # str | The survey type (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.SurveysApi(api_client)
+ survey_id = 56 # int | The ID of the survey (optional)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json')
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ adm0_codes = 'adm0_codes_example' # str | Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional)
+ market_id = 56 # int | The ID of the market (optional)
+ survey_type = 'survey_type_example' # str | The survey type (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
- # Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
+ # Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
api_response = api_instance.m_fi_surveys_processed_data_get(survey_id=survey_id, page=page, format=format, start_date=start_date, end_date=end_date, adm0_codes=adm0_codes, market_id=market_id, survey_type=survey_type, env=env)
+ print("The response of SurveysApi->m_fi_surveys_processed_data_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling SurveysApi->m_fi_surveys_processed_data_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **survey_id** | **int**| The ID of the survey | [optional]
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] if omitted the server will use the default value of "json"
- **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **adm0_codes** | **str**| Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional]
- **market_id** | **int**| The ID of the market | [optional]
- **survey_type** | **str**| The survey type | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **survey_id** | **int**| The ID of the survey | [optional]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json']
+ **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **adm0_codes** | **str**| Code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional]
+ **market_id** | **int**| The ID of the market | [optional]
+ **survey_type** | **str**| The survey type | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
@@ -360,8 +347,7 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: application/json, text/json, text/plain
-
+ - **Accept**: text/plain, application/json, text/json
### HTTP response details
diff --git a/docs/UsdIndirectQuotation.md b/docs/UsdIndirectQuotation.md
index 43c4ca6..4572246 100644
--- a/docs/UsdIndirectQuotation.md
+++ b/docs/UsdIndirectQuotation.md
@@ -2,18 +2,35 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**adm0_code** | **int** | | [optional]
-**country_iso3** | **str, none_type** | | [optional]
-**date** | **datetime** | | [optional]
-**frequency** | **str, none_type** | (it’s from the reporting commodity named Exchange Rate | [optional]
**id** | **int** | | [optional]
+**name** | **str** | the ISO3 code for the currency, based on ISO4217 | [optional]
+**adm0_code** | **int** | | [optional]
+**country_iso3** | **str** | | [optional]
**is_official** | **bool** | The field IsOfficial is a boolean which can be set to true for the Trading Economics data and to false for the data coming from a commodity saved in the DataBridges database | [optional]
-**name** | **str, none_type** | the ISO3 code for the currency, based on ISO4217 | [optional]
-**value** | **float, none_type** | | [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]
+**frequency** | **str** | (it’s from the reporting commodity named Exchange Rate | [optional]
+**value** | **float** | | [optional]
+**var_date** | **datetime** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UsdIndirectQuotation from a JSON string
+usd_indirect_quotation_instance = UsdIndirectQuotation.from_json(json)
+# print the JSON string representation of the object
+print UsdIndirectQuotation.to_json()
+# convert the object into a dict
+usd_indirect_quotation_dict = usd_indirect_quotation_instance.to_dict()
+# create an instance of UsdIndirectQuotation from a dict
+usd_indirect_quotation_form_dict = usd_indirect_quotation.from_dict(usd_indirect_quotation_dict)
+```
[[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/docs/UsdIndirectQuotationPagedResult.md b/docs/UsdIndirectQuotationPagedResult.md
index 62e6686..c3cd32d 100644
--- a/docs/UsdIndirectQuotationPagedResult.md
+++ b/docs/UsdIndirectQuotationPagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[UsdIndirectQuotation], none_type**](UsdIndirectQuotation.md) | | [optional] [readonly]
-**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]
+**items** | [**List[UsdIndirectQuotation]**](UsdIndirectQuotation.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of UsdIndirectQuotationPagedResult from a JSON string
+usd_indirect_quotation_paged_result_instance = UsdIndirectQuotationPagedResult.from_json(json)
+# print the JSON string representation of the object
+print UsdIndirectQuotationPagedResult.to_json()
+# convert the object into a dict
+usd_indirect_quotation_paged_result_dict = usd_indirect_quotation_paged_result_instance.to_dict()
+# create an instance of UsdIndirectQuotationPagedResult from a dict
+usd_indirect_quotation_paged_result_form_dict = usd_indirect_quotation_paged_result.from_dict(usd_indirect_quotation_paged_result_dict)
+```
[[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/docs/ViewExtendedAggregatedPrice.md b/docs/ViewExtendedAggregatedPrice.md
index e695045..f98c59d 100644
--- a/docs/ViewExtendedAggregatedPrice.md
+++ b/docs/ViewExtendedAggregatedPrice.md
@@ -2,32 +2,49 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**adm0_code** | **int, none_type** | | [optional]
-**commodity_date_month** | **int, none_type** | | [optional]
-**commodity_date_week** | **int, none_type** | | [optional]
-**commodity_date_year** | **int, none_type** | | [optional]
**commodity_id** | **int** | | [optional]
-**commodity_name** | **str, none_type** | | [optional]
-**commodity_price** | **float, none_type** | | [optional]
-**commodity_price_date** | **datetime, none_type** | | [optional]
-**commodity_price_flag** | **str, none_type** | | [optional]
-**commodity_price_observations** | **int, none_type** | | [optional]
-**commodity_price_source_name** | **str, none_type** | | [optional]
-**commodity_unit_id** | **int** | | [optional]
-**commodity_unit_name** | **str, none_type** | | [optional]
-**country_iso3** | **str, none_type** | | [optional]
-**country_name** | **str, none_type** | | [optional]
-**currency_id** | **int** | | [optional]
-**currency_name** | **str, none_type** | | [optional]
**market_id** | **int** | | [optional]
-**market_name** | **str, none_type** | | [optional]
-**original_frequency** | **str, none_type** | | [optional]
**price_type_id** | **int** | | [optional]
-**price_type_name** | **str, none_type** | | [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]
+**commodity_unit_id** | **int** | | [optional]
+**currency_id** | **int** | | [optional]
+**adm0_code** | **int** | | [optional]
+**commodity_date_week** | **int** | | [optional]
+**commodity_date_month** | **int** | | [optional]
+**commodity_date_year** | **int** | | [optional]
+**commodity_price_date** | **datetime** | | [optional]
+**commodity_name** | **str** | | [optional]
+**market_name** | **str** | | [optional]
+**price_type_name** | **str** | | [optional]
+**commodity_unit_name** | **str** | | [optional]
+**currency_name** | **str** | | [optional]
+**country_iso3** | **str** | | [optional]
+**country_name** | **str** | | [optional]
+**commodity_price_source_name** | **str** | | [optional]
+**original_frequency** | **str** | | [optional]
+**commodity_price** | **float** | | [optional]
+**commodity_price_observations** | **int** | | [optional]
+**commodity_price_flag** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ViewExtendedAggregatedPrice from a JSON string
+view_extended_aggregated_price_instance = ViewExtendedAggregatedPrice.from_json(json)
+# print the JSON string representation of the object
+print ViewExtendedAggregatedPrice.to_json()
+# convert the object into a dict
+view_extended_aggregated_price_dict = view_extended_aggregated_price_instance.to_dict()
+# create an instance of ViewExtendedAggregatedPrice from a dict
+view_extended_aggregated_price_form_dict = view_extended_aggregated_price.from_dict(view_extended_aggregated_price_dict)
+```
[[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/docs/ViewExtendedAggregatedPricePagedResult.md b/docs/ViewExtendedAggregatedPricePagedResult.md
index 868193b..2bdd8fc 100644
--- a/docs/ViewExtendedAggregatedPricePagedResult.md
+++ b/docs/ViewExtendedAggregatedPricePagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[ViewExtendedAggregatedPrice], none_type**](ViewExtendedAggregatedPrice.md) | | [optional] [readonly]
-**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]
+**items** | [**List[ViewExtendedAggregatedPrice]**](ViewExtendedAggregatedPrice.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ViewExtendedAggregatedPricePagedResult from a JSON string
+view_extended_aggregated_price_paged_result_instance = ViewExtendedAggregatedPricePagedResult.from_json(json)
+# print the JSON string representation of the object
+print ViewExtendedAggregatedPricePagedResult.to_json()
+# convert the object into a dict
+view_extended_aggregated_price_paged_result_dict = view_extended_aggregated_price_paged_result_instance.to_dict()
+# create an instance of ViewExtendedAggregatedPricePagedResult from a dict
+view_extended_aggregated_price_paged_result_form_dict = view_extended_aggregated_price_paged_result.from_dict(view_extended_aggregated_price_paged_result_dict)
+```
[[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/docs/ViewExtendedAlpsValue.md b/docs/ViewExtendedAlpsValue.md
index 55a0591..b9f8eda 100644
--- a/docs/ViewExtendedAlpsValue.md
+++ b/docs/ViewExtendedAlpsValue.md
@@ -2,29 +2,46 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**adm0_code** | **int, none_type** | | [optional]
-**analysis_value_estimated_price** | **float** | | [optional]
-**analysis_value_pewi_value** | **float** | | [optional]
-**analysis_value_price_flag** | **str, none_type** | | [optional]
**commodity_id** | **int** | | [optional]
-**commodity_name** | **str, none_type** | | [optional]
-**commodity_price_date** | **datetime, none_type** | | [optional]
-**commodity_price_date_month** | **int, none_type** | | [optional]
-**commodity_price_date_week** | **int, none_type** | | [optional]
-**commodity_price_date_year** | **int** | | [optional]
-**commodity_unit_id** | **int** | | [optional]
-**commodity_unit_name** | **str, none_type** | | [optional]
-**country_name** | **str, none_type** | | [optional]
-**currency_id** | **int** | | [optional]
-**currency_name** | **str, none_type** | | [optional]
**market_id** | **int** | | [optional]
-**market_name** | **str, none_type** | | [optional]
**price_type_id** | **int** | | [optional]
-**price_type_name** | **str, none_type** | | [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]
+**commodity_unit_id** | **int** | | [optional]
+**currency_id** | **int** | | [optional]
+**adm0_code** | **int** | | [optional]
+**country_name** | **str** | | [optional]
+**commodity_price_date_year** | **int** | | [optional]
+**commodity_price_date_month** | **int** | | [optional]
+**commodity_price_date_week** | **int** | | [optional]
+**commodity_price_date** | **datetime** | | [optional]
+**commodity_name** | **str** | | [optional]
+**market_name** | **str** | | [optional]
+**price_type_name** | **str** | | [optional]
+**commodity_unit_name** | **str** | | [optional]
+**currency_name** | **str** | | [optional]
+**analysis_value_estimated_price** | **float** | | [optional]
+**analysis_value_pewi_value** | **float** | | [optional]
+**analysis_value_price_flag** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ViewExtendedAlpsValue from a JSON string
+view_extended_alps_value_instance = ViewExtendedAlpsValue.from_json(json)
+# print the JSON string representation of the object
+print ViewExtendedAlpsValue.to_json()
+# convert the object into a dict
+view_extended_alps_value_dict = view_extended_alps_value_instance.to_dict()
+# create an instance of ViewExtendedAlpsValue from a dict
+view_extended_alps_value_form_dict = view_extended_alps_value.from_dict(view_extended_alps_value_dict)
+```
[[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/docs/ViewExtendedAlpsValuePagedResult.md b/docs/ViewExtendedAlpsValuePagedResult.md
index 1033fc9..f9d95a7 100644
--- a/docs/ViewExtendedAlpsValuePagedResult.md
+++ b/docs/ViewExtendedAlpsValuePagedResult.md
@@ -2,11 +2,30 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**items** | [**[ViewExtendedAlpsValue], none_type**](ViewExtendedAlpsValue.md) | | [optional] [readonly]
-**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]
+**items** | [**List[ViewExtendedAlpsValue]**](ViewExtendedAlpsValue.md) | | [optional] [readonly]
+**page** | **int** | | [optional]
+**total_items** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of ViewExtendedAlpsValuePagedResult from a JSON string
+view_extended_alps_value_paged_result_instance = ViewExtendedAlpsValuePagedResult.from_json(json)
+# print the JSON string representation of the object
+print ViewExtendedAlpsValuePagedResult.to_json()
+# convert the object into a dict
+view_extended_alps_value_paged_result_dict = view_extended_alps_value_paged_result_instance.to_dict()
+# create an instance of ViewExtendedAlpsValuePagedResult from a dict
+view_extended_alps_value_paged_result_form_dict = view_extended_alps_value_paged_result.from_dict(view_extended_alps_value_paged_result_dict)
+```
[[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/docs/WeeklyAggregatedPrice.md b/docs/WeeklyAggregatedPrice.md
index 220f4c0..73045a3 100644
--- a/docs/WeeklyAggregatedPrice.md
+++ b/docs/WeeklyAggregatedPrice.md
@@ -2,31 +2,48 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**commodity_id** | **int** | | [optional]
+**market_id** | **int** | | [optional]
+**price_type_id** | **int** | | [optional]
+**commodity_unit_id** | **int** | | [optional]
+**currency_id** | **int** | | [optional]
+**commodity_name** | **str** | | [optional]
+**market_name** | **str** | | [optional]
+**price_type_name** | **str** | | [optional]
+**commodity_unit_name** | **str** | | [optional]
+**currency_name** | **str** | | [optional]
**adm0_code** | **int** | | [optional]
+**country_iso3** | **str** | | [optional]
+**country_name** | **str** | | [optional]
+**commodity_price** | **float** | | [optional]
+**original_frequency** | **str** | | [optional]
+**commodity_price_source_name** | **str** | | [optional]
+**commodity_price_observations** | **int** | | [optional]
**commodity_date_month** | **int** | | [optional]
**commodity_date_year** | **int** | | [optional]
-**commodity_id** | **int** | | [optional]
-**commodity_name** | **str, none_type** | | [optional]
-**commodity_price** | **float** | | [optional]
**commodity_price_date** | **datetime** | | [optional]
-**commodity_price_flag** | **str, none_type** | | [optional]
-**commodity_price_observations** | **int, none_type** | | [optional]
-**commodity_price_source_name** | **str, none_type** | | [optional]
-**commodity_unit_id** | **int** | | [optional]
-**commodity_unit_name** | **str, none_type** | | [optional]
-**country_iso3** | **str, none_type** | | [optional]
-**country_name** | **str, none_type** | | [optional]
-**currency_id** | **int** | | [optional]
-**currency_name** | **str, none_type** | | [optional]
-**market_id** | **int** | | [optional]
-**market_name** | **str, none_type** | | [optional]
-**original_frequency** | **str, none_type** | | [optional]
-**price_type_id** | **int** | | [optional]
-**price_type_name** | **str, none_type** | | [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]
+**commodity_price_flag** | **str** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of WeeklyAggregatedPrice from a JSON string
+weekly_aggregated_price_instance = WeeklyAggregatedPrice.from_json(json)
+# print the JSON string representation of the object
+print WeeklyAggregatedPrice.to_json()
+# convert the object into a dict
+weekly_aggregated_price_dict = weekly_aggregated_price_instance.to_dict()
+# create an instance of WeeklyAggregatedPrice from a dict
+weekly_aggregated_price_form_dict = weekly_aggregated_price.from_dict(weekly_aggregated_price_dict)
+```
[[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/docs/XlsFormDTO.md b/docs/XlsFormDTO.md
index 736d063..e4805d9 100644
--- a/docs/XlsFormDTO.md
+++ b/docs/XlsFormDTO.md
@@ -2,17 +2,34 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**adm0_code** | **int, none_type** | | [optional]
-**user_name** | **str, none_type** | | [optional]
-**xls_form_create_date** | **datetime** | | [optional]
**xls_form_id** | **int** | | [optional]
+**xls_form_name** | **str** | | [optional]
+**xls_form_create_date** | **datetime** | | [optional]
+**user_name** | **str** | | [optional]
+**xls_form_source_file** | **str** | | [optional]
**xls_form_is_base_schema** | **bool** | | [optional]
-**xls_form_name** | **str, none_type** | | [optional]
-**xls_form_source_file** | **str, none_type** | | [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]
+**adm0_code** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.xls_form_dto import XlsFormDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of XlsFormDTO from a JSON string
+xls_form_dto_instance = XlsFormDTO.from_json(json)
+# print the JSON string representation of the object
+print XlsFormDTO.to_json()
+# convert the object into a dict
+xls_form_dto_dict = xls_form_dto_instance.to_dict()
+# create an instance of XlsFormDTO from a dict
+xls_form_dto_form_dict = xls_form_dto.from_dict(xls_form_dto_dict)
+```
[[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/docs/XlsFormDefinitionDTO.md b/docs/XlsFormDefinitionDTO.md
index f84b80c..42650a3 100644
--- a/docs/XlsFormDefinitionDTO.md
+++ b/docs/XlsFormDefinitionDTO.md
@@ -2,15 +2,32 @@
## Properties
+
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**xls_form_field_label** | **str, none_type** | | [optional]
-**xls_form_field_name** | **str, none_type** | | [optional]
+**xls_form_field_name** | **str** | | [optional]
+**xls_form_field_label** | **str** | | [optional]
**xls_form_field_row** | **int** | | [optional]
-**xls_form_field_type** | **str, none_type** | | [optional]
-**xls_form_list_id** | **int, none_type** | | [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]
+**xls_form_field_type** | **str** | | [optional]
+**xls_form_list_id** | **int** | | [optional]
+
+## Example
+
+```python
+from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
+
+# TODO update the JSON string below
+json = "{}"
+# create an instance of XlsFormDefinitionDTO from a JSON string
+xls_form_definition_dto_instance = XlsFormDefinitionDTO.from_json(json)
+# print the JSON string representation of the object
+print XlsFormDefinitionDTO.to_json()
+# convert the object into a dict
+xls_form_definition_dto_dict = xls_form_definition_dto_instance.to_dict()
+# create an instance of XlsFormDefinitionDTO from a dict
+xls_form_definition_dto_form_dict = xls_form_definition_dto.from_dict(xls_form_definition_dto_dict)
+```
[[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/docs/XlsFormsApi.md b/docs/XlsFormsApi.md
index b7ffdd2..4b703f4 100644
--- a/docs/XlsFormsApi.md
+++ b/docs/XlsFormsApi.md
@@ -1,6 +1,6 @@
# data_bridges_client.XlsFormsApi
-All URIs are relative to *https://api.wfp.org/vam-data-bridges/1.3.1*
+All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0*
Method | HTTP request | Description
------------- | ------------- | -------------
@@ -9,7 +9,7 @@ Method | HTTP request | Description
# **m_fi_xls_forms_definition_get**
-> [XlsFormDefinitionDTO] m_fi_xls_forms_definition_get()
+> List[XlsFormDefinitionDTO] m_fi_xls_forms_definition_get(xls_form_id=xls_form_id, env=env)
Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
@@ -21,15 +21,16 @@ Get a complete set of XLS Form definitions of a given XLS Form ID. This is the d
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import xls_forms_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.xls_form_definition_dto import XlsFormDefinitionDTO
+from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -37,40 +38,37 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = xls_forms_api.XlsFormsApi(api_client)
- xls_form_id = 1 # int | unique identifier for the XLS Form, as retrieved from /XLSForms (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+ api_instance = data_bridges_client.XlsFormsApi(api_client)
+ xls_form_id = 56 # int | unique identifier for the XLS Form, as retrieved from /XLSForms (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
- # example passing only required values which don't have defaults set
- # and optional values
try:
# Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
api_response = api_instance.m_fi_xls_forms_definition_get(xls_form_id=xls_form_id, env=env)
+ print("The response of XlsFormsApi->m_fi_xls_forms_definition_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling XlsFormsApi->m_fi_xls_forms_definition_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **xls_form_id** | **int**| unique identifier for the XLS Form, as retrieved from /XLSForms | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **xls_form_id** | **int**| unique identifier for the XLS Form, as retrieved from /XLSForms | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[XlsFormDefinitionDTO]**](XlsFormDefinitionDTO.md)
+[**List[XlsFormDefinitionDTO]**](XlsFormDefinitionDTO.md)
### Authorization
@@ -81,7 +79,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
@@ -92,7 +89,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **m_fi_xls_forms_get**
-> [PagedXlsFormListDTO] m_fi_xls_forms_get()
+> PagedXlsFormListDTO m_fi_xls_forms_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
@@ -104,15 +101,16 @@ Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given peri
```python
import time
+import os
import data_bridges_client
-from data_bridges_client.api import xls_forms_api
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
-from data_bridges_client.model.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
+from data_bridges_client.rest import ApiException
from pprint import pprint
-# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.3.1
+
+# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0
# See configuration.py for a list of all supported configuration parameters.
configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
+ host = "https://api.wfp.org/vam-data-bridges/2.0.0"
)
# The client must configure the authentication and authorization parameters
@@ -120,46 +118,43 @@ configuration = data_bridges_client.Configuration(
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
-# Configure OAuth2 access token for authorization: default
-configuration = data_bridges_client.Configuration(
- host = "https://api.wfp.org/vam-data-bridges/1.3.1"
-)
-configuration.access_token = 'YOUR_ACCESS_TOKEN'
+configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with data_bridges_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
- api_instance = xls_forms_api.XlsFormsApi(api_client)
- adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) if omitted the server will use the default value of 0
- page = 1 # int | page number for paged results (optional) if omitted the server will use the default value of 1
- start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
- env = "prod" # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
-
- # example passing only required values which don't have defaults set
- # and optional values
+ api_instance = data_bridges_client.XlsFormsApi(api_client)
+ adm0_code = 0 # int | code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion (optional) (default to 0)
+ page = 1 # int | page number for paged results (optional) (default to 1)
+ start_date = '2013-10-20T19:20:30+01:00' # datetime | starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ end_date = '2013-10-20T19:20:30+01:00' # datetime | ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional)
+ env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional)
+
try:
# Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
api_response = api_instance.m_fi_xls_forms_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env)
+ print("The response of XlsFormsApi->m_fi_xls_forms_get:\n")
pprint(api_response)
- except data_bridges_client.ApiException as e:
+ except Exception as e:
print("Exception when calling XlsFormsApi->m_fi_xls_forms_get: %s\n" % e)
```
+
### Parameters
+
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
- **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] if omitted the server will use the default value of 0
- **page** | **int**| page number for paged results | [optional] if omitted the server will use the default value of 1
- **start_date** | **datetime**| starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **end_date** | **datetime**| ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
- **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
+ **adm0_code** | **int**| code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion | [optional] [default to 0]
+ **page** | **int**| page number for paged results | [optional] [default to 1]
+ **start_date** | **datetime**| starting date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **end_date** | **datetime**| ending date for the range in which data using this XLSForm was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional]
+ **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional]
### Return type
-[**[PagedXlsFormListDTO]**](PagedXlsFormListDTO.md)
+[**PagedXlsFormListDTO**](PagedXlsFormListDTO.md)
### Authorization
@@ -170,7 +165,6 @@ Name | Type | Description | Notes
- **Content-Type**: Not defined
- **Accept**: application/json
-
### HTTP response details
| Status code | Description | Response headers |
diff --git a/generate/README.md b/generate/README.md
deleted file mode 100644
index f73c127..0000000
--- a/generate/README.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Generating a new client
-
-Every time
-
-
-1. Create a new branch `git checkout -b new_branch_name`
-2. Install openapi-generator
-
-```$npm install @openapitools/openapi-generator-cli -g```
-
-2. Place the latest swagger.json in `./generate/swagger.json`
-
-3. Generate the client by running this command from the root of the repository. We pin the version to 5.4.0 as python templates from more recent versions don't seem to work.
-```
-openapi-generator-cli version-manager set 5.4.0
-openapi-generator-cli generate -g python -i generate/swagger.json -o . --package-name data_bridges_client --git-user-id WFP-VAM --git-repo-id DataBridgesAPI
-```
-4. Manually revert changes to `setup.py` and `README.md`. These relate to additional functionality we developed to handle the WFP token refresh workflow.
-5. Commit, push and open a PR into `main` for review.
\ No newline at end of file
diff --git a/generate/generate.sh b/generate/generate.sh
deleted file mode 100644
index 1e2cb26..0000000
--- a/generate/generate.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-openapi-generator-cli version-manager set 5.4.0
-openapi-generator-cli generate -g python -i generate/swagger.json -o . --package-name data_bridges_client --git-user-id WFP-VAM --git-repo-id DataBridgesAPI
\ No newline at end of file
diff --git a/generate/install.sh b/generate/install.sh
deleted file mode 100644
index 2d2baf5..0000000
--- a/generate/install.sh
+++ /dev/null
@@ -1 +0,0 @@
-npm install @openapitools/openapi-generator-cli -g
\ No newline at end of file
diff --git a/git_push.sh b/git_push.sh
new file mode 100644
index 0000000..f53a75d
--- /dev/null
+++ b/git_push.sh
@@ -0,0 +1,57 @@
+#!/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-petstore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new 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
+ fi
+
+fi
+
+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'
diff --git a/openapitools.json b/openapitools.json
deleted file mode 100644
index 9cbc6d5..0000000
--- a/openapitools.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
- "spaces": 2,
- "generator-cli": {
- "version": "5.4.0"
- }
-}
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..af23694
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,30 @@
+[tool.poetry]
+name = "data_bridges_client"
+version = "1.0.0"
+description = "VAM-Data-Bridges"
+authors = ["VAM-INFO "]
+license = "NoLicense"
+readme = "README.md"
+repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
+keywords = ["OpenAPI", "OpenAPI-Generator", "VAM-Data-Bridges"]
+include = ["data_bridges_client/py.typed"]
+
+[tool.poetry.dependencies]
+python = "^3.7"
+
+urllib3 = ">= 1.25.3"
+python-dateutil = ">=2.8.2"
+pydantic = ">=2"
+typing-extensions = ">=4.7.1"
+
+[tool.poetry.dev-dependencies]
+pytest = ">=7.2.1"
+tox = ">=3.9.0"
+flake8 = ">=4.0.0"
+
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
+
+[tool.pylint.'MESSAGES CONTROL']
+extension-pkg-whitelist = "pydantic"
diff --git a/requirements.txt b/requirements.txt
index 96947f6..cc85509 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,5 @@
python_dateutil >= 2.5.3
setuptools >= 21.0.0
-urllib3 >= 1.25.3
+urllib3 >= 1.25.3, < 2.1.0
+pydantic >= 2
+typing-extensions >= 4.7.1
diff --git a/setup.py b/setup.py
index 3c101a3..f1ce016 100644
--- a/setup.py
+++ b/setup.py
@@ -1,29 +1,34 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
from setuptools import setup, find_packages # noqa: H301
-NAME = "data-bridges-client"
-VERSION = "1.0.0"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
-
+NAME = "data-bridges-client"
+VERSION = "1.0.0"
+PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
- "urllib3 >= 1.25.3",
+ "urllib3 >= 1.25.3, < 2.1.0",
"python-dateutil",
- "httpx"
+ "pydantic >= 2",
+ "typing-extensions >= 4.7.1",
]
setup(
@@ -34,11 +39,12 @@
author_email="wfp.economicanalysis@wfp.org",
url="",
keywords=["OpenAPI", "OpenAPI-Generator", "VAM-Data-Bridges"],
- python_requires=">=3.6",
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
+ long_description_content_type='text/markdown',
long_description="""\
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
- """
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+ """, # noqa: E501
+ package_data={"data_bridges_client": ["py.typed"]},
)
diff --git a/test-requirements.txt b/test-requirements.txt
index bb4f22b..3a0d0b9 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1 +1,3 @@
+pytest~=7.1.3
pytest-cov>=2.8.1
+pytest-randomly>=3.12.0
diff --git a/test/test_bad_request_dto.py b/test/test_bad_request_dto.py
index 5482bc5..d7f5dc2 100644
--- a/test/test_bad_request_dto.py
+++ b/test/test_bad_request_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.bad_request_dto import BadRequestDTO
+import unittest
+import datetime
+from data_bridges_client.models.bad_request_dto import BadRequestDTO
class TestBadRequestDTO(unittest.TestCase):
"""BadRequestDTO unit test stubs"""
@@ -25,12 +27,27 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> BadRequestDTO:
+ """Test BadRequestDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `BadRequestDTO`
+ """
+ model = BadRequestDTO()
+ if include_optional:
+ return BadRequestDTO(
+ error = ''
+ )
+ else:
+ return BadRequestDTO(
+ )
+ """
+
def testBadRequestDTO(self):
"""Test BadRequestDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = BadRequestDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_commodities_api.py b/test/test_commodities_api.py
index 1ec7350..f903a2a 100644
--- a/test/test_commodities_api.py
+++ b/test/test_commodities_api.py
@@ -1,40 +1,43 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.commodities_api import CommoditiesApi # noqa: E501
+from data_bridges_client.api.commodities_api import CommoditiesApi
class TestCommoditiesApi(unittest.TestCase):
"""CommoditiesApi unit test stubs"""
- def setUp(self):
- self.api = CommoditiesApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = CommoditiesApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_commodities_categories_list_get(self):
+ def test_commodities_categories_list_get(self) -> None:
"""Test case for commodities_categories_list_get
- Provides the list of categories. # noqa: E501
+ Provides the list of categories.
"""
pass
- def test_commodities_list_get(self):
+ def test_commodities_list_get(self) -> None:
"""Test case for commodities_list_get
- Provide the detailed list of the commodities available in DataBridges platform # noqa: E501
+ Provide the detailed list of the commodities available in DataBridges platform
"""
pass
diff --git a/test/test_commodity_dto.py b/test/test_commodity_dto.py
index 47417cc..5c05147 100644
--- a/test/test_commodity_dto.py
+++ b/test/test_commodity_dto.py
@@ -1,24 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.commodity_processing_dto import CommodityProcessingDTO
-from data_bridges_client.model.commodity_quality_dto import CommodityQualityDTO
-globals()['CommodityProcessingDTO'] = CommodityProcessingDTO
-globals()['CommodityQualityDTO'] = CommodityQualityDTO
-from data_bridges_client.model.commodity_dto import CommodityDTO
+import unittest
+import datetime
+from data_bridges_client.models.commodity_dto import CommodityDTO
class TestCommodityDTO(unittest.TestCase):
"""CommodityDTO unit test stubs"""
@@ -29,12 +27,44 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> CommodityDTO:
+ """Test CommodityDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CommodityDTO`
+ """
+ model = CommodityDTO()
+ if include_optional:
+ return CommodityDTO(
+ id = 56,
+ parent_id = 56,
+ name = '',
+ coicop2018 = '',
+ supply = 56,
+ category_id = 56,
+ create_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ update_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ qualities = [
+ {
+ 'key' : null
+ }
+ ],
+ processing = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return CommodityDTO(
+ )
+ """
+
def testCommodityDTO(self):
"""Test CommodityDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CommodityDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_commodity_price_dto.py b/test/test_commodity_price_dto.py
index d3cdac3..3d35373 100644
--- a/test/test_commodity_price_dto.py
+++ b/test/test_commodity_price_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.commodity_price_dto import CommodityPriceDTO
+import unittest
+import datetime
+from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO
class TestCommodityPriceDTO(unittest.TestCase):
"""CommodityPriceDTO unit test stubs"""
@@ -25,12 +27,52 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> CommodityPriceDTO:
+ """Test CommodityPriceDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CommodityPriceDTO`
+ """
+ model = CommodityPriceDTO()
+ if include_optional:
+ return CommodityPriceDTO(
+ id = 56,
+ commodity_id = 56,
+ market_id = 56,
+ price_type_id = 56,
+ commodity_unit_id = 56,
+ currency_id = 56,
+ commodity_name = '',
+ market_name = '',
+ price_type_name = '',
+ unit_name = '',
+ currency_name = '',
+ original_frequency = '',
+ adm0_code = 56,
+ country_iso3 = '',
+ country_name = '',
+ commodity_price = 1.337,
+ commodity_price_source_name = '',
+ commodity_price_metadata = None,
+ commodity_price_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ commodity_price_observations = 56,
+ commodity_price_date_day = 56,
+ commodity_price_date_week = 56,
+ commodity_price_date_month = 56,
+ commodity_price_date_year = 56,
+ commodity_price_insert_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ commodity_price_flag = ''
+ )
+ else:
+ return CommodityPriceDTO(
+ )
+ """
+
def testCommodityPriceDTO(self):
"""Test CommodityPriceDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CommodityPriceDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_commodity_processing_dto.py b/test/test_commodity_processing_dto.py
index f6b13a4..4c56a12 100644
--- a/test/test_commodity_processing_dto.py
+++ b/test/test_commodity_processing_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.commodity_processing_dto import CommodityProcessingDTO
+import unittest
+import datetime
+from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO
class TestCommodityProcessingDTO(unittest.TestCase):
"""CommodityProcessingDTO unit test stubs"""
@@ -25,12 +27,28 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> CommodityProcessingDTO:
+ """Test CommodityProcessingDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CommodityProcessingDTO`
+ """
+ model = CommodityProcessingDTO()
+ if include_optional:
+ return CommodityProcessingDTO(
+ id = 56,
+ name = ''
+ )
+ else:
+ return CommodityProcessingDTO(
+ )
+ """
+
def testCommodityProcessingDTO(self):
"""Test CommodityProcessingDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CommodityProcessingDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_commodity_quality_dto.py b/test/test_commodity_quality_dto.py
index f7a08bb..75232b9 100644
--- a/test/test_commodity_quality_dto.py
+++ b/test/test_commodity_quality_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.commodity_quality_dto import CommodityQualityDTO
+import unittest
+import datetime
+from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO
class TestCommodityQualityDTO(unittest.TestCase):
"""CommodityQualityDTO unit test stubs"""
@@ -25,12 +27,28 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> CommodityQualityDTO:
+ """Test CommodityQualityDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CommodityQualityDTO`
+ """
+ model = CommodityQualityDTO()
+ if include_optional:
+ return CommodityQualityDTO(
+ id = 56,
+ name = ''
+ )
+ else:
+ return CommodityQualityDTO(
+ )
+ """
+
def testCommodityQualityDTO(self):
"""Test CommodityQualityDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CommodityQualityDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_commodity_units_api.py b/test/test_commodity_units_api.py
index 9e37205..ec4bc98 100644
--- a/test/test_commodity_units_api.py
+++ b/test/test_commodity_units_api.py
@@ -1,40 +1,43 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.commodity_units_api import CommodityUnitsApi # noqa: E501
+from data_bridges_client.api.commodity_units_api import CommodityUnitsApi
class TestCommodityUnitsApi(unittest.TestCase):
"""CommodityUnitsApi unit test stubs"""
- def setUp(self):
- self.api = CommodityUnitsApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = CommodityUnitsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_commodity_units_conversion_list_get(self):
+ def test_commodity_units_conversion_list_get(self) -> None:
"""Test case for commodity_units_conversion_list_get
- Provides conversion factors to Kilogram or Litres for each convertible unit of measure. # noqa: E501
+ Provides conversion factors to Kilogram or Litres for each convertible unit of measure.
"""
pass
- def test_commodity_units_list_get(self):
+ def test_commodity_units_list_get(self) -> None:
"""Test case for commodity_units_list_get
- Provides the detailed list of the unit of measure available in DataBridges platform # noqa: E501
+ Provides the detailed list of the unit of measure available in DataBridges platform
"""
pass
diff --git a/test/test_coordinate.py b/test/test_coordinate.py
deleted file mode 100644
index 7d34bac..0000000
--- a/test/test_coordinate.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.coordinate import Coordinate
-
-
-class TestCoordinate(unittest.TestCase):
- """Coordinate unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testCoordinate(self):
- """Test Coordinate"""
- # FIXME: construct object with mandatory attributes with example values
- # model = Coordinate() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_coordinate_equality_comparer.py b/test/test_coordinate_equality_comparer.py
deleted file mode 100644
index 2bc8db2..0000000
--- a/test/test_coordinate_equality_comparer.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.coordinate_equality_comparer import CoordinateEqualityComparer
-
-
-class TestCoordinateEqualityComparer(unittest.TestCase):
- """CoordinateEqualityComparer unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testCoordinateEqualityComparer(self):
- """Test CoordinateEqualityComparer"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CoordinateEqualityComparer() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_coordinate_sequence.py b/test/test_coordinate_sequence.py
deleted file mode 100644
index f134cf6..0000000
--- a/test/test_coordinate_sequence.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.ordinates import Ordinates
-globals()['Ordinates'] = Ordinates
-from data_bridges_client.model.coordinate_sequence import CoordinateSequence
-
-
-class TestCoordinateSequence(unittest.TestCase):
- """CoordinateSequence unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testCoordinateSequence(self):
- """Test CoordinateSequence"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CoordinateSequence() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_coordinate_sequence_factory.py b/test/test_coordinate_sequence_factory.py
deleted file mode 100644
index c587597..0000000
--- a/test/test_coordinate_sequence_factory.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.ordinates import Ordinates
-globals()['Ordinates'] = Ordinates
-from data_bridges_client.model.coordinate_sequence_factory import CoordinateSequenceFactory
-
-
-class TestCoordinateSequenceFactory(unittest.TestCase):
- """CoordinateSequenceFactory unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testCoordinateSequenceFactory(self):
- """Test CoordinateSequenceFactory"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CoordinateSequenceFactory() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_currency_api.py b/test/test_currency_api.py
index 4d9d6ad..c01ddb2 100644
--- a/test/test_currency_api.py
+++ b/test/test_currency_api.py
@@ -1,40 +1,43 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.currency_api import CurrencyApi # noqa: E501
+from data_bridges_client.api.currency_api import CurrencyApi
class TestCurrencyApi(unittest.TestCase):
"""CurrencyApi unit test stubs"""
- def setUp(self):
- self.api = CurrencyApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = CurrencyApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_currency_list_get(self):
+ def test_currency_list_get(self) -> None:
"""Test case for currency_list_get
- Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217. # noqa: E501
+ Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217.
"""
pass
- def test_currency_usd_indirect_quotation_get(self):
+ def test_currency_usd_indirect_quotation_get(self) -> None:
"""Test case for currency_usd_indirect_quotation_get
- Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates. # noqa: E501
+ Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates.
"""
pass
diff --git a/test/test_currency_dto.py b/test/test_currency_dto.py
index 9211cc2..e997aad 100644
--- a/test/test_currency_dto.py
+++ b/test/test_currency_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.currency_dto import CurrencyDTO
+import unittest
+import datetime
+from data_bridges_client.models.currency_dto import CurrencyDTO
class TestCurrencyDTO(unittest.TestCase):
"""CurrencyDTO unit test stubs"""
@@ -25,12 +27,31 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> CurrencyDTO:
+ """Test CurrencyDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `CurrencyDTO`
+ """
+ model = CurrencyDTO()
+ if include_optional:
+ return CurrencyDTO(
+ id = 56,
+ name = '',
+ extended_name = '',
+ create_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ update_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
+ )
+ else:
+ return CurrencyDTO(
+ )
+ """
+
def testCurrencyDTO(self):
"""Test CurrencyDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = CurrencyDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_dimension.py b/test/test_dimension.py
deleted file mode 100644
index 8fa2d32..0000000
--- a/test/test_dimension.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.dimension import Dimension
-
-
-class TestDimension(unittest.TestCase):
- """Dimension unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testDimension(self):
- """Test Dimension"""
- # FIXME: construct object with mandatory attributes with example values
- # model = Dimension() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_economic_data_api.py b/test/test_economic_data_api.py
index 979a564..d0917fd 100644
--- a/test/test_economic_data_api.py
+++ b/test/test_economic_data_api.py
@@ -1,40 +1,43 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.economic_data_api import EconomicDataApi # noqa: E501
+from data_bridges_client.api.economic_data_api import EconomicDataApi
class TestEconomicDataApi(unittest.TestCase):
"""EconomicDataApi unit test stubs"""
- def setUp(self):
- self.api = EconomicDataApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = EconomicDataApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_economic_data_indicator_list_get(self):
+ def test_economic_data_indicator_list_get(self) -> None:
"""Test case for economic_data_indicator_list_get
- Returns the lists of indicators. # noqa: E501
+ Returns the lists of indicators.
"""
pass
- def test_economic_data_indicator_name_get(self):
+ def test_economic_data_indicator_name_get(self) -> None:
"""Test case for economic_data_indicator_name_get
- Returns the time series of values for different indicators. # noqa: E501
+ Returns the time series of values for different indicators.
"""
pass
diff --git a/test/test_economic_data_dto.py b/test/test_economic_data_dto.py
new file mode 100644
index 0000000..b5086f7
--- /dev/null
+++ b/test/test_economic_data_dto.py
@@ -0,0 +1,54 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.economic_data_dto import EconomicDataDTO
+
+class TestEconomicDataDTO(unittest.TestCase):
+ """EconomicDataDTO unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> EconomicDataDTO:
+ """Test EconomicDataDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `EconomicDataDTO`
+ """
+ model = EconomicDataDTO()
+ if include_optional:
+ return EconomicDataDTO(
+ var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ value = 1.337
+ )
+ else:
+ return EconomicDataDTO(
+ )
+ """
+
+ def testEconomicDataDTO(self):
+ """Test EconomicDataDTO"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_economic_indicator_property.py b/test/test_economic_indicator_property.py
index 808851a..501796b 100644
--- a/test/test_economic_indicator_property.py
+++ b/test/test_economic_indicator_property.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.economic_indicator_property import EconomicIndicatorProperty
+import unittest
+import datetime
+from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty
class TestEconomicIndicatorProperty(unittest.TestCase):
"""EconomicIndicatorProperty unit test stubs"""
@@ -25,12 +27,34 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> EconomicIndicatorProperty:
+ """Test EconomicIndicatorProperty
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `EconomicIndicatorProperty`
+ """
+ model = EconomicIndicatorProperty()
+ if include_optional:
+ return EconomicIndicatorProperty(
+ id = 56,
+ name = '',
+ frequency = '',
+ unit = '',
+ data_source = '',
+ country_iso3 = '',
+ latest_value = 1.337,
+ latest_value_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
+ )
+ else:
+ return EconomicIndicatorProperty(
+ )
+ """
+
def testEconomicIndicatorProperty(self):
"""Test EconomicIndicatorProperty"""
- # FIXME: construct object with mandatory attributes with example values
- # model = EconomicIndicatorProperty() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_economic_indicator_property_paged_result.py b/test/test_economic_indicator_property_paged_result.py
index a42d362..9a16faa 100644
--- a/test/test_economic_indicator_property_paged_result.py
+++ b/test/test_economic_indicator_property_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.economic_indicator_property import EconomicIndicatorProperty
-globals()['EconomicIndicatorProperty'] = EconomicIndicatorProperty
-from data_bridges_client.model.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
+import unittest
+import datetime
+from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult
class TestEconomicIndicatorPropertyPagedResult(unittest.TestCase):
"""EconomicIndicatorPropertyPagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> EconomicIndicatorPropertyPagedResult:
+ """Test EconomicIndicatorPropertyPagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `EconomicIndicatorPropertyPagedResult`
+ """
+ model = EconomicIndicatorPropertyPagedResult()
+ if include_optional:
+ return EconomicIndicatorPropertyPagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return EconomicIndicatorPropertyPagedResult(
+ )
+ """
+
def testEconomicIndicatorPropertyPagedResult(self):
"""Test EconomicIndicatorPropertyPagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = EconomicIndicatorPropertyPagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_envelope.py b/test/test_envelope.py
deleted file mode 100644
index dc574f6..0000000
--- a/test/test_envelope.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.coordinate import Coordinate
-globals()['Coordinate'] = Coordinate
-from data_bridges_client.model.envelope import Envelope
-
-
-class TestEnvelope(unittest.TestCase):
- """Envelope unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testEnvelope(self):
- """Test Envelope"""
- # FIXME: construct object with mandatory attributes with example values
- # model = Envelope() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_feature.py b/test/test_feature.py
new file mode 100644
index 0000000..c55609b
--- /dev/null
+++ b/test/test_feature.py
@@ -0,0 +1,63 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.feature import Feature
+
+class TestFeature(unittest.TestCase):
+ """Feature unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Feature:
+ """Test Feature
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `Feature`
+ """
+ model = Feature()
+ if include_optional:
+ return Feature(
+ type = '',
+ id = 56,
+ bbox = [
+ 1.337
+ ],
+ geometry = {
+ 'key' : null
+ },
+ properties = {
+ 'key' : null
+ }
+ )
+ else:
+ return Feature(
+ )
+ """
+
+ def testFeature(self):
+ """Test Feature"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_food_security_api.py b/test/test_food_security_api.py
index c87090e..8c278e4 100644
--- a/test/test_food_security_api.py
+++ b/test/test_food_security_api.py
@@ -1,30 +1,33 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.food_security_api import FoodSecurityApi # noqa: E501
+from data_bridges_client.api.food_security_api import FoodSecurityApi
class TestFoodSecurityApi(unittest.TestCase):
"""FoodSecurityApi unit test stubs"""
- def setUp(self):
- self.api = FoodSecurityApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = FoodSecurityApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_food_security_list_get(self):
+ def test_food_security_list_get(self) -> None:
"""Test case for food_security_list_get
"""
diff --git a/test/test_geometry.py b/test/test_geometry.py
index 20b82b5..2336abf 100644
--- a/test/test_geometry.py
+++ b/test/test_geometry.py
@@ -1,34 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.coordinate import Coordinate
-from data_bridges_client.model.dimension import Dimension
-from data_bridges_client.model.envelope import Envelope
-from data_bridges_client.model.geometry_factory import GeometryFactory
-from data_bridges_client.model.ogc_geometry_type import OgcGeometryType
-from data_bridges_client.model.point import Point
-from data_bridges_client.model.precision_model import PrecisionModel
-globals()['Coordinate'] = Coordinate
-globals()['Dimension'] = Dimension
-globals()['Envelope'] = Envelope
-globals()['GeometryFactory'] = GeometryFactory
-globals()['OgcGeometryType'] = OgcGeometryType
-globals()['Point'] = Point
-globals()['PrecisionModel'] = PrecisionModel
-from data_bridges_client.model.geometry import Geometry
+import unittest
+import datetime
+from data_bridges_client.models.geometry import Geometry
class TestGeometry(unittest.TestCase):
"""Geometry unit test stubs"""
@@ -39,12 +27,30 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> Geometry:
+ """Test Geometry
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `Geometry`
+ """
+ model = Geometry()
+ if include_optional:
+ return Geometry(
+ type = '',
+ coordinates = [
+ 1.337
+ ]
+ )
+ else:
+ return Geometry(
+ )
+ """
+
def testGeometry(self):
"""Test Geometry"""
- # FIXME: construct object with mandatory attributes with example values
- # model = Geometry() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_geometry_factory.py b/test/test_geometry_factory.py
deleted file mode 100644
index e28aaaa..0000000
--- a/test/test_geometry_factory.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.coordinate_sequence_factory import CoordinateSequenceFactory
-from data_bridges_client.model.nts_geometry_services import NtsGeometryServices
-from data_bridges_client.model.precision_model import PrecisionModel
-globals()['CoordinateSequenceFactory'] = CoordinateSequenceFactory
-globals()['NtsGeometryServices'] = NtsGeometryServices
-globals()['PrecisionModel'] = PrecisionModel
-from data_bridges_client.model.geometry_factory import GeometryFactory
-
-
-class TestGeometryFactory(unittest.TestCase):
- """GeometryFactory unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testGeometryFactory(self):
- """Test GeometryFactory"""
- # FIXME: construct object with mandatory attributes with example values
- # model = GeometryFactory() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_geometry_overlay.py b/test/test_geometry_overlay.py
deleted file mode 100644
index 97cc083..0000000
--- a/test/test_geometry_overlay.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.geometry_overlay import GeometryOverlay
-
-
-class TestGeometryOverlay(unittest.TestCase):
- """GeometryOverlay unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testGeometryOverlay(self):
- """Test GeometryOverlay"""
- # FIXME: construct object with mandatory attributes with example values
- # model = GeometryOverlay() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_gorp_api.py b/test/test_gorp_api.py
index 17d3081..c091a9c 100644
--- a/test/test_gorp_api.py
+++ b/test/test_gorp_api.py
@@ -1,40 +1,43 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.gorp_api import GorpApi # noqa: E501
+from data_bridges_client.api.gorp_api import GorpApi
class TestGorpApi(unittest.TestCase):
"""GorpApi unit test stubs"""
- def setUp(self):
- self.api = GorpApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = GorpApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_gorp_latest_get(self):
+ def test_gorp_latest_get(self) -> None:
"""Test case for gorp_latest_get
- Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. # noqa: E501
+ Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
"""
pass
- def test_gorp_list_get(self):
+ def test_gorp_list_get(self) -> None:
"""Test case for gorp_list_get
- Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. # noqa: E501
+ Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan.
"""
pass
diff --git a/test/test_gorp_value_with_changes.py b/test/test_gorp_value_with_changes.py
index ab7a3d1..424f86c 100644
--- a/test/test_gorp_value_with_changes.py
+++ b/test/test_gorp_value_with_changes.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.gorp_value_with_changes import GorpValueWithChanges
+import unittest
+import datetime
+from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges
class TestGorpValueWithChanges(unittest.TestCase):
"""GorpValueWithChanges unit test stubs"""
@@ -25,12 +27,35 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> GorpValueWithChanges:
+ """Test GorpValueWithChanges
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `GorpValueWithChanges`
+ """
+ model = GorpValueWithChanges()
+ if include_optional:
+ return GorpValueWithChanges(
+ year = 56,
+ month = '',
+ region_name = '',
+ actual_value = 1.337,
+ baseline_value = 1.337,
+ percentage_change = 1.337,
+ absolute_change = 1.337,
+ comments = '',
+ number_of_countries = 56
+ )
+ else:
+ return GorpValueWithChanges(
+ )
+ """
+
def testGorpValueWithChanges(self):
"""Test GorpValueWithChanges"""
- # FIXME: construct object with mandatory attributes with example values
- # model = GorpValueWithChanges() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_gorp_value_with_changes_paged_result.py b/test/test_gorp_value_with_changes_paged_result.py
index cbfed70..0cd4946 100644
--- a/test/test_gorp_value_with_changes_paged_result.py
+++ b/test/test_gorp_value_with_changes_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.gorp_value_with_changes import GorpValueWithChanges
-globals()['GorpValueWithChanges'] = GorpValueWithChanges
-from data_bridges_client.model.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
+import unittest
+import datetime
+from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult
class TestGorpValueWithChangesPagedResult(unittest.TestCase):
"""GorpValueWithChangesPagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> GorpValueWithChangesPagedResult:
+ """Test GorpValueWithChangesPagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `GorpValueWithChangesPagedResult`
+ """
+ model = GorpValueWithChangesPagedResult()
+ if include_optional:
+ return GorpValueWithChangesPagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return GorpValueWithChangesPagedResult(
+ )
+ """
+
def testGorpValueWithChangesPagedResult(self):
"""Test GorpValueWithChangesPagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = GorpValueWithChangesPagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_household_survey_list_dto.py b/test/test_household_survey_list_dto.py
new file mode 100644
index 0000000..e2d0a46
--- /dev/null
+++ b/test/test_household_survey_list_dto.py
@@ -0,0 +1,85 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO
+
+class TestHouseholdSurveyListDTO(unittest.TestCase):
+ """HouseholdSurveyListDTO unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> HouseholdSurveyListDTO:
+ """Test HouseholdSurveyListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `HouseholdSurveyListDTO`
+ """
+ model = HouseholdSurveyListDTO()
+ if include_optional:
+ return HouseholdSurveyListDTO(
+ survey_id = 56,
+ survey_status_id = 56,
+ survey_start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ survey_end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ survey_create_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ survey_validation_report = '',
+ survey_original_filename = '',
+ xls_form_name = '',
+ base_xls_form_name = '',
+ country_name = '',
+ adm0_code = 56,
+ iso3_alpha3 = '',
+ user_name = '',
+ approved_by = '',
+ original_csv_file = '',
+ base_data = '',
+ survey_attributes = [
+ {
+ 'key' : null
+ }
+ ],
+ organizations = [
+ {
+ 'key' : null
+ }
+ ],
+ survey_modality_name = '',
+ survey_category_name = '',
+ survey_sub_category_name = '',
+ survey_phase_name = '',
+ survey_visibilty = '',
+ is_continuous_monitoring = True,
+ survey_name = ''
+ )
+ else:
+ return HouseholdSurveyListDTO(
+ )
+ """
+
+ def testHouseholdSurveyListDTO(self):
+ """Test HouseholdSurveyListDTO"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_household_survey_list_dto_paged_result.py b/test/test_household_survey_list_dto_paged_result.py
new file mode 100644
index 0000000..1ac5a84
--- /dev/null
+++ b/test/test_household_survey_list_dto_paged_result.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult
+
+class TestHouseholdSurveyListDTOPagedResult(unittest.TestCase):
+ """HouseholdSurveyListDTOPagedResult unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> HouseholdSurveyListDTOPagedResult:
+ """Test HouseholdSurveyListDTOPagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `HouseholdSurveyListDTOPagedResult`
+ """
+ model = HouseholdSurveyListDTOPagedResult()
+ if include_optional:
+ return HouseholdSurveyListDTOPagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return HouseholdSurveyListDTOPagedResult(
+ )
+ """
+
+ def testHouseholdSurveyListDTOPagedResult(self):
+ """Test HouseholdSurveyListDTOPagedResult"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_i_attributes_table.py b/test/test_i_attributes_table.py
deleted file mode 100644
index d1aefed..0000000
--- a/test/test_i_attributes_table.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.i_attributes_table import IAttributesTable
-
-
-class TestIAttributesTable(unittest.TestCase):
- """IAttributesTable unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testIAttributesTable(self):
- """Test IAttributesTable"""
- # FIXME: construct object with mandatory attributes with example values
- # model = IAttributesTable() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_i_feature.py b/test/test_i_feature.py
deleted file mode 100644
index f5039f5..0000000
--- a/test/test_i_feature.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.envelope import Envelope
-from data_bridges_client.model.geometry import Geometry
-from data_bridges_client.model.i_attributes_table import IAttributesTable
-globals()['Envelope'] = Envelope
-globals()['Geometry'] = Geometry
-globals()['IAttributesTable'] = IAttributesTable
-from data_bridges_client.model.i_feature import IFeature
-
-
-class TestIFeature(unittest.TestCase):
- """IFeature unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testIFeature(self):
- """Test IFeature"""
- # FIXME: construct object with mandatory attributes with example values
- # model = IFeature() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_incubation_api.py b/test/test_incubation_api.py
new file mode 100644
index 0000000..9d1f39f
--- /dev/null
+++ b/test/test_incubation_api.py
@@ -0,0 +1,67 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+
+from data_bridges_client.api.incubation_api import IncubationApi
+
+
+class TestIncubationApi(unittest.TestCase):
+ """IncubationApi unit test stubs"""
+
+ def setUp(self) -> None:
+ self.api = IncubationApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_household_draft_internal_base_data_get(self) -> None:
+ """Test case for household_draft_internal_base_data_get
+
+ Get data that includes the core household fields only by Survey ID
+ """
+ pass
+
+ def test_household_full_data_get(self) -> None:
+ """Test case for household_full_data_get
+
+ Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization.
+ """
+ pass
+
+ def test_household_official_use_base_data_get(self) -> None:
+ """Test case for household_official_use_base_data_get
+
+ Get data that includes the core household fields only by Survey ID
+ """
+ pass
+
+ def test_household_public_base_data_get(self) -> None:
+ """Test case for household_public_base_data_get
+
+ Get data that includes the core household fields only by Survey ID
+ """
+ pass
+
+ def test_household_surveys_get(self) -> None:
+ """Test case for household_surveys_get
+
+ Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey.
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_ipc_value.py b/test/test_ipc_value.py
index 41ea9ce..c65b639 100644
--- a/test/test_ipc_value.py
+++ b/test/test_ipc_value.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.ipc_value import IpcValue
+import unittest
+import datetime
+from data_bridges_client.models.ipc_value import IpcValue
class TestIpcValue(unittest.TestCase):
"""IpcValue unit test stubs"""
@@ -25,12 +27,46 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> IpcValue:
+ """Test IpcValue
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `IpcValue`
+ """
+ model = IpcValue()
+ if include_optional:
+ return IpcValue(
+ ipc_id = 56,
+ ipc_year = 56,
+ iso3_alpha3 = '',
+ ipc_is_latest_value = True,
+ ipc_country_name = '',
+ ipc_area_name = '',
+ ipc_phase3_population = 56,
+ ipc_phase4_population = 56,
+ ipc_phase5_population = 56,
+ ipc_phase3_percentage = 1.337,
+ ipc_phase4_percentage = 1.337,
+ ipc_phase5_percentage = 1.337,
+ ipc_analysed_population = 56,
+ ipc_analysed_percentage = 1.337,
+ ipc_analysis_comment = '',
+ ipc_data_type = '',
+ ipc_data_source = '',
+ ipc_reference_period = '',
+ ipc_create_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ ipc_update_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
+ )
+ else:
+ return IpcValue(
+ )
+ """
+
def testIpcValue(self):
"""Test IpcValue"""
- # FIXME: construct object with mandatory attributes with example values
- # model = IpcValue() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_ipc_value_paged_result.py b/test/test_ipc_value_paged_result.py
index 485fa9b..921ba01 100644
--- a/test/test_ipc_value_paged_result.py
+++ b/test/test_ipc_value_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.ipc_value import IpcValue
-globals()['IpcValue'] = IpcValue
-from data_bridges_client.model.ipc_value_paged_result import IpcValuePagedResult
+import unittest
+import datetime
+from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult
class TestIpcValuePagedResult(unittest.TestCase):
"""IpcValuePagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> IpcValuePagedResult:
+ """Test IpcValuePagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `IpcValuePagedResult`
+ """
+ model = IpcValuePagedResult()
+ if include_optional:
+ return IpcValuePagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return IpcValuePagedResult(
+ )
+ """
+
def testIpcValuePagedResult(self):
"""Test IpcValuePagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = IpcValuePagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_key_name_dto.py b/test/test_key_name_dto.py
new file mode 100644
index 0000000..df15ed0
--- /dev/null
+++ b/test/test_key_name_dto.py
@@ -0,0 +1,54 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.key_name_dto import KeyNameDto
+
+class TestKeyNameDto(unittest.TestCase):
+ """KeyNameDto unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> KeyNameDto:
+ """Test KeyNameDto
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `KeyNameDto`
+ """
+ model = KeyNameDto()
+ if include_optional:
+ return KeyNameDto(
+ id = 56,
+ name = ''
+ )
+ else:
+ return KeyNameDto(
+ )
+ """
+
+ def testKeyNameDto(self):
+ """Test KeyNameDto"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_market_dto.py b/test/test_market_dto.py
new file mode 100644
index 0000000..caea2f3
--- /dev/null
+++ b/test/test_market_dto.py
@@ -0,0 +1,61 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.market_dto import MarketDTO
+
+class TestMarketDTO(unittest.TestCase):
+ """MarketDTO unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> MarketDTO:
+ """Test MarketDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `MarketDTO`
+ """
+ model = MarketDTO()
+ if include_optional:
+ return MarketDTO(
+ market_id = 56,
+ market_name = '',
+ market_local_name = '',
+ market_latitude = 1.337,
+ market_longitude = 1.337,
+ admin1_name = '',
+ admin1_code = 56,
+ admin2_name = '',
+ admin2_code = 56
+ )
+ else:
+ return MarketDTO(
+ )
+ """
+
+ def testMarketDTO(self):
+ """Test MarketDTO"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_market_geo_json_root.py b/test/test_market_geo_json_root.py
new file mode 100644
index 0000000..ed8b6d2
--- /dev/null
+++ b/test/test_market_geo_json_root.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot
+
+class TestMarketGeoJsonRoot(unittest.TestCase):
+ """MarketGeoJsonRoot unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> MarketGeoJsonRoot:
+ """Test MarketGeoJsonRoot
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `MarketGeoJsonRoot`
+ """
+ model = MarketGeoJsonRoot()
+ if include_optional:
+ return MarketGeoJsonRoot(
+ type = '',
+ features = [
+ {
+ 'key' : null
+ }
+ ],
+ bbox = None
+ )
+ else:
+ return MarketGeoJsonRoot(
+ )
+ """
+
+ def testMarketGeoJsonRoot(self):
+ """Test MarketGeoJsonRoot"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_market_prices_api.py b/test/test_market_prices_api.py
index cfc83d3..dd681e7 100644
--- a/test/test_market_prices_api.py
+++ b/test/test_market_prices_api.py
@@ -1,61 +1,64 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.market_prices_api import MarketPricesApi # noqa: E501
+from data_bridges_client.api.market_prices_api import MarketPricesApi
class TestMarketPricesApi(unittest.TestCase):
"""MarketPricesApi unit test stubs"""
- def setUp(self):
- self.api = MarketPricesApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = MarketPricesApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_market_prices_alps_get(self):
+ def test_market_prices_alps_get(self) -> None:
"""Test case for market_prices_alps_get
- Returns time series values of ALPS and PEWI. # noqa: E501
+ Returns time series values of ALPS and PEWI.
"""
pass
- def test_market_prices_price_daily_get(self):
+ def test_market_prices_price_daily_get(self) -> None:
"""Test case for market_prices_price_daily_get
- Returns a daily time series of commodity market prices. # noqa: E501
+ Returns a daily time series of commodity market prices.
"""
pass
- def test_market_prices_price_monthly_get(self):
+ def test_market_prices_price_monthly_get(self) -> None:
"""Test case for market_prices_price_monthly_get
- Returns a monthly time series of commodity market prices. # noqa: E501
+ Returns a monthly time series of commodity market prices.
"""
pass
- def test_market_prices_price_raw_get(self):
+ def test_market_prices_price_raw_get(self) -> None:
"""Test case for market_prices_price_raw_get
- Returns original commodity market prices # noqa: E501
+ Returns original commodity market prices
"""
pass
- def test_market_prices_price_weekly_get(self):
+ def test_market_prices_price_weekly_get(self) -> None:
"""Test case for market_prices_price_weekly_get
- Returns a weekly time series of commodity market prices. # noqa: E501
+ Returns a weekly time series of commodity market prices.
"""
pass
diff --git a/test/test_markets_api.py b/test/test_markets_api.py
index e5a8db6..73832b0 100644
--- a/test/test_markets_api.py
+++ b/test/test_markets_api.py
@@ -1,54 +1,57 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.markets_api import MarketsApi # noqa: E501
+from data_bridges_client.api.markets_api import MarketsApi
class TestMarketsApi(unittest.TestCase):
"""MarketsApi unit test stubs"""
- def setUp(self):
- self.api = MarketsApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = MarketsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_markets_geo_json_list_get(self):
+ def test_markets_geo_json_list_get(self) -> None:
"""Test case for markets_geo_json_list_get
- Provide a list of geo referenced markets in a specific country # noqa: E501
+ Provide a list of geo referenced markets in a specific country
"""
pass
- def test_markets_list_get(self):
+ def test_markets_list_get(self) -> None:
"""Test case for markets_list_get
- Get a complete list of markets in a country # noqa: E501
+ Get a complete list of markets in a country
"""
pass
- def test_markets_markets_as_csv_get(self):
+ def test_markets_markets_as_csv_get(self) -> None:
"""Test case for markets_markets_as_csv_get
- Get a complete list of markets in a country # noqa: E501
+ Get a complete list of markets in a country
"""
pass
- def test_markets_nearby_markets_get(self):
+ def test_markets_nearby_markets_get(self) -> None:
"""Test case for markets_nearby_markets_get
- Find markets near a given location by longitude and latitude within a 15Km distance # noqa: E501
+ Find markets near a given location by longitude and latitude within a 15Km distance
"""
pass
diff --git a/test/test_mfi_processed_data_dto.py b/test/test_mfi_processed_data_dto.py
index 1276d42..23cc211 100644
--- a/test/test_mfi_processed_data_dto.py
+++ b/test/test_mfi_processed_data_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.mfi_processed_data_dto import MFIProcessedDataDTO
+import unittest
+import datetime
+from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO
class TestMFIProcessedDataDTO(unittest.TestCase):
"""MFIProcessedDataDTO unit test stubs"""
@@ -25,12 +27,52 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> MFIProcessedDataDTO:
+ """Test MFIProcessedDataDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `MFIProcessedDataDTO`
+ """
+ model = MFIProcessedDataDTO()
+ if include_optional:
+ return MFIProcessedDataDTO(
+ survey_id = 56,
+ start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ market_id = 56,
+ market_name = '',
+ market_latitude = 1.337,
+ market_longitude = 1.337,
+ regional_bureau_id = 56,
+ regional_bureau_name = '',
+ adm0_code = 56,
+ adm0_name = '',
+ adm1_code = 56,
+ adm1_name = '',
+ adm2_code = 56,
+ adm2_name = '',
+ level_id = 56,
+ level_name = '',
+ dimension_id = 56,
+ dimension_name = '',
+ variable_id = 56,
+ variable_name = '',
+ variable_label = '',
+ output_value = 1.337,
+ traders_sample_size = 56,
+ base_xls_form_id = 56,
+ base_xls_form_name = ''
+ )
+ else:
+ return MFIProcessedDataDTO(
+ )
+ """
+
def testMFIProcessedDataDTO(self):
"""Test MFIProcessedDataDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = MFIProcessedDataDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_nearby_markets_dto.py b/test/test_nearby_markets_dto.py
index 470c71e..04e6c0b 100644
--- a/test/test_nearby_markets_dto.py
+++ b/test/test_nearby_markets_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.nearby_markets_dto import NearbyMarketsDTO
+import unittest
+import datetime
+from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO
class TestNearbyMarketsDTO(unittest.TestCase):
"""NearbyMarketsDTO unit test stubs"""
@@ -25,12 +27,29 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> NearbyMarketsDTO:
+ """Test NearbyMarketsDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `NearbyMarketsDTO`
+ """
+ model = NearbyMarketsDTO()
+ if include_optional:
+ return NearbyMarketsDTO(
+ market_id = 56,
+ market_name = '',
+ distance = 1.337
+ )
+ else:
+ return NearbyMarketsDTO(
+ )
+ """
+
def testNearbyMarketsDTO(self):
"""Test NearbyMarketsDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = NearbyMarketsDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_nts_geometry_services.py b/test/test_nts_geometry_services.py
deleted file mode 100644
index 4f369d6..0000000
--- a/test/test_nts_geometry_services.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.coordinate_equality_comparer import CoordinateEqualityComparer
-from data_bridges_client.model.coordinate_sequence_factory import CoordinateSequenceFactory
-from data_bridges_client.model.geometry_overlay import GeometryOverlay
-from data_bridges_client.model.precision_model import PrecisionModel
-globals()['CoordinateEqualityComparer'] = CoordinateEqualityComparer
-globals()['CoordinateSequenceFactory'] = CoordinateSequenceFactory
-globals()['GeometryOverlay'] = GeometryOverlay
-globals()['PrecisionModel'] = PrecisionModel
-from data_bridges_client.model.nts_geometry_services import NtsGeometryServices
-
-
-class TestNtsGeometryServices(unittest.TestCase):
- """NtsGeometryServices unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testNtsGeometryServices(self):
- """Test NtsGeometryServices"""
- # FIXME: construct object with mandatory attributes with example values
- # model = NtsGeometryServices() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_ogc_geometry_type.py b/test/test_ogc_geometry_type.py
deleted file mode 100644
index 7adeb58..0000000
--- a/test/test_ogc_geometry_type.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.ogc_geometry_type import OgcGeometryType
-
-
-class TestOgcGeometryType(unittest.TestCase):
- """OgcGeometryType unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testOgcGeometryType(self):
- """Test OgcGeometryType"""
- # FIXME: construct object with mandatory attributes with example values
- # model = OgcGeometryType() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_ordinates.py b/test/test_ordinates.py
deleted file mode 100644
index d7d0fab..0000000
--- a/test/test_ordinates.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.ordinates import Ordinates
-
-
-class TestOrdinates(unittest.TestCase):
- """Ordinates unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testOrdinates(self):
- """Test Ordinates"""
- # FIXME: construct object with mandatory attributes with example values
- # model = Ordinates() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_paged_commodity_list_dto.py b/test/test_paged_commodity_list_dto.py
index b30ef83..1d56e1f 100644
--- a/test/test_paged_commodity_list_dto.py
+++ b/test/test_paged_commodity_list_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.commodity_dto import CommodityDTO
-globals()['CommodityDTO'] = CommodityDTO
-from data_bridges_client.model.paged_commodity_list_dto import PagedCommodityListDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO
class TestPagedCommodityListDTO(unittest.TestCase):
"""PagedCommodityListDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedCommodityListDTO:
+ """Test PagedCommodityListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedCommodityListDTO`
+ """
+ model = PagedCommodityListDTO()
+ if include_optional:
+ return PagedCommodityListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedCommodityListDTO(
+ )
+ """
+
def testPagedCommodityListDTO(self):
"""Test PagedCommodityListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedCommodityListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_paged_commodity_price_list_dto.py b/test/test_paged_commodity_price_list_dto.py
index 38311fe..b2503c6 100644
--- a/test/test_paged_commodity_price_list_dto.py
+++ b/test/test_paged_commodity_price_list_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.commodity_price_dto import CommodityPriceDTO
-globals()['CommodityPriceDTO'] = CommodityPriceDTO
-from data_bridges_client.model.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO
class TestPagedCommodityPriceListDTO(unittest.TestCase):
"""PagedCommodityPriceListDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedCommodityPriceListDTO:
+ """Test PagedCommodityPriceListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedCommodityPriceListDTO`
+ """
+ model = PagedCommodityPriceListDTO()
+ if include_optional:
+ return PagedCommodityPriceListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedCommodityPriceListDTO(
+ )
+ """
+
def testPagedCommodityPriceListDTO(self):
"""Test PagedCommodityPriceListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedCommodityPriceListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_paged_commodity_weekly_aggregated_price_list_dto.py b/test/test_paged_commodity_weekly_aggregated_price_list_dto.py
index ed61d8b..fd6a870 100644
--- a/test/test_paged_commodity_weekly_aggregated_price_list_dto.py
+++ b/test/test_paged_commodity_weekly_aggregated_price_list_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.weekly_aggregated_price import WeeklyAggregatedPrice
-globals()['WeeklyAggregatedPrice'] = WeeklyAggregatedPrice
-from data_bridges_client.model.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO
class TestPagedCommodityWeeklyAggregatedPriceListDTO(unittest.TestCase):
"""PagedCommodityWeeklyAggregatedPriceListDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedCommodityWeeklyAggregatedPriceListDTO:
+ """Test PagedCommodityWeeklyAggregatedPriceListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedCommodityWeeklyAggregatedPriceListDTO`
+ """
+ model = PagedCommodityWeeklyAggregatedPriceListDTO()
+ if include_optional:
+ return PagedCommodityWeeklyAggregatedPriceListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedCommodityWeeklyAggregatedPriceListDTO(
+ )
+ """
+
def testPagedCommodityWeeklyAggregatedPriceListDTO(self):
"""Test PagedCommodityWeeklyAggregatedPriceListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedCommodityWeeklyAggregatedPriceListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_paged_currency_list_dto.py b/test/test_paged_currency_list_dto.py
index 086d201..33f83b2 100644
--- a/test/test_paged_currency_list_dto.py
+++ b/test/test_paged_currency_list_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.currency_dto import CurrencyDTO
-globals()['CurrencyDTO'] = CurrencyDTO
-from data_bridges_client.model.paged_currency_list_dto import PagedCurrencyListDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO
class TestPagedCurrencyListDTO(unittest.TestCase):
"""PagedCurrencyListDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedCurrencyListDTO:
+ """Test PagedCurrencyListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedCurrencyListDTO`
+ """
+ model = PagedCurrencyListDTO()
+ if include_optional:
+ return PagedCurrencyListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedCurrencyListDTO(
+ )
+ """
+
def testPagedCurrencyListDTO(self):
"""Test PagedCurrencyListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedCurrencyListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_paged_economic_data_dto.py b/test/test_paged_economic_data_dto.py
new file mode 100644
index 0000000..84035e2
--- /dev/null
+++ b/test/test_paged_economic_data_dto.py
@@ -0,0 +1,62 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO
+
+class TestPagedEconomicDataDTO(unittest.TestCase):
+ """PagedEconomicDataDTO unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PagedEconomicDataDTO:
+ """Test PagedEconomicDataDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedEconomicDataDTO`
+ """
+ model = PagedEconomicDataDTO()
+ if include_optional:
+ return PagedEconomicDataDTO(
+ total_items = 56,
+ page = 56,
+ unit = '',
+ frequency = '',
+ data_source = '',
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedEconomicDataDTO(
+ )
+ """
+
+ def testPagedEconomicDataDTO(self):
+ """Test PagedEconomicDataDTO"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_paged_market_list_dto.py b/test/test_paged_market_list_dto.py
new file mode 100644
index 0000000..0de18ea
--- /dev/null
+++ b/test/test_paged_market_list_dto.py
@@ -0,0 +1,59 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO
+
+class TestPagedMarketListDTO(unittest.TestCase):
+ """PagedMarketListDTO unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PagedMarketListDTO:
+ """Test PagedMarketListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedMarketListDTO`
+ """
+ model = PagedMarketListDTO()
+ if include_optional:
+ return PagedMarketListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedMarketListDTO(
+ )
+ """
+
+ def testPagedMarketListDTO(self):
+ """Test PagedMarketListDTO"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_paged_processed_data_dto.py b/test/test_paged_processed_data_dto.py
index 467c33f..8b2efb4 100644
--- a/test/test_paged_processed_data_dto.py
+++ b/test/test_paged_processed_data_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.mfi_processed_data_dto import MFIProcessedDataDTO
-globals()['MFIProcessedDataDTO'] = MFIProcessedDataDTO
-from data_bridges_client.model.paged_processed_data_dto import PagedProcessedDataDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO
class TestPagedProcessedDataDTO(unittest.TestCase):
"""PagedProcessedDataDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedProcessedDataDTO:
+ """Test PagedProcessedDataDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedProcessedDataDTO`
+ """
+ model = PagedProcessedDataDTO()
+ if include_optional:
+ return PagedProcessedDataDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedProcessedDataDTO(
+ )
+ """
+
def testPagedProcessedDataDTO(self):
"""Test PagedProcessedDataDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedProcessedDataDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_paged_survey_list_dto.py b/test/test_paged_survey_list_dto.py
index b4c1007..a94aaf4 100644
--- a/test/test_paged_survey_list_dto.py
+++ b/test/test_paged_survey_list_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.survey_list_dto import SurveyListDTO
-globals()['SurveyListDTO'] = SurveyListDTO
-from data_bridges_client.model.paged_survey_list_dto import PagedSurveyListDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO
class TestPagedSurveyListDTO(unittest.TestCase):
"""PagedSurveyListDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedSurveyListDTO:
+ """Test PagedSurveyListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedSurveyListDTO`
+ """
+ model = PagedSurveyListDTO()
+ if include_optional:
+ return PagedSurveyListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedSurveyListDTO(
+ )
+ """
+
def testPagedSurveyListDTO(self):
"""Test PagedSurveyListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedSurveyListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_paged_survey_responses_dto.py b/test/test_paged_survey_responses_dto.py
new file mode 100644
index 0000000..f069cf9
--- /dev/null
+++ b/test/test_paged_survey_responses_dto.py
@@ -0,0 +1,57 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO
+
+class TestPagedSurveyResponsesDTO(unittest.TestCase):
+ """PagedSurveyResponsesDTO unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> PagedSurveyResponsesDTO:
+ """Test PagedSurveyResponsesDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedSurveyResponsesDTO`
+ """
+ model = PagedSurveyResponsesDTO()
+ if include_optional:
+ return PagedSurveyResponsesDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ null
+ ]
+ )
+ else:
+ return PagedSurveyResponsesDTO(
+ )
+ """
+
+ def testPagedSurveyResponsesDTO(self):
+ """Test PagedSurveyResponsesDTO"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_paged_xls_form_list_dto.py b/test/test_paged_xls_form_list_dto.py
index 07249af..a040234 100644
--- a/test/test_paged_xls_form_list_dto.py
+++ b/test/test_paged_xls_form_list_dto.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.xls_form_dto import XlsFormDTO
-globals()['XlsFormDTO'] = XlsFormDTO
-from data_bridges_client.model.paged_xls_form_list_dto import PagedXlsFormListDTO
+import unittest
+import datetime
+from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO
class TestPagedXlsFormListDTO(unittest.TestCase):
"""PagedXlsFormListDTO unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> PagedXlsFormListDTO:
+ """Test PagedXlsFormListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `PagedXlsFormListDTO`
+ """
+ model = PagedXlsFormListDTO()
+ if include_optional:
+ return PagedXlsFormListDTO(
+ total_items = 56,
+ page = 56,
+ items = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return PagedXlsFormListDTO(
+ )
+ """
+
def testPagedXlsFormListDTO(self):
"""Test PagedXlsFormListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PagedXlsFormListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_point.py b/test/test_point.py
deleted file mode 100644
index 636afb6..0000000
--- a/test/test_point.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.coordinate import Coordinate
-from data_bridges_client.model.coordinate_sequence import CoordinateSequence
-from data_bridges_client.model.dimension import Dimension
-from data_bridges_client.model.envelope import Envelope
-from data_bridges_client.model.geometry import Geometry
-from data_bridges_client.model.geometry_factory import GeometryFactory
-from data_bridges_client.model.ogc_geometry_type import OgcGeometryType
-from data_bridges_client.model.precision_model import PrecisionModel
-globals()['Coordinate'] = Coordinate
-globals()['CoordinateSequence'] = CoordinateSequence
-globals()['Dimension'] = Dimension
-globals()['Envelope'] = Envelope
-globals()['Geometry'] = Geometry
-globals()['GeometryFactory'] = GeometryFactory
-globals()['OgcGeometryType'] = OgcGeometryType
-globals()['PrecisionModel'] = PrecisionModel
-from data_bridges_client.model.point import Point
-
-
-class TestPoint(unittest.TestCase):
- """Point unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testPoint(self):
- """Test Point"""
- # FIXME: construct object with mandatory attributes with example values
- # model = Point() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_precision_model.py b/test/test_precision_model.py
deleted file mode 100644
index d97fdaf..0000000
--- a/test/test_precision_model.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.precision_models import PrecisionModels
-globals()['PrecisionModels'] = PrecisionModels
-from data_bridges_client.model.precision_model import PrecisionModel
-
-
-class TestPrecisionModel(unittest.TestCase):
- """PrecisionModel unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testPrecisionModel(self):
- """Test PrecisionModel"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PrecisionModel() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_precision_models.py b/test/test_precision_models.py
deleted file mode 100644
index 892c8cd..0000000
--- a/test/test_precision_models.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.precision_models import PrecisionModels
-
-
-class TestPrecisionModels(unittest.TestCase):
- """PrecisionModels unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testPrecisionModels(self):
- """Test PrecisionModels"""
- # FIXME: construct object with mandatory attributes with example values
- # model = PrecisionModels() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_problem_details.py b/test/test_problem_details.py
index efe95b4..c15d35c 100644
--- a/test/test_problem_details.py
+++ b/test/test_problem_details.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.problem_details import ProblemDetails
+import unittest
+import datetime
+from data_bridges_client.models.problem_details import ProblemDetails
class TestProblemDetails(unittest.TestCase):
"""ProblemDetails unit test stubs"""
@@ -25,12 +27,31 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> ProblemDetails:
+ """Test ProblemDetails
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ProblemDetails`
+ """
+ model = ProblemDetails()
+ if include_optional:
+ return ProblemDetails(
+ type = '',
+ title = '',
+ status = 56,
+ detail = '',
+ instance = ''
+ )
+ else:
+ return ProblemDetails(
+ )
+ """
+
def testProblemDetails(self):
"""Test ProblemDetails"""
- # FIXME: construct object with mandatory attributes with example values
- # model = ProblemDetails() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_properties.py b/test/test_properties.py
new file mode 100644
index 0000000..214f46e
--- /dev/null
+++ b/test/test_properties.py
@@ -0,0 +1,53 @@
+# coding: utf-8
+
+"""
+ VAM-Data-Bridges
+
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
+
+ The version of the OpenAPI document: 2.0.0
+ Contact: wfp.economicanalysis@wfp.org
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
+
+
+import unittest
+import datetime
+
+from data_bridges_client.models.properties import Properties
+
+class TestProperties(unittest.TestCase):
+ """Properties unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def make_instance(self, include_optional) -> Properties:
+ """Test Properties
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `Properties`
+ """
+ model = Properties()
+ if include_optional:
+ return Properties(
+ name = ''
+ )
+ else:
+ return Properties(
+ )
+ """
+
+ def testProperties(self):
+ """Test Properties"""
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/test_rpme_api.py b/test/test_rpme_api.py
index ab13a86..a618e91 100644
--- a/test/test_rpme_api.py
+++ b/test/test_rpme_api.py
@@ -1,54 +1,71 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.rpme_api import RpmeApi # noqa: E501
+from data_bridges_client.api.rpme_api import RpmeApi
class TestRpmeApi(unittest.TestCase):
"""RpmeApi unit test stubs"""
- def setUp(self):
- self.api = RpmeApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = RpmeApi()
+
+ def tearDown(self) -> None:
+ pass
+
+ def test_rpme_base_data_get(self) -> None:
+ """Test case for rpme_base_data_get
- def tearDown(self):
+ Get data that includes the core RPME fields only by Survey ID
+ """
+ pass
+
+ def test_rpme_full_data_get(self) -> None:
+ """Test case for rpme_full_data_get
+
+ Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID.
+ """
pass
- def test_rpme_output_values_get(self):
+ def test_rpme_output_values_get(self) -> None:
"""Test case for rpme_output_values_get
- Processed values for each variable used in the assessments # noqa: E501
+ Processed values for each variable used in the assessments
"""
pass
- def test_rpme_surveys_get(self):
+ def test_rpme_surveys_get(self) -> None:
"""Test case for rpme_surveys_get
- Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey. # noqa: E501
+ Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey.
"""
pass
- def test_rpme_variables_get(self):
+ def test_rpme_variables_get(self) -> None:
"""Test case for rpme_variables_get
- List of variables # noqa: E501
+ List of variables
"""
pass
- def test_rpme_xls_forms_get(self):
+ def test_rpme_xls_forms_get(self) -> None:
"""Test case for rpme_xls_forms_get
- Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. # noqa: E501
+ Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
"""
pass
diff --git a/test/test_rpme_assessment.py b/test/test_rpme_assessment.py
index d5a654e..123482b 100644
--- a/test/test_rpme_assessment.py
+++ b/test/test_rpme_assessment.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.rpme_output_values import RpmeOutputValues
-globals()['RpmeOutputValues'] = RpmeOutputValues
-from data_bridges_client.model.rpme_assessment import RpmeAssessment
+import unittest
+import datetime
+from data_bridges_client.models.rpme_assessment import RpmeAssessment
class TestRpmeAssessment(unittest.TestCase):
"""RpmeAssessment unit test stubs"""
@@ -27,12 +27,50 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> RpmeAssessment:
+ """Test RpmeAssessment
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RpmeAssessment`
+ """
+ model = RpmeAssessment()
+ if include_optional:
+ return RpmeAssessment(
+ survey_id = 56,
+ assessment_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ shop_id = 56,
+ adm0_code = 56,
+ adm1_code = 56,
+ adm2_code = 56,
+ adm0_code_dots = '',
+ adm1_code_dots = '',
+ adm2_code_dots = '',
+ market_id = 56,
+ sh_latitude = 1.337,
+ sh_longitude = 1.337,
+ nb_beneficiaries_interviewed = 56,
+ price_score_tbu = True,
+ price_score_tbd = True,
+ beneficiaries_score_tbu = True,
+ trd_name = '',
+ sev_cntr_dev = '',
+ ben_sev_cntr_dev = '',
+ output_values = [
+ {
+ 'key' : null
+ }
+ ]
+ )
+ else:
+ return RpmeAssessment(
+ )
+ """
+
def testRpmeAssessment(self):
"""Test RpmeAssessment"""
- # FIXME: construct object with mandatory attributes with example values
- # model = RpmeAssessment() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_rpme_assessment_paged_result.py b/test/test_rpme_assessment_paged_result.py
index 4b7c49b..d6f251e 100644
--- a/test/test_rpme_assessment_paged_result.py
+++ b/test/test_rpme_assessment_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.rpme_assessment import RpmeAssessment
-globals()['RpmeAssessment'] = RpmeAssessment
-from data_bridges_client.model.rpme_assessment_paged_result import RpmeAssessmentPagedResult
+import unittest
+import datetime
+from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult
class TestRpmeAssessmentPagedResult(unittest.TestCase):
"""RpmeAssessmentPagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> RpmeAssessmentPagedResult:
+ """Test RpmeAssessmentPagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RpmeAssessmentPagedResult`
+ """
+ model = RpmeAssessmentPagedResult()
+ if include_optional:
+ return RpmeAssessmentPagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return RpmeAssessmentPagedResult(
+ )
+ """
+
def testRpmeAssessmentPagedResult(self):
"""Test RpmeAssessmentPagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = RpmeAssessmentPagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_rpme_output_values.py b/test/test_rpme_output_values.py
index 01334c1..7f6533f 100644
--- a/test/test_rpme_output_values.py
+++ b/test/test_rpme_output_values.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.rpme_output_values import RpmeOutputValues
+import unittest
+import datetime
+from data_bridges_client.models.rpme_output_values import RpmeOutputValues
class TestRpmeOutputValues(unittest.TestCase):
"""RpmeOutputValues unit test stubs"""
@@ -25,12 +27,28 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> RpmeOutputValues:
+ """Test RpmeOutputValues
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RpmeOutputValues`
+ """
+ model = RpmeOutputValues()
+ if include_optional:
+ return RpmeOutputValues(
+ variable_id = 56,
+ output_value = 1.337
+ )
+ else:
+ return RpmeOutputValues(
+ )
+ """
+
def testRpmeOutputValues(self):
"""Test RpmeOutputValues"""
- # FIXME: construct object with mandatory attributes with example values
- # model = RpmeOutputValues() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_rpme_variable.py b/test/test_rpme_variable.py
index 1c2e6f3..d15e257 100644
--- a/test/test_rpme_variable.py
+++ b/test/test_rpme_variable.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.rpme_variable import RpmeVariable
+import unittest
+import datetime
+from data_bridges_client.models.rpme_variable import RpmeVariable
class TestRpmeVariable(unittest.TestCase):
"""RpmeVariable unit test stubs"""
@@ -25,12 +27,35 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> RpmeVariable:
+ """Test RpmeVariable
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RpmeVariable`
+ """
+ model = RpmeVariable()
+ if include_optional:
+ return RpmeVariable(
+ variable_id = 56,
+ variable_name = '',
+ variable_description = '',
+ dimension_id = 56,
+ dimension_name = '',
+ level_id = 56,
+ level_name = '',
+ survey_mode_id = 56,
+ survey_mode_name = ''
+ )
+ else:
+ return RpmeVariable(
+ )
+ """
+
def testRpmeVariable(self):
"""Test RpmeVariable"""
- # FIXME: construct object with mandatory attributes with example values
- # model = RpmeVariable() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_rpme_variable_paged_result.py b/test/test_rpme_variable_paged_result.py
index 80a831c..189bd56 100644
--- a/test/test_rpme_variable_paged_result.py
+++ b/test/test_rpme_variable_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.rpme_variable import RpmeVariable
-globals()['RpmeVariable'] = RpmeVariable
-from data_bridges_client.model.rpme_variable_paged_result import RpmeVariablePagedResult
+import unittest
+import datetime
+from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult
class TestRpmeVariablePagedResult(unittest.TestCase):
"""RpmeVariablePagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> RpmeVariablePagedResult:
+ """Test RpmeVariablePagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `RpmeVariablePagedResult`
+ """
+ model = RpmeVariablePagedResult()
+ if include_optional:
+ return RpmeVariablePagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return RpmeVariablePagedResult(
+ )
+ """
+
def testRpmeVariablePagedResult(self):
"""Test RpmeVariablePagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = RpmeVariablePagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_survey_details_dto.py b/test/test_survey_details_dto.py
deleted file mode 100644
index 64f6913..0000000
--- a/test/test_survey_details_dto.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
- VAM-Data-Bridges
-
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
-
- The version of the OpenAPI document: 1.3.1
- Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
-
-
-import sys
-import unittest
-
-import data_bridges_client
-from data_bridges_client.model.survey_details_dto import SurveyDetailsDTO
-
-
-class TestSurveyDetailsDTO(unittest.TestCase):
- """SurveyDetailsDTO unit test stubs"""
-
- def setUp(self):
- pass
-
- def tearDown(self):
- pass
-
- def testSurveyDetailsDTO(self):
- """Test SurveyDetailsDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = SurveyDetailsDTO() # noqa: E501
- pass
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/test/test_survey_list_dto.py b/test/test_survey_list_dto.py
index 7ded759..005df1a 100644
--- a/test/test_survey_list_dto.py
+++ b/test/test_survey_list_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.survey_list_dto import SurveyListDTO
+import unittest
+import datetime
+from data_bridges_client.models.survey_list_dto import SurveyListDTO
class TestSurveyListDTO(unittest.TestCase):
"""SurveyListDTO unit test stubs"""
@@ -25,12 +27,41 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> SurveyListDTO:
+ """Test SurveyListDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `SurveyListDTO`
+ """
+ model = SurveyListDTO()
+ if include_optional:
+ return SurveyListDTO(
+ survey_id = 56,
+ survey_status_id = 56,
+ survey_start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ survey_end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ survey_create_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ survey_validation_report = '',
+ survey_original_filename = '',
+ xls_form_name = '',
+ base_xls_form_name = '',
+ country_name = '',
+ adm0_code = 56,
+ iso3_alpha3 = '',
+ user_name = '',
+ original_csv_file = '',
+ base_data = ''
+ )
+ else:
+ return SurveyListDTO(
+ )
+ """
+
def testSurveyListDTO(self):
"""Test SurveyListDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = SurveyListDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_surveys_api.py b/test/test_surveys_api.py
index b6bd4cc..e3c0f47 100644
--- a/test/test_surveys_api.py
+++ b/test/test_surveys_api.py
@@ -1,54 +1,57 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.surveys_api import SurveysApi # noqa: E501
+from data_bridges_client.api.surveys_api import SurveysApi
class TestSurveysApi(unittest.TestCase):
"""SurveysApi unit test stubs"""
- def setUp(self):
- self.api = SurveysApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = SurveysApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_m_fi_surveys_base_data_get(self):
+ def test_m_fi_surveys_base_data_get(self) -> None:
"""Test case for m_fi_surveys_base_data_get
- Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID # noqa: E501
+ Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID
"""
pass
- def test_m_fi_surveys_full_data_get(self):
+ def test_m_fi_surveys_full_data_get(self) -> None:
"""Test case for m_fi_surveys_full_data_get
- Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization. # noqa: E501
+ Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization.
"""
pass
- def test_m_fi_surveys_get(self):
+ def test_m_fi_surveys_get(self) -> None:
"""Test case for m_fi_surveys_get
- Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. # noqa: E501
+ Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey.
"""
pass
- def test_m_fi_surveys_processed_data_get(self):
+ def test_m_fi_surveys_processed_data_get(self) -> None:
"""Test case for m_fi_surveys_processed_data_get
- Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range # noqa: E501
+ Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range
"""
pass
diff --git a/test/test_usd_indirect_quotation.py b/test/test_usd_indirect_quotation.py
index f284b13..8a77a54 100644
--- a/test/test_usd_indirect_quotation.py
+++ b/test/test_usd_indirect_quotation.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.usd_indirect_quotation import UsdIndirectQuotation
+import unittest
+import datetime
+from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation
class TestUsdIndirectQuotation(unittest.TestCase):
"""UsdIndirectQuotation unit test stubs"""
@@ -25,12 +27,34 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> UsdIndirectQuotation:
+ """Test UsdIndirectQuotation
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UsdIndirectQuotation`
+ """
+ model = UsdIndirectQuotation()
+ if include_optional:
+ return UsdIndirectQuotation(
+ id = 56,
+ name = '',
+ adm0_code = 56,
+ country_iso3 = '',
+ is_official = True,
+ frequency = '',
+ value = 1.337,
+ var_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
+ )
+ else:
+ return UsdIndirectQuotation(
+ )
+ """
+
def testUsdIndirectQuotation(self):
"""Test UsdIndirectQuotation"""
- # FIXME: construct object with mandatory attributes with example values
- # model = UsdIndirectQuotation() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_usd_indirect_quotation_paged_result.py b/test/test_usd_indirect_quotation_paged_result.py
index 4351bc2..c0641f5 100644
--- a/test/test_usd_indirect_quotation_paged_result.py
+++ b/test/test_usd_indirect_quotation_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.usd_indirect_quotation import UsdIndirectQuotation
-globals()['UsdIndirectQuotation'] = UsdIndirectQuotation
-from data_bridges_client.model.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
+import unittest
+import datetime
+from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult
class TestUsdIndirectQuotationPagedResult(unittest.TestCase):
"""UsdIndirectQuotationPagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> UsdIndirectQuotationPagedResult:
+ """Test UsdIndirectQuotationPagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `UsdIndirectQuotationPagedResult`
+ """
+ model = UsdIndirectQuotationPagedResult()
+ if include_optional:
+ return UsdIndirectQuotationPagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return UsdIndirectQuotationPagedResult(
+ )
+ """
+
def testUsdIndirectQuotationPagedResult(self):
"""Test UsdIndirectQuotationPagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = UsdIndirectQuotationPagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_view_extended_aggregated_price.py b/test/test_view_extended_aggregated_price.py
index 9819c1b..df00eb7 100644
--- a/test/test_view_extended_aggregated_price.py
+++ b/test/test_view_extended_aggregated_price.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.view_extended_aggregated_price import ViewExtendedAggregatedPrice
+import unittest
+import datetime
+from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice
class TestViewExtendedAggregatedPrice(unittest.TestCase):
"""ViewExtendedAggregatedPrice unit test stubs"""
@@ -25,12 +27,48 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> ViewExtendedAggregatedPrice:
+ """Test ViewExtendedAggregatedPrice
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ViewExtendedAggregatedPrice`
+ """
+ model = ViewExtendedAggregatedPrice()
+ if include_optional:
+ return ViewExtendedAggregatedPrice(
+ commodity_id = 56,
+ market_id = 56,
+ price_type_id = 56,
+ commodity_unit_id = 56,
+ currency_id = 56,
+ adm0_code = 56,
+ commodity_date_week = 56,
+ commodity_date_month = 56,
+ commodity_date_year = 56,
+ commodity_price_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ commodity_name = '',
+ market_name = '',
+ price_type_name = '',
+ commodity_unit_name = '',
+ currency_name = '',
+ country_iso3 = '',
+ country_name = '',
+ commodity_price_source_name = '',
+ original_frequency = '',
+ commodity_price = 1.337,
+ commodity_price_observations = 56,
+ commodity_price_flag = ''
+ )
+ else:
+ return ViewExtendedAggregatedPrice(
+ )
+ """
+
def testViewExtendedAggregatedPrice(self):
"""Test ViewExtendedAggregatedPrice"""
- # FIXME: construct object with mandatory attributes with example values
- # model = ViewExtendedAggregatedPrice() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_view_extended_aggregated_price_paged_result.py b/test/test_view_extended_aggregated_price_paged_result.py
index 35d9999..7b56c15 100644
--- a/test/test_view_extended_aggregated_price_paged_result.py
+++ b/test/test_view_extended_aggregated_price_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.view_extended_aggregated_price import ViewExtendedAggregatedPrice
-globals()['ViewExtendedAggregatedPrice'] = ViewExtendedAggregatedPrice
-from data_bridges_client.model.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
+import unittest
+import datetime
+from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult
class TestViewExtendedAggregatedPricePagedResult(unittest.TestCase):
"""ViewExtendedAggregatedPricePagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> ViewExtendedAggregatedPricePagedResult:
+ """Test ViewExtendedAggregatedPricePagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ViewExtendedAggregatedPricePagedResult`
+ """
+ model = ViewExtendedAggregatedPricePagedResult()
+ if include_optional:
+ return ViewExtendedAggregatedPricePagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return ViewExtendedAggregatedPricePagedResult(
+ )
+ """
+
def testViewExtendedAggregatedPricePagedResult(self):
"""Test ViewExtendedAggregatedPricePagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = ViewExtendedAggregatedPricePagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_view_extended_alps_value.py b/test/test_view_extended_alps_value.py
index 8ab90df..5202c2f 100644
--- a/test/test_view_extended_alps_value.py
+++ b/test/test_view_extended_alps_value.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.view_extended_alps_value import ViewExtendedAlpsValue
+import unittest
+import datetime
+from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue
class TestViewExtendedAlpsValue(unittest.TestCase):
"""ViewExtendedAlpsValue unit test stubs"""
@@ -25,12 +27,45 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> ViewExtendedAlpsValue:
+ """Test ViewExtendedAlpsValue
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ViewExtendedAlpsValue`
+ """
+ model = ViewExtendedAlpsValue()
+ if include_optional:
+ return ViewExtendedAlpsValue(
+ commodity_id = 56,
+ market_id = 56,
+ price_type_id = 56,
+ commodity_unit_id = 56,
+ currency_id = 56,
+ adm0_code = 56,
+ country_name = '',
+ commodity_price_date_year = 56,
+ commodity_price_date_month = 56,
+ commodity_price_date_week = 56,
+ commodity_price_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ commodity_name = '',
+ market_name = '',
+ price_type_name = '',
+ commodity_unit_name = '',
+ currency_name = '',
+ analysis_value_estimated_price = 1.337,
+ analysis_value_pewi_value = 1.337,
+ analysis_value_price_flag = ''
+ )
+ else:
+ return ViewExtendedAlpsValue(
+ )
+ """
+
def testViewExtendedAlpsValue(self):
"""Test ViewExtendedAlpsValue"""
- # FIXME: construct object with mandatory attributes with example values
- # model = ViewExtendedAlpsValue() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_view_extended_alps_value_paged_result.py b/test/test_view_extended_alps_value_paged_result.py
index b95ab54..2e7ca84 100644
--- a/test/test_view_extended_alps_value_paged_result.py
+++ b/test/test_view_extended_alps_value_paged_result.py
@@ -1,22 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.view_extended_alps_value import ViewExtendedAlpsValue
-globals()['ViewExtendedAlpsValue'] = ViewExtendedAlpsValue
-from data_bridges_client.model.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
+import unittest
+import datetime
+from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult
class TestViewExtendedAlpsValuePagedResult(unittest.TestCase):
"""ViewExtendedAlpsValuePagedResult unit test stubs"""
@@ -27,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> ViewExtendedAlpsValuePagedResult:
+ """Test ViewExtendedAlpsValuePagedResult
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `ViewExtendedAlpsValuePagedResult`
+ """
+ model = ViewExtendedAlpsValuePagedResult()
+ if include_optional:
+ return ViewExtendedAlpsValuePagedResult(
+ items = [
+ {
+ 'key' : null
+ }
+ ],
+ page = 56,
+ total_items = 56
+ )
+ else:
+ return ViewExtendedAlpsValuePagedResult(
+ )
+ """
+
def testViewExtendedAlpsValuePagedResult(self):
"""Test ViewExtendedAlpsValuePagedResult"""
- # FIXME: construct object with mandatory attributes with example values
- # model = ViewExtendedAlpsValuePagedResult() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_weekly_aggregated_price.py b/test/test_weekly_aggregated_price.py
index 01f0a4a..45bc176 100644
--- a/test/test_weekly_aggregated_price.py
+++ b/test/test_weekly_aggregated_price.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.weekly_aggregated_price import WeeklyAggregatedPrice
+import unittest
+import datetime
+from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice
class TestWeeklyAggregatedPrice(unittest.TestCase):
"""WeeklyAggregatedPrice unit test stubs"""
@@ -25,12 +27,47 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> WeeklyAggregatedPrice:
+ """Test WeeklyAggregatedPrice
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `WeeklyAggregatedPrice`
+ """
+ model = WeeklyAggregatedPrice()
+ if include_optional:
+ return WeeklyAggregatedPrice(
+ commodity_id = 56,
+ market_id = 56,
+ price_type_id = 56,
+ commodity_unit_id = 56,
+ currency_id = 56,
+ commodity_name = '',
+ market_name = '',
+ price_type_name = '',
+ commodity_unit_name = '',
+ currency_name = '',
+ adm0_code = 56,
+ country_iso3 = '',
+ country_name = '',
+ commodity_price = 1.337,
+ original_frequency = '',
+ commodity_price_source_name = '',
+ commodity_price_observations = 56,
+ commodity_date_month = 56,
+ commodity_date_year = 56,
+ commodity_price_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ commodity_price_flag = ''
+ )
+ else:
+ return WeeklyAggregatedPrice(
+ )
+ """
+
def testWeeklyAggregatedPrice(self):
"""Test WeeklyAggregatedPrice"""
- # FIXME: construct object with mandatory attributes with example values
- # model = WeeklyAggregatedPrice() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_xls_form_definition_dto.py b/test/test_xls_form_definition_dto.py
index 7e15408..024f109 100644
--- a/test/test_xls_form_definition_dto.py
+++ b/test/test_xls_form_definition_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.xls_form_definition_dto import XlsFormDefinitionDTO
+import unittest
+import datetime
+from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO
class TestXlsFormDefinitionDTO(unittest.TestCase):
"""XlsFormDefinitionDTO unit test stubs"""
@@ -25,12 +27,31 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> XlsFormDefinitionDTO:
+ """Test XlsFormDefinitionDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `XlsFormDefinitionDTO`
+ """
+ model = XlsFormDefinitionDTO()
+ if include_optional:
+ return XlsFormDefinitionDTO(
+ xls_form_field_name = '',
+ xls_form_field_label = '',
+ xls_form_field_row = 56,
+ xls_form_field_type = '',
+ xls_form_list_id = 56
+ )
+ else:
+ return XlsFormDefinitionDTO(
+ )
+ """
+
def testXlsFormDefinitionDTO(self):
"""Test XlsFormDefinitionDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = XlsFormDefinitionDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_xls_form_dto.py b/test/test_xls_form_dto.py
index 3dbd0df..f0f7694 100644
--- a/test/test_xls_form_dto.py
+++ b/test/test_xls_form_dto.py
@@ -1,20 +1,22 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+ Do not edit the class manually.
+""" # noqa: E501
-import sys
-import unittest
-import data_bridges_client
-from data_bridges_client.model.xls_form_dto import XlsFormDTO
+import unittest
+import datetime
+from data_bridges_client.models.xls_form_dto import XlsFormDTO
class TestXlsFormDTO(unittest.TestCase):
"""XlsFormDTO unit test stubs"""
@@ -25,12 +27,33 @@ def setUp(self):
def tearDown(self):
pass
+ def make_instance(self, include_optional) -> XlsFormDTO:
+ """Test XlsFormDTO
+ include_option is a boolean, when False only required
+ params are included, when True both required and
+ optional params are included """
+ # uncomment below to create an instance of `XlsFormDTO`
+ """
+ model = XlsFormDTO()
+ if include_optional:
+ return XlsFormDTO(
+ xls_form_id = 56,
+ xls_form_name = '',
+ xls_form_create_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'),
+ user_name = '',
+ xls_form_source_file = '',
+ xls_form_is_base_schema = True,
+ adm0_code = 56
+ )
+ else:
+ return XlsFormDTO(
+ )
+ """
+
def testXlsFormDTO(self):
"""Test XlsFormDTO"""
- # FIXME: construct object with mandatory attributes with example values
- # model = XlsFormDTO() # noqa: E501
- pass
-
+ # inst_req_only = self.make_instance(include_optional=False)
+ # inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_xls_forms_api.py b/test/test_xls_forms_api.py
index b0b3616..58edb39 100644
--- a/test/test_xls_forms_api.py
+++ b/test/test_xls_forms_api.py
@@ -1,40 +1,43 @@
+# coding: utf-8
+
"""
VAM-Data-Bridges
- API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern # noqa: E501
+ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern
- The version of the OpenAPI document: 1.3.1
+ The version of the OpenAPI document: 2.0.0
Contact: wfp.economicanalysis@wfp.org
- Generated by: https://openapi-generator.tech
-"""
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
import unittest
-import data_bridges_client
-from data_bridges_client.api.xls_forms_api import XlsFormsApi # noqa: E501
+from data_bridges_client.api.xls_forms_api import XlsFormsApi
class TestXlsFormsApi(unittest.TestCase):
"""XlsFormsApi unit test stubs"""
- def setUp(self):
- self.api = XlsFormsApi() # noqa: E501
+ def setUp(self) -> None:
+ self.api = XlsFormsApi()
- def tearDown(self):
+ def tearDown(self) -> None:
pass
- def test_m_fi_xls_forms_definition_get(self):
+ def test_m_fi_xls_forms_definition_get(self) -> None:
"""Test case for m_fi_xls_forms_definition_get
- Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. # noqa: E501
+ Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise.
"""
pass
- def test_m_fi_xls_forms_get(self):
+ def test_m_fi_xls_forms_get(self) -> None:
"""Test case for m_fi_xls_forms_get
- Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. # noqa: E501
+ Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise.
"""
pass