36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/models/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | # import all models into this package
4 | # if you have many models here with many references from one model to another this may
5 | # raise a RecursionError
6 | # to avoid this, import only the models that you directly need like:
7 | # from from deutschland.travelwarning.model.pet import Pet
8 | # or import this package, but before doing it, use:
9 | # import sys
10 | # sys.setrecursionlimit(n)
11 |
12 | from deutschland.travelwarning.model.adress_liste import AdressListe
13 | from deutschland.travelwarning.model.adresse import Adresse
14 | from deutschland.travelwarning.model.artikel import Artikel
15 | from deutschland.travelwarning.model.download import Download
16 | from deutschland.travelwarning.model.reisewarnung import Reisewarnung
17 | from deutschland.travelwarning.model.reisewarnung_zusammenfassung import (
18 | ReisewarnungZusammenfassung,
19 | )
20 | from deutschland.travelwarning.model.response_address import ResponseAddress
21 | from deutschland.travelwarning.model.response_address_response import (
22 | ResponseAddressResponse,
23 | )
24 | from deutschland.travelwarning.model.response_artikel import ResponseArtikel
25 | from deutschland.travelwarning.model.response_artikel_response import (
26 | ResponseArtikelResponse,
27 | )
28 | from deutschland.travelwarning.model.response_download import ResponseDownload
29 | from deutschland.travelwarning.model.response_download_response import (
30 | ResponseDownloadResponse,
31 | )
32 | from deutschland.travelwarning.model.response_warning import ResponseWarning
33 | from deutschland.travelwarning.model.response_warning_response import (
34 | ResponseWarningResponse,
35 | )
36 | from deutschland.travelwarning.model.response_warnings import ResponseWarnings
37 | from deutschland.travelwarning.model.response_warnings_response import (
38 | ResponseWarningsResponse,
39 | )
40 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/bundesAPI/travelwarning-api/actions/workflows/openapi_check.yaml)
2 |
3 | # Auswärtiges Amt OpenData Schnittstelle
4 |
5 | Enthält die [Beschreibung](https://travelwarning.api.bund.dev/index.html) für die Schnittstelle zum Zugriff auf die Daten
6 | des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der
7 | [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative.
8 |
9 | ## Deaktivierung
10 |
11 | Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben.
12 |
13 | ## Fehlerfall
14 |
15 | Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben.
16 |
17 | ## Nutzungsbedingungen
18 |
19 | Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118)
20 | des Auswärtigen Amtes zu finden.
21 |
22 | ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916)
23 |
24 | ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022)
25 |
26 | Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt.
27 |
28 | ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021)
29 |
30 | Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben.
31 |
32 | Die Länderkürzel werden bei [`/travelwarning`](https://travelwarning.api.bund.dev/#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](https://travelwarning.api.bund.dev/#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124).
33 |
34 | ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021)
35 |
36 | `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](https://travelwarning.api.bund.dev/#operations-default-getTravelwarning)
37 | entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](https://travelwarning.api.bund.dev/#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen
38 |
39 | `flagURL` (-> Flaggen der Länder) wurde entfernt.
40 |
--------------------------------------------------------------------------------
/python-client/.openapi-generator/FILES:
--------------------------------------------------------------------------------
1 | .gitignore
2 | .gitlab-ci.yml
3 | .openapi-generator-ignore
4 | .travis.yml
5 | README.md
6 | create_doc.py
7 | docs/AdressListe.md
8 | docs/Adresse.md
9 | docs/Artikel.md
10 | docs/DefaultApi.md
11 | docs/Download.md
12 | docs/Reisewarnung.md
13 | docs/ReisewarnungZusammenfassung.md
14 | docs/ResponseAddress.md
15 | docs/ResponseAddressResponse.md
16 | docs/ResponseArtikel.md
17 | docs/ResponseArtikelResponse.md
18 | docs/ResponseDownload.md
19 | docs/ResponseDownloadResponse.md
20 | docs/ResponseWarning.md
21 | docs/ResponseWarningResponse.md
22 | docs/ResponseWarnings.md
23 | docs/ResponseWarningsResponse.md
24 | git_push.sh
25 | pyproject.toml
26 | rename_generated_code.py
27 | requirements.txt
28 | requirements.txt
29 | setup.cfg
30 | setup.py
31 | test-requirements.txt
32 | test/__init__.py
33 | test/test_adress_liste.py
34 | test/test_adresse.py
35 | test/test_artikel.py
36 | test/test_default_api.py
37 | test/test_download.py
38 | test/test_reisewarnung.py
39 | test/test_reisewarnung_zusammenfassung.py
40 | test/test_response_address.py
41 | test/test_response_address_response.py
42 | test/test_response_artikel.py
43 | test/test_response_artikel_response.py
44 | test/test_response_download.py
45 | test/test_response_download_response.py
46 | test/test_response_warning.py
47 | test/test_response_warning_response.py
48 | test/test_response_warnings.py
49 | test/test_response_warnings_response.py
50 | tox.ini
51 | travelwarning/__init__.py
52 | travelwarning/api/__init__.py
53 | travelwarning/api/default_api.py
54 | travelwarning/api_client.py
55 | travelwarning/apis/__init__.py
56 | travelwarning/configuration.py
57 | travelwarning/exceptions.py
58 | travelwarning/model/__init__.py
59 | travelwarning/model/adress_liste.py
60 | travelwarning/model/adresse.py
61 | travelwarning/model/artikel.py
62 | travelwarning/model/download.py
63 | travelwarning/model/reisewarnung.py
64 | travelwarning/model/reisewarnung_zusammenfassung.py
65 | travelwarning/model/response_address.py
66 | travelwarning/model/response_address_response.py
67 | travelwarning/model/response_artikel.py
68 | travelwarning/model/response_artikel_response.py
69 | travelwarning/model/response_download.py
70 | travelwarning/model/response_download_response.py
71 | travelwarning/model/response_warning.py
72 | travelwarning/model/response_warning_response.py
73 | travelwarning/model/response_warnings.py
74 | travelwarning/model/response_warnings_response.py
75 | travelwarning/model_utils.py
76 | travelwarning/models/__init__.py
77 | travelwarning/rest.py
78 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/__init__.py:
--------------------------------------------------------------------------------
1 | # flake8: noqa
2 |
3 | """
4 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
5 |
6 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
7 |
8 | The version of the OpenAPI document: 1.2.6
9 | Contact: kontakt@bund.dev
10 | Generated by: https://openapi-generator.tech
11 | """
12 |
13 |
14 | __version__ = "0.1.0"
15 |
16 | # import ApiClient
17 | from deutschland.travelwarning.api_client import ApiClient
18 |
19 | # import Configuration
20 | from deutschland.travelwarning.configuration import Configuration
21 |
22 | # import exceptions
23 | from deutschland.travelwarning.exceptions import (
24 | ApiAttributeError,
25 | ApiException,
26 | ApiKeyError,
27 | ApiTypeError,
28 | ApiValueError,
29 | OpenApiException,
30 | )
31 |
--------------------------------------------------------------------------------
/python-client/test/test_adresse.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.adresse import Adresse
16 |
17 | from deutschland import travelwarning
18 |
19 |
20 | class TestAdresse(unittest.TestCase):
21 | """Adresse unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testAdresse(self):
30 | """Test Adresse"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = Adresse() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_artikel.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.artikel import Artikel
16 |
17 | from deutschland import travelwarning
18 |
19 |
20 | class TestArtikel(unittest.TestCase):
21 | """Artikel unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testArtikel(self):
30 | """Test Artikel"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = Artikel() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_download.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.download import Download
16 |
17 | from deutschland import travelwarning
18 |
19 |
20 | class TestDownload(unittest.TestCase):
21 | """Download unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testDownload(self):
30 | """Test Download"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = Download() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_reisewarnung.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.reisewarnung import Reisewarnung
16 |
17 | from deutschland import travelwarning
18 |
19 |
20 | class TestReisewarnung(unittest.TestCase):
21 | """Reisewarnung unit test stubs"""
22 |
23 | def setUp(self):
24 | pass
25 |
26 | def tearDown(self):
27 | pass
28 |
29 | def testReisewarnung(self):
30 | """Test Reisewarnung"""
31 | # FIXME: construct object with mandatory attributes with example values
32 | # model = Reisewarnung() # noqa: E501
33 | pass
34 |
35 |
36 | if __name__ == "__main__":
37 | unittest.main()
38 |
--------------------------------------------------------------------------------
/python-client/test/test_adress_liste.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.adresse import Adresse
16 |
17 | from deutschland import travelwarning
18 |
19 | globals()["Adresse"] = Adresse
20 | from deutschland.travelwarning.model.adress_liste import AdressListe
21 |
22 |
23 | class TestAdressListe(unittest.TestCase):
24 | """AdressListe unit test stubs"""
25 |
26 | def setUp(self):
27 | pass
28 |
29 | def tearDown(self):
30 | pass
31 |
32 | def testAdressListe(self):
33 | """Test AdressListe"""
34 | # FIXME: construct object with mandatory attributes with example values
35 | # model = AdressListe() # noqa: E501
36 | pass
37 |
38 |
39 | if __name__ == "__main__":
40 | unittest.main()
41 |
--------------------------------------------------------------------------------
/python-client/test/test_reisewarnung_zusammenfassung.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.reisewarnung_zusammenfassung import (
16 | ReisewarnungZusammenfassung,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 |
22 | class TestReisewarnungZusammenfassung(unittest.TestCase):
23 | """ReisewarnungZusammenfassung unit test stubs"""
24 |
25 | def setUp(self):
26 | pass
27 |
28 | def tearDown(self):
29 | pass
30 |
31 | def testReisewarnungZusammenfassung(self):
32 | """Test ReisewarnungZusammenfassung"""
33 | # FIXME: construct object with mandatory attributes with example values
34 | # model = ReisewarnungZusammenfassung() # noqa: E501
35 | pass
36 |
37 |
38 | if __name__ == "__main__":
39 | unittest.main()
40 |
--------------------------------------------------------------------------------
/python-client/test/test_response_address.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.response_address_response import (
16 | ResponseAddressResponse,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 | globals()["ResponseAddressResponse"] = ResponseAddressResponse
22 | from deutschland.travelwarning.model.response_address import ResponseAddress
23 |
24 |
25 | class TestResponseAddress(unittest.TestCase):
26 | """ResponseAddress unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseAddress(self):
35 | """Test ResponseAddress"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseAddress() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_artikel.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.response_artikel_response import (
16 | ResponseArtikelResponse,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 | globals()["ResponseArtikelResponse"] = ResponseArtikelResponse
22 | from deutschland.travelwarning.model.response_artikel import ResponseArtikel
23 |
24 |
25 | class TestResponseArtikel(unittest.TestCase):
26 | """ResponseArtikel unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseArtikel(self):
35 | """Test ResponseArtikel"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseArtikel() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_artikel_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.artikel import Artikel
16 |
17 | from deutschland import travelwarning
18 |
19 | globals()["Artikel"] = Artikel
20 | from deutschland.travelwarning.model.response_artikel_response import (
21 | ResponseArtikelResponse,
22 | )
23 |
24 |
25 | class TestResponseArtikelResponse(unittest.TestCase):
26 | """ResponseArtikelResponse unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseArtikelResponse(self):
35 | """Test ResponseArtikelResponse"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseArtikelResponse() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_warning.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.response_warning_response import (
16 | ResponseWarningResponse,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 | globals()["ResponseWarningResponse"] = ResponseWarningResponse
22 | from deutschland.travelwarning.model.response_warning import ResponseWarning
23 |
24 |
25 | class TestResponseWarning(unittest.TestCase):
26 | """ResponseWarning unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseWarning(self):
35 | """Test ResponseWarning"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseWarning() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_download.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.response_download_response import (
16 | ResponseDownloadResponse,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 | globals()["ResponseDownloadResponse"] = ResponseDownloadResponse
22 | from deutschland.travelwarning.model.response_download import ResponseDownload
23 |
24 |
25 | class TestResponseDownload(unittest.TestCase):
26 | """ResponseDownload unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseDownload(self):
35 | """Test ResponseDownload"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseDownload() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_download_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.download import Download
16 |
17 | from deutschland import travelwarning
18 |
19 | globals()["Download"] = Download
20 | from deutschland.travelwarning.model.response_download_response import (
21 | ResponseDownloadResponse,
22 | )
23 |
24 |
25 | class TestResponseDownloadResponse(unittest.TestCase):
26 | """ResponseDownloadResponse unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseDownloadResponse(self):
35 | """Test ResponseDownloadResponse"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseDownloadResponse() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_warnings.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.response_warnings_response import (
16 | ResponseWarningsResponse,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 | globals()["ResponseWarningsResponse"] = ResponseWarningsResponse
22 | from deutschland.travelwarning.model.response_warnings import ResponseWarnings
23 |
24 |
25 | class TestResponseWarnings(unittest.TestCase):
26 | """ResponseWarnings unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseWarnings(self):
35 | """Test ResponseWarnings"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseWarnings() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_address_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.adress_liste import AdressListe
16 |
17 | from deutschland import travelwarning
18 |
19 | globals()["AdressListe"] = AdressListe
20 | from deutschland.travelwarning.model.response_address_response import (
21 | ResponseAddressResponse,
22 | )
23 |
24 |
25 | class TestResponseAddressResponse(unittest.TestCase):
26 | """ResponseAddressResponse unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseAddressResponse(self):
35 | """Test ResponseAddressResponse"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseAddressResponse() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_warning_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.reisewarnung import Reisewarnung
16 |
17 | from deutschland import travelwarning
18 |
19 | globals()["Reisewarnung"] = Reisewarnung
20 | from deutschland.travelwarning.model.response_warning_response import (
21 | ResponseWarningResponse,
22 | )
23 |
24 |
25 | class TestResponseWarningResponse(unittest.TestCase):
26 | """ResponseWarningResponse unit test stubs"""
27 |
28 | def setUp(self):
29 | pass
30 |
31 | def tearDown(self):
32 | pass
33 |
34 | def testResponseWarningResponse(self):
35 | """Test ResponseWarningResponse"""
36 | # FIXME: construct object with mandatory attributes with example values
37 | # model = ResponseWarningResponse() # noqa: E501
38 | pass
39 |
40 |
41 | if __name__ == "__main__":
42 | unittest.main()
43 |
--------------------------------------------------------------------------------
/python-client/test/test_response_warnings_response.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import sys
13 | import unittest
14 |
15 | from deutschland.travelwarning.model.reisewarnung_zusammenfassung import (
16 | ReisewarnungZusammenfassung,
17 | )
18 |
19 | from deutschland import travelwarning
20 |
21 | globals()["ReisewarnungZusammenfassung"] = ReisewarnungZusammenfassung
22 | from deutschland.travelwarning.model.response_warnings_response import (
23 | ResponseWarningsResponse,
24 | )
25 |
26 |
27 | class TestResponseWarningsResponse(unittest.TestCase):
28 | """ResponseWarningsResponse unit test stubs"""
29 |
30 | def setUp(self):
31 | pass
32 |
33 | def tearDown(self):
34 | pass
35 |
36 | def testResponseWarningsResponse(self):
37 | """Test ResponseWarningsResponse"""
38 | # FIXME: construct object with mandatory attributes with example values
39 | # model = ResponseWarningsResponse() # noqa: E501
40 | pass
41 |
42 |
43 | if __name__ == "__main__":
44 | unittest.main()
45 |
--------------------------------------------------------------------------------
/python-client/test/test_default_api.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import unittest
13 |
14 | from deutschland.travelwarning.api.default_api import DefaultApi # noqa: E501
15 |
16 | from deutschland import travelwarning
17 |
18 |
19 | class TestDefaultApi(unittest.TestCase):
20 | """DefaultApi unit test stubs"""
21 |
22 | def setUp(self):
23 | self.api = DefaultApi() # noqa: E501
24 |
25 | def tearDown(self):
26 | pass
27 |
28 | def test_get_healthcare(self):
29 | """Test case for get_healthcare
30 |
31 | Gibt die Merkblätter des Gesundheitsdienstes zurück # noqa: E501
32 | """
33 | pass
34 |
35 | def test_get_representatives_country(self):
36 | """Test case for get_representatives_country
37 |
38 | Gibt eine Liste der deutschen Vertretungen im Ausland zurück # noqa: E501
39 | """
40 | pass
41 |
42 | def test_get_representatives_germany(self):
43 | """Test case for get_representatives_germany
44 |
45 | Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück # noqa: E501
46 | """
47 | pass
48 |
49 | def test_get_single_travelwarning(self):
50 | """Test case for get_single_travelwarning
51 |
52 | Gibt einen Reise- und Sicherheitshinweis zurück # noqa: E501
53 | """
54 | pass
55 |
56 | def test_get_state_names(self):
57 | """Test case for get_state_names
58 |
59 | Gibt das Verzeichnis der Staatennamen zurück # noqa: E501
60 | """
61 | pass
62 |
63 | def test_get_travelwarning(self):
64 | """Test case for get_travelwarning
65 |
66 | Gibt alle Reise- und Sicherheitshinweise zurück # noqa: E501
67 | """
68 | pass
69 |
70 |
71 | if __name__ == "__main__":
72 | unittest.main()
73 |
--------------------------------------------------------------------------------
/python-client/sphinx-docs/source/travelwarning.model.rst:
--------------------------------------------------------------------------------
1 | travelwarning.model package
2 | ===========================
3 |
4 | Submodules
5 | ----------
6 |
7 | travelwarning.model.adress\_liste module
8 | ----------------------------------------
9 |
10 | .. automodule:: travelwarning.model.adress_liste
11 | :members:
12 | :undoc-members:
13 | :show-inheritance:
14 |
15 | travelwarning.model.adresse module
16 | ----------------------------------
17 |
18 | .. automodule:: travelwarning.model.adresse
19 | :members:
20 | :undoc-members:
21 | :show-inheritance:
22 |
23 | travelwarning.model.artikel module
24 | ----------------------------------
25 |
26 | .. automodule:: travelwarning.model.artikel
27 | :members:
28 | :undoc-members:
29 | :show-inheritance:
30 |
31 | travelwarning.model.download module
32 | -----------------------------------
33 |
34 | .. automodule:: travelwarning.model.download
35 | :members:
36 | :undoc-members:
37 | :show-inheritance:
38 |
39 | travelwarning.model.reisewarnung module
40 | ---------------------------------------
41 |
42 | .. automodule:: travelwarning.model.reisewarnung
43 | :members:
44 | :undoc-members:
45 | :show-inheritance:
46 |
47 | travelwarning.model.reisewarnung\_zusammenfassung module
48 | --------------------------------------------------------
49 |
50 | .. automodule:: travelwarning.model.reisewarnung_zusammenfassung
51 | :members:
52 | :undoc-members:
53 | :show-inheritance:
54 |
55 | travelwarning.model.response\_address module
56 | --------------------------------------------
57 |
58 | .. automodule:: travelwarning.model.response_address
59 | :members:
60 | :undoc-members:
61 | :show-inheritance:
62 |
63 | travelwarning.model.response\_address\_response module
64 | ------------------------------------------------------
65 |
66 | .. automodule:: travelwarning.model.response_address_response
67 | :members:
68 | :undoc-members:
69 | :show-inheritance:
70 |
71 | travelwarning.model.response\_artikel module
72 | --------------------------------------------
73 |
74 | .. automodule:: travelwarning.model.response_artikel
75 | :members:
76 | :undoc-members:
77 | :show-inheritance:
78 |
79 | travelwarning.model.response\_artikel\_response module
80 | ------------------------------------------------------
81 |
82 | .. automodule:: travelwarning.model.response_artikel_response
83 | :members:
84 | :undoc-members:
85 | :show-inheritance:
86 |
87 | travelwarning.model.response\_download module
88 | ---------------------------------------------
89 |
90 | .. automodule:: travelwarning.model.response_download
91 | :members:
92 | :undoc-members:
93 | :show-inheritance:
94 |
95 | travelwarning.model.response\_download\_response module
96 | -------------------------------------------------------
97 |
98 | .. automodule:: travelwarning.model.response_download_response
99 | :members:
100 | :undoc-members:
101 | :show-inheritance:
102 |
103 | travelwarning.model.response\_warning module
104 | --------------------------------------------
105 |
106 | .. automodule:: travelwarning.model.response_warning
107 | :members:
108 | :undoc-members:
109 | :show-inheritance:
110 |
111 | travelwarning.model.response\_warning\_response module
112 | ------------------------------------------------------
113 |
114 | .. automodule:: travelwarning.model.response_warning_response
115 | :members:
116 | :undoc-members:
117 | :show-inheritance:
118 |
119 | travelwarning.model.response\_warnings module
120 | ---------------------------------------------
121 |
122 | .. automodule:: travelwarning.model.response_warnings
123 | :members:
124 | :undoc-members:
125 | :show-inheritance:
126 |
127 | travelwarning.model.response\_warnings\_response module
128 | -------------------------------------------------------
129 |
130 | .. automodule:: travelwarning.model.response_warnings_response
131 | :members:
132 | :undoc-members:
133 | :show-inheritance:
134 |
135 | Module contents
136 | ---------------
137 |
138 | .. automodule:: travelwarning.model
139 | :members:
140 | :undoc-members:
141 | :show-inheritance:
142 |
--------------------------------------------------------------------------------
/python-client/README.md:
--------------------------------------------------------------------------------
1 | # travelwarning
2 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative.
3 | ## Deaktivierung
4 | Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben.
5 | ## Fehlerfall
6 | Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben.
7 | ## Nutzungsbedingungen
8 | Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118)
9 | des Auswärtigen Amtes zu finden.
10 |
11 | ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916)
12 | ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022)
13 | Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt.
14 | ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021)
15 | Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben.
16 | Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124).
17 | ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021)
18 | `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen
19 | `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten
20 |
21 | This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
22 |
23 | - API version: 1.2.6
24 | - Package version: 0.1.0
25 | - Build package: org.openapitools.codegen.languages.PythonClientCodegen
26 |
27 | ## Requirements.
28 |
29 | Python >= 3.6
30 |
31 | ## Installation & Usage
32 | ### pip install
33 |
34 | ```sh
35 | pip install deutschland[travelwarning]
36 | ```
37 |
38 | ### poetry install
39 |
40 | ```sh
41 | poetry add deutschland -E travelwarning
42 | ```
43 |
44 | ### Setuptools
45 |
46 | Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
47 |
48 | ```sh
49 | python setup.py install --user
50 | ```
51 | (or `sudo python setup.py install` to install the package for all users)
52 |
53 | ## Usage
54 |
55 | Import the package:
56 | ```python
57 | from deutschland import travelwarning
58 | ```
59 |
60 | ## Getting Started
61 |
62 | Please follow the [installation procedure](#installation--usage) and then run the following:
63 |
64 | ```python
65 |
66 | import time
67 | from deutschland import travelwarning
68 | from pprint import pprint
69 | from deutschland.travelwarning.api import default_api
70 | from deutschland.travelwarning.model.response_address import ResponseAddress
71 | from deutschland.travelwarning.model.response_download import ResponseDownload
72 | from deutschland.travelwarning.model.response_warning import ResponseWarning
73 | from deutschland.travelwarning.model.response_warnings import ResponseWarnings
74 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
75 | # See configuration.py for a list of all supported configuration parameters.
76 | configuration = travelwarning.Configuration(
77 | host = "https://www.auswaertiges-amt.de/opendata"
78 | )
79 |
80 |
81 |
82 | # Enter a context with an instance of the API client
83 | with travelwarning.ApiClient(configuration) as api_client:
84 | # Create an instance of the API class
85 | api_instance = default_api.DefaultApi(api_client)
86 |
87 | try:
88 | # Gibt die Merkblätter des Gesundheitsdienstes zurück
89 | api_response = api_instance.get_healthcare()
90 | pprint(api_response)
91 | except travelwarning.ApiException as e:
92 | print("Exception when calling DefaultApi->get_healthcare: %s\n" % e)
93 | ```
94 |
95 | ## Documentation for API Endpoints
96 |
97 | All URIs are relative to *https://www.auswaertiges-amt.de/opendata*
98 |
99 | Class | Method | HTTP request | Description
100 | ------------ | ------------- | ------------- | -------------
101 | *DefaultApi* | [**get_healthcare**](docs/DefaultApi.md#get_healthcare) | **GET** /healthcare | Gibt die Merkblätter des Gesundheitsdienstes zurück
102 | *DefaultApi* | [**get_representatives_country**](docs/DefaultApi.md#get_representatives_country) | **GET** /representativesInCountry | Gibt eine Liste der deutschen Vertretungen im Ausland zurück
103 | *DefaultApi* | [**get_representatives_germany**](docs/DefaultApi.md#get_representatives_germany) | **GET** /representativesInGermany | Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück
104 | *DefaultApi* | [**get_single_travelwarning**](docs/DefaultApi.md#get_single_travelwarning) | **GET** /travelwarning/{contentId} | Gibt einen Reise- und Sicherheitshinweis zurück
105 | *DefaultApi* | [**get_state_names**](docs/DefaultApi.md#get_state_names) | **GET** /stateNames | Gibt das Verzeichnis der Staatennamen zurück
106 | *DefaultApi* | [**get_travelwarning**](docs/DefaultApi.md#get_travelwarning) | **GET** /travelwarning | Gibt alle Reise- und Sicherheitshinweise zurück
107 |
108 |
109 | ## Documentation For Models
110 |
111 | - [AdressListe](docs/AdressListe.md)
112 | - [Adresse](docs/Adresse.md)
113 | - [Artikel](docs/Artikel.md)
114 | - [Download](docs/Download.md)
115 | - [Reisewarnung](docs/Reisewarnung.md)
116 | - [ReisewarnungZusammenfassung](docs/ReisewarnungZusammenfassung.md)
117 | - [ResponseAddress](docs/ResponseAddress.md)
118 | - [ResponseAddressResponse](docs/ResponseAddressResponse.md)
119 | - [ResponseArtikel](docs/ResponseArtikel.md)
120 | - [ResponseArtikelResponse](docs/ResponseArtikelResponse.md)
121 | - [ResponseDownload](docs/ResponseDownload.md)
122 | - [ResponseDownloadResponse](docs/ResponseDownloadResponse.md)
123 | - [ResponseWarning](docs/ResponseWarning.md)
124 | - [ResponseWarningResponse](docs/ResponseWarningResponse.md)
125 | - [ResponseWarnings](docs/ResponseWarnings.md)
126 | - [ResponseWarningsResponse](docs/ResponseWarningsResponse.md)
127 |
128 |
129 | ## Documentation For Authorization
130 |
131 | All endpoints do not require authorization.
132 |
133 | ## Author
134 |
135 | kontakt@bund.dev
136 |
137 |
138 | ## Notes for Large OpenAPI documents
139 | If the OpenAPI document is large, imports in travelwarning.apis and travelwarning.models may fail with a
140 | RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
141 |
142 | Solution 1:
143 | Use specific imports for apis and models like:
144 | - `from deutschland.travelwarning.api.default_api import DefaultApi`
145 | - `from deutschland.travelwarning.model.pet import Pet`
146 |
147 | Solution 2:
148 | Before importing the package, adjust the maximum recursion limit as shown below:
149 | ```
150 | import sys
151 | sys.setrecursionlimit(1500)
152 | from deutschland import travelwarning
153 | from deutschland.travelwarning.apis import *
154 | from deutschland.travelwarning.models import *
155 | ```
156 |
157 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/exceptions.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | class OpenApiException(Exception):
13 | """The base exception class for all OpenAPIExceptions"""
14 |
15 |
16 | class ApiTypeError(OpenApiException, TypeError):
17 | def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None):
18 | """Raises an exception for TypeErrors
19 |
20 | Args:
21 | msg (str): the exception message
22 |
23 | Keyword Args:
24 | path_to_item (list): a list of keys an indices to get to the
25 | current_item
26 | None if unset
27 | valid_classes (tuple): the primitive classes that current item
28 | should be an instance of
29 | None if unset
30 | key_type (bool): False if our value is a value in a dict
31 | True if it is a key in a dict
32 | False if our item is an item in a list
33 | None if unset
34 | """
35 | self.path_to_item = path_to_item
36 | self.valid_classes = valid_classes
37 | self.key_type = key_type
38 | full_msg = msg
39 | if path_to_item:
40 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
41 | super(ApiTypeError, self).__init__(full_msg)
42 |
43 |
44 | class ApiValueError(OpenApiException, ValueError):
45 | def __init__(self, msg, path_to_item=None):
46 | """
47 | Args:
48 | msg (str): the exception message
49 |
50 | Keyword Args:
51 | path_to_item (list) the path to the exception in the
52 | received_data dict. None if unset
53 | """
54 |
55 | self.path_to_item = path_to_item
56 | full_msg = msg
57 | if path_to_item:
58 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
59 | super(ApiValueError, self).__init__(full_msg)
60 |
61 |
62 | class ApiAttributeError(OpenApiException, AttributeError):
63 | def __init__(self, msg, path_to_item=None):
64 | """
65 | Raised when an attribute reference or assignment fails.
66 |
67 | Args:
68 | msg (str): the exception message
69 |
70 | Keyword Args:
71 | path_to_item (None/list) the path to the exception in the
72 | received_data dict
73 | """
74 | self.path_to_item = path_to_item
75 | full_msg = msg
76 | if path_to_item:
77 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
78 | super(ApiAttributeError, self).__init__(full_msg)
79 |
80 |
81 | class ApiKeyError(OpenApiException, KeyError):
82 | def __init__(self, msg, path_to_item=None):
83 | """
84 | Args:
85 | msg (str): the exception message
86 |
87 | Keyword Args:
88 | path_to_item (None/list) the path to the exception in the
89 | received_data dict
90 | """
91 | self.path_to_item = path_to_item
92 | full_msg = msg
93 | if path_to_item:
94 | full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
95 | super(ApiKeyError, self).__init__(full_msg)
96 |
97 |
98 | class ApiException(OpenApiException):
99 | def __init__(self, status=None, reason=None, http_resp=None):
100 | if http_resp:
101 | self.status = http_resp.status
102 | self.reason = http_resp.reason
103 | self.body = http_resp.data
104 | self.headers = http_resp.getheaders()
105 | else:
106 | self.status = status
107 | self.reason = reason
108 | self.body = None
109 | self.headers = None
110 |
111 | def __str__(self):
112 | """Custom error messages for exception"""
113 | error_message = "Status Code: {0}\n" "Reason: {1}\n".format(
114 | self.status, self.reason
115 | )
116 | if self.headers:
117 | error_message += "HTTP response headers: {0}\n".format(self.headers)
118 |
119 | if self.body:
120 | error_message += "HTTP response body: {0}\n".format(self.body)
121 |
122 | return error_message
123 |
124 |
125 | class NotFoundException(ApiException):
126 | def __init__(self, status=None, reason=None, http_resp=None):
127 | super(NotFoundException, self).__init__(status, reason, http_resp)
128 |
129 |
130 | class UnauthorizedException(ApiException):
131 | def __init__(self, status=None, reason=None, http_resp=None):
132 | super(UnauthorizedException, self).__init__(status, reason, http_resp)
133 |
134 |
135 | class ForbiddenException(ApiException):
136 | def __init__(self, status=None, reason=None, http_resp=None):
137 | super(ForbiddenException, self).__init__(status, reason, http_resp)
138 |
139 |
140 | class ServiceException(ApiException):
141 | def __init__(self, status=None, reason=None, http_resp=None):
142 | super(ServiceException, self).__init__(status, reason, http_resp)
143 |
144 |
145 | def render_path(path_to_item):
146 | """Returns a string representation of a path"""
147 | result = ""
148 | for pth in path_to_item:
149 | if isinstance(pth, int):
150 | result += "[{0}]".format(pth)
151 | else:
152 | result += "['{0}']".format(pth)
153 | return result
154 |
--------------------------------------------------------------------------------
/python-client/docs/DefaultApi.md:
--------------------------------------------------------------------------------
1 | # travelwarning.DefaultApi
2 |
3 | All URIs are relative to *https://www.auswaertiges-amt.de/opendata*
4 |
5 | Method | HTTP request | Description
6 | ------------- | ------------- | -------------
7 | [**get_healthcare**](DefaultApi.md#get_healthcare) | **GET** /healthcare | Gibt die Merkblätter des Gesundheitsdienstes zurück
8 | [**get_representatives_country**](DefaultApi.md#get_representatives_country) | **GET** /representativesInCountry | Gibt eine Liste der deutschen Vertretungen im Ausland zurück
9 | [**get_representatives_germany**](DefaultApi.md#get_representatives_germany) | **GET** /representativesInGermany | Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück
10 | [**get_single_travelwarning**](DefaultApi.md#get_single_travelwarning) | **GET** /travelwarning/{contentId} | Gibt einen Reise- und Sicherheitshinweis zurück
11 | [**get_state_names**](DefaultApi.md#get_state_names) | **GET** /stateNames | Gibt das Verzeichnis der Staatennamen zurück
12 | [**get_travelwarning**](DefaultApi.md#get_travelwarning) | **GET** /travelwarning | Gibt alle Reise- und Sicherheitshinweise zurück
13 |
14 |
15 | # **get_healthcare**
16 | > ResponseDownload get_healthcare()
17 |
18 | Gibt die Merkblätter des Gesundheitsdienstes zurück
19 |
20 | Merkblätter des Gesundheitsdienstes als Link auf ein PDF
21 |
22 | ### Example
23 |
24 |
25 | ```python
26 | import time
27 | from deutschland import travelwarning
28 | from deutschland.travelwarning.api import default_api
29 | from deutschland.travelwarning.model.response_download import ResponseDownload
30 | from pprint import pprint
31 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
32 | # See configuration.py for a list of all supported configuration parameters.
33 | configuration = travelwarning.Configuration(
34 | host = "https://www.auswaertiges-amt.de/opendata"
35 | )
36 |
37 |
38 | # Enter a context with an instance of the API client
39 | with travelwarning.ApiClient() as api_client:
40 | # Create an instance of the API class
41 | api_instance = default_api.DefaultApi(api_client)
42 |
43 | # example, this endpoint has no required or optional parameters
44 | try:
45 | # Gibt die Merkblätter des Gesundheitsdienstes zurück
46 | api_response = api_instance.get_healthcare()
47 | pprint(api_response)
48 | except travelwarning.ApiException as e:
49 | print("Exception when calling DefaultApi->get_healthcare: %s\n" % e)
50 | ```
51 |
52 |
53 | ### Parameters
54 | This endpoint does not need any parameter.
55 |
56 | ### Return type
57 |
58 | [**ResponseDownload**](ResponseDownload.md)
59 |
60 | ### Authorization
61 |
62 | No authorization required
63 |
64 | ### HTTP request headers
65 |
66 | - **Content-Type**: Not defined
67 | - **Accept**: application/json
68 |
69 |
70 | ### HTTP response details
71 |
72 | | Status code | Description | Response headers |
73 | |-------------|-------------|------------------|
74 | **200** | Erfolgreich | - |
75 |
76 | [[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)
77 |
78 | # **get_representatives_country**
79 | > ResponseAddress get_representatives_country()
80 |
81 | Gibt eine Liste der deutschen Vertretungen im Ausland zurück
82 |
83 |
84 |
85 | ### Example
86 |
87 |
88 | ```python
89 | import time
90 | from deutschland import travelwarning
91 | from deutschland.travelwarning.api import default_api
92 | from deutschland.travelwarning.model.response_address import ResponseAddress
93 | from pprint import pprint
94 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
95 | # See configuration.py for a list of all supported configuration parameters.
96 | configuration = travelwarning.Configuration(
97 | host = "https://www.auswaertiges-amt.de/opendata"
98 | )
99 |
100 |
101 | # Enter a context with an instance of the API client
102 | with travelwarning.ApiClient() as api_client:
103 | # Create an instance of the API class
104 | api_instance = default_api.DefaultApi(api_client)
105 |
106 | # example, this endpoint has no required or optional parameters
107 | try:
108 | # Gibt eine Liste der deutschen Vertretungen im Ausland zurück
109 | api_response = api_instance.get_representatives_country()
110 | pprint(api_response)
111 | except travelwarning.ApiException as e:
112 | print("Exception when calling DefaultApi->get_representatives_country: %s\n" % e)
113 | ```
114 |
115 |
116 | ### Parameters
117 | This endpoint does not need any parameter.
118 |
119 | ### Return type
120 |
121 | [**ResponseAddress**](ResponseAddress.md)
122 |
123 | ### Authorization
124 |
125 | No authorization required
126 |
127 | ### HTTP request headers
128 |
129 | - **Content-Type**: Not defined
130 | - **Accept**: text/json;charset=UTF-8
131 |
132 |
133 | ### HTTP response details
134 |
135 | | Status code | Description | Response headers |
136 | |-------------|-------------|------------------|
137 | **200** | Erfolgreich | - |
138 |
139 | [[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)
140 |
141 | # **get_representatives_germany**
142 | > ResponseAddress get_representatives_germany()
143 |
144 | Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück
145 |
146 |
147 |
148 | ### Example
149 |
150 |
151 | ```python
152 | import time
153 | from deutschland import travelwarning
154 | from deutschland.travelwarning.api import default_api
155 | from deutschland.travelwarning.model.response_address import ResponseAddress
156 | from pprint import pprint
157 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
158 | # See configuration.py for a list of all supported configuration parameters.
159 | configuration = travelwarning.Configuration(
160 | host = "https://www.auswaertiges-amt.de/opendata"
161 | )
162 |
163 |
164 | # Enter a context with an instance of the API client
165 | with travelwarning.ApiClient() as api_client:
166 | # Create an instance of the API class
167 | api_instance = default_api.DefaultApi(api_client)
168 |
169 | # example, this endpoint has no required or optional parameters
170 | try:
171 | # Gibt eine Liste der ausländischen Vertretungen in Deutschland zurück
172 | api_response = api_instance.get_representatives_germany()
173 | pprint(api_response)
174 | except travelwarning.ApiException as e:
175 | print("Exception when calling DefaultApi->get_representatives_germany: %s\n" % e)
176 | ```
177 |
178 |
179 | ### Parameters
180 | This endpoint does not need any parameter.
181 |
182 | ### Return type
183 |
184 | [**ResponseAddress**](ResponseAddress.md)
185 |
186 | ### Authorization
187 |
188 | No authorization required
189 |
190 | ### HTTP request headers
191 |
192 | - **Content-Type**: Not defined
193 | - **Accept**: text/json;charset=UTF-8
194 |
195 |
196 | ### HTTP response details
197 |
198 | | Status code | Description | Response headers |
199 | |-------------|-------------|------------------|
200 | **200** | Erfolgreich | - |
201 |
202 | [[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)
203 |
204 | # **get_single_travelwarning**
205 | > ResponseWarning get_single_travelwarning(content_id)
206 |
207 | Gibt einen Reise- und Sicherheitshinweis zurück
208 |
209 | Gibt den vollständigen Datensatz eines Reise- und Sicherheitshinweises zurück. Benötigt die jeweilige ID siehe /travelwarning
210 |
211 | ### Example
212 |
213 |
214 | ```python
215 | import time
216 | from deutschland import travelwarning
217 | from deutschland.travelwarning.api import default_api
218 | from deutschland.travelwarning.model.response_warning import ResponseWarning
219 | from pprint import pprint
220 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
221 | # See configuration.py for a list of all supported configuration parameters.
222 | configuration = travelwarning.Configuration(
223 | host = "https://www.auswaertiges-amt.de/opendata"
224 | )
225 |
226 |
227 | # Enter a context with an instance of the API client
228 | with travelwarning.ApiClient() as api_client:
229 | # Create an instance of the API class
230 | api_instance = default_api.DefaultApi(api_client)
231 | content_id = 1 # int | Die ID des Reise- und Sicherheitshinweises, IDs siehe /travelwarning
232 |
233 | # example passing only required values which don't have defaults set
234 | try:
235 | # Gibt einen Reise- und Sicherheitshinweis zurück
236 | api_response = api_instance.get_single_travelwarning(content_id)
237 | pprint(api_response)
238 | except travelwarning.ApiException as e:
239 | print("Exception when calling DefaultApi->get_single_travelwarning: %s\n" % e)
240 | ```
241 |
242 |
243 | ### Parameters
244 |
245 | Name | Type | Description | Notes
246 | ------------- | ------------- | ------------- | -------------
247 | **content_id** | **int**| Die ID des Reise- und Sicherheitshinweises, IDs siehe /travelwarning |
248 |
249 | ### Return type
250 |
251 | [**ResponseWarning**](ResponseWarning.md)
252 |
253 | ### Authorization
254 |
255 | No authorization required
256 |
257 | ### HTTP request headers
258 |
259 | - **Content-Type**: Not defined
260 | - **Accept**: text/json;charset=UTF-8
261 |
262 |
263 | ### HTTP response details
264 |
265 | | Status code | Description | Response headers |
266 | |-------------|-------------|------------------|
267 | **200** | Erfolgreich | - |
268 | **404** | Not Found | - |
269 |
270 | [[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)
271 |
272 | # **get_state_names**
273 | > ResponseDownload get_state_names()
274 |
275 | Gibt das Verzeichnis der Staatennamen zurück
276 |
277 | Verzeichnis der Staatennamen als Link auf eine XML- oder CSV-Datei. Eine PDF-Datei mit Nutzungshinweisen wird ebenfalls zurückgegeben.
278 |
279 | ### Example
280 |
281 |
282 | ```python
283 | import time
284 | from deutschland import travelwarning
285 | from deutschland.travelwarning.api import default_api
286 | from deutschland.travelwarning.model.response_download import ResponseDownload
287 | from pprint import pprint
288 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
289 | # See configuration.py for a list of all supported configuration parameters.
290 | configuration = travelwarning.Configuration(
291 | host = "https://www.auswaertiges-amt.de/opendata"
292 | )
293 |
294 |
295 | # Enter a context with an instance of the API client
296 | with travelwarning.ApiClient() as api_client:
297 | # Create an instance of the API class
298 | api_instance = default_api.DefaultApi(api_client)
299 |
300 | # example, this endpoint has no required or optional parameters
301 | try:
302 | # Gibt das Verzeichnis der Staatennamen zurück
303 | api_response = api_instance.get_state_names()
304 | pprint(api_response)
305 | except travelwarning.ApiException as e:
306 | print("Exception when calling DefaultApi->get_state_names: %s\n" % e)
307 | ```
308 |
309 |
310 | ### Parameters
311 | This endpoint does not need any parameter.
312 |
313 | ### Return type
314 |
315 | [**ResponseDownload**](ResponseDownload.md)
316 |
317 | ### Authorization
318 |
319 | No authorization required
320 |
321 | ### HTTP request headers
322 |
323 | - **Content-Type**: Not defined
324 | - **Accept**: application/json
325 |
326 |
327 | ### HTTP response details
328 |
329 | | Status code | Description | Response headers |
330 | |-------------|-------------|------------------|
331 | **200** | Erfolgreich | - |
332 |
333 | [[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)
334 |
335 | # **get_travelwarning**
336 | > ResponseWarnings get_travelwarning()
337 |
338 | Gibt alle Reise- und Sicherheitshinweise zurück
339 |
340 |
341 |
342 | ### Example
343 |
344 |
345 | ```python
346 | import time
347 | from deutschland import travelwarning
348 | from deutschland.travelwarning.api import default_api
349 | from deutschland.travelwarning.model.response_warnings import ResponseWarnings
350 | from pprint import pprint
351 | # Defining the host is optional and defaults to https://www.auswaertiges-amt.de/opendata
352 | # See configuration.py for a list of all supported configuration parameters.
353 | configuration = travelwarning.Configuration(
354 | host = "https://www.auswaertiges-amt.de/opendata"
355 | )
356 |
357 |
358 | # Enter a context with an instance of the API client
359 | with travelwarning.ApiClient() as api_client:
360 | # Create an instance of the API class
361 | api_instance = default_api.DefaultApi(api_client)
362 |
363 | # example, this endpoint has no required or optional parameters
364 | try:
365 | # Gibt alle Reise- und Sicherheitshinweise zurück
366 | api_response = api_instance.get_travelwarning()
367 | pprint(api_response)
368 | except travelwarning.ApiException as e:
369 | print("Exception when calling DefaultApi->get_travelwarning: %s\n" % e)
370 | ```
371 |
372 |
373 | ### Parameters
374 | This endpoint does not need any parameter.
375 |
376 | ### Return type
377 |
378 | [**ResponseWarnings**](ResponseWarnings.md)
379 |
380 | ### Authorization
381 |
382 | No authorization required
383 |
384 | ### HTTP request headers
385 |
386 | - **Content-Type**: Not defined
387 | - **Accept**: text/json;charset=UTF-8
388 |
389 |
390 | ### HTTP response details
391 |
392 | | Status code | Description | Response headers |
393 | |-------------|-------------|------------------|
394 | **200** | Erfolgreich | - |
395 |
396 | [[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)
397 |
398 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/model/response_address.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.travelwarning.exceptions import ApiAttributeError
16 | from deutschland.travelwarning.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.travelwarning.model.response_address_response import (
35 | ResponseAddressResponse,
36 | )
37 |
38 | globals()["ResponseAddressResponse"] = ResponseAddressResponse
39 |
40 |
41 | class ResponseAddress(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "response": (ResponseAddressResponse,), # noqa: E501
103 | }
104 |
105 | @cached_property
106 | def discriminator():
107 | return None
108 |
109 | attribute_map = {
110 | "response": "response", # noqa: E501
111 | }
112 |
113 | read_only_vars = {}
114 |
115 | _composed_schemas = {}
116 |
117 | @classmethod
118 | @convert_js_args_to_python_args
119 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
120 | """ResponseAddress - a model defined in OpenAPI
121 |
122 | Keyword Args:
123 | _check_type (bool): if True, values for parameters in openapi_types
124 | will be type checked and a TypeError will be
125 | raised if the wrong type is input.
126 | Defaults to True
127 | _path_to_item (tuple/list): This is a list of keys or values to
128 | drill down to the model in received_data
129 | when deserializing a response
130 | _spec_property_naming (bool): True if the variable names in the input data
131 | are serialized names, as specified in the OpenAPI document.
132 | False if the variable names in the input data
133 | are pythonic names, e.g. snake case (default)
134 | _configuration (Configuration): the instance to use when
135 | deserializing a file_type parameter.
136 | If passed, type conversion is attempted
137 | If omitted no type conversion is done.
138 | _visited_composed_classes (tuple): This stores a tuple of
139 | classes that we have traveled through so that
140 | if we see that class again we will not use its
141 | discriminator again.
142 | When traveling through a discriminator, the
143 | composed schema that is
144 | is traveled through is added to this set.
145 | For example if Animal has a discriminator
146 | petType and we pass in "Dog", and the class Dog
147 | allOf includes Animal, we move through Animal
148 | once using the discriminator, and pick Dog.
149 | Then in Dog, we will make an instance of the
150 | Animal class but this time we won't travel
151 | through its discriminator because we passed in
152 | _visited_composed_classes = (Animal,)
153 | response (ResponseAddressResponse): [optional] # noqa: E501
154 | """
155 |
156 | _check_type = kwargs.pop("_check_type", True)
157 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
158 | _path_to_item = kwargs.pop("_path_to_item", ())
159 | _configuration = kwargs.pop("_configuration", None)
160 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
161 |
162 | self = super(OpenApiModel, cls).__new__(cls)
163 |
164 | if args:
165 | for arg in args:
166 | if isinstance(arg, dict):
167 | kwargs.update(arg)
168 | else:
169 | raise ApiTypeError(
170 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
171 | % (
172 | args,
173 | self.__class__.__name__,
174 | ),
175 | path_to_item=_path_to_item,
176 | valid_classes=(self.__class__,),
177 | )
178 |
179 | self._data_store = {}
180 | self._check_type = _check_type
181 | self._spec_property_naming = _spec_property_naming
182 | self._path_to_item = _path_to_item
183 | self._configuration = _configuration
184 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185 |
186 | for var_name, var_value in kwargs.items():
187 | if (
188 | var_name not in self.attribute_map
189 | and self._configuration is not None
190 | and self._configuration.discard_unknown_keys
191 | and self.additional_properties_type is None
192 | ):
193 | # discard variable.
194 | continue
195 | setattr(self, var_name, var_value)
196 | return self
197 |
198 | required_properties = set(
199 | [
200 | "_data_store",
201 | "_check_type",
202 | "_spec_property_naming",
203 | "_path_to_item",
204 | "_configuration",
205 | "_visited_composed_classes",
206 | ]
207 | )
208 |
209 | @convert_js_args_to_python_args
210 | def __init__(self, *args, **kwargs): # noqa: E501
211 | """ResponseAddress - a model defined in OpenAPI
212 |
213 | Keyword Args:
214 | _check_type (bool): if True, values for parameters in openapi_types
215 | will be type checked and a TypeError will be
216 | raised if the wrong type is input.
217 | Defaults to True
218 | _path_to_item (tuple/list): This is a list of keys or values to
219 | drill down to the model in received_data
220 | when deserializing a response
221 | _spec_property_naming (bool): True if the variable names in the input data
222 | are serialized names, as specified in the OpenAPI document.
223 | False if the variable names in the input data
224 | are pythonic names, e.g. snake case (default)
225 | _configuration (Configuration): the instance to use when
226 | deserializing a file_type parameter.
227 | If passed, type conversion is attempted
228 | If omitted no type conversion is done.
229 | _visited_composed_classes (tuple): This stores a tuple of
230 | classes that we have traveled through so that
231 | if we see that class again we will not use its
232 | discriminator again.
233 | When traveling through a discriminator, the
234 | composed schema that is
235 | is traveled through is added to this set.
236 | For example if Animal has a discriminator
237 | petType and we pass in "Dog", and the class Dog
238 | allOf includes Animal, we move through Animal
239 | once using the discriminator, and pick Dog.
240 | Then in Dog, we will make an instance of the
241 | Animal class but this time we won't travel
242 | through its discriminator because we passed in
243 | _visited_composed_classes = (Animal,)
244 | response (ResponseAddressResponse): [optional] # noqa: E501
245 | """
246 |
247 | _check_type = kwargs.pop("_check_type", True)
248 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
249 | _path_to_item = kwargs.pop("_path_to_item", ())
250 | _configuration = kwargs.pop("_configuration", None)
251 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
252 |
253 | if args:
254 | for arg in args:
255 | if isinstance(arg, dict):
256 | kwargs.update(arg)
257 | else:
258 | raise ApiTypeError(
259 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
260 | % (
261 | args,
262 | self.__class__.__name__,
263 | ),
264 | path_to_item=_path_to_item,
265 | valid_classes=(self.__class__,),
266 | )
267 |
268 | self._data_store = {}
269 | self._check_type = _check_type
270 | self._spec_property_naming = _spec_property_naming
271 | self._path_to_item = _path_to_item
272 | self._configuration = _configuration
273 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
274 |
275 | for var_name, var_value in kwargs.items():
276 | if (
277 | var_name not in self.attribute_map
278 | and self._configuration is not None
279 | and self._configuration.discard_unknown_keys
280 | and self.additional_properties_type is None
281 | ):
282 | # discard variable.
283 | continue
284 | setattr(self, var_name, var_value)
285 | if var_name in self.read_only_vars:
286 | raise ApiAttributeError(
287 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288 | f"class with read only attributes."
289 | )
290 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/model/response_artikel.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.travelwarning.exceptions import ApiAttributeError
16 | from deutschland.travelwarning.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.travelwarning.model.response_artikel_response import (
35 | ResponseArtikelResponse,
36 | )
37 |
38 | globals()["ResponseArtikelResponse"] = ResponseArtikelResponse
39 |
40 |
41 | class ResponseArtikel(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "response": (ResponseArtikelResponse,), # noqa: E501
103 | }
104 |
105 | @cached_property
106 | def discriminator():
107 | return None
108 |
109 | attribute_map = {
110 | "response": "response", # noqa: E501
111 | }
112 |
113 | read_only_vars = {}
114 |
115 | _composed_schemas = {}
116 |
117 | @classmethod
118 | @convert_js_args_to_python_args
119 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
120 | """ResponseArtikel - a model defined in OpenAPI
121 |
122 | Keyword Args:
123 | _check_type (bool): if True, values for parameters in openapi_types
124 | will be type checked and a TypeError will be
125 | raised if the wrong type is input.
126 | Defaults to True
127 | _path_to_item (tuple/list): This is a list of keys or values to
128 | drill down to the model in received_data
129 | when deserializing a response
130 | _spec_property_naming (bool): True if the variable names in the input data
131 | are serialized names, as specified in the OpenAPI document.
132 | False if the variable names in the input data
133 | are pythonic names, e.g. snake case (default)
134 | _configuration (Configuration): the instance to use when
135 | deserializing a file_type parameter.
136 | If passed, type conversion is attempted
137 | If omitted no type conversion is done.
138 | _visited_composed_classes (tuple): This stores a tuple of
139 | classes that we have traveled through so that
140 | if we see that class again we will not use its
141 | discriminator again.
142 | When traveling through a discriminator, the
143 | composed schema that is
144 | is traveled through is added to this set.
145 | For example if Animal has a discriminator
146 | petType and we pass in "Dog", and the class Dog
147 | allOf includes Animal, we move through Animal
148 | once using the discriminator, and pick Dog.
149 | Then in Dog, we will make an instance of the
150 | Animal class but this time we won't travel
151 | through its discriminator because we passed in
152 | _visited_composed_classes = (Animal,)
153 | response (ResponseArtikelResponse): [optional] # noqa: E501
154 | """
155 |
156 | _check_type = kwargs.pop("_check_type", True)
157 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
158 | _path_to_item = kwargs.pop("_path_to_item", ())
159 | _configuration = kwargs.pop("_configuration", None)
160 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
161 |
162 | self = super(OpenApiModel, cls).__new__(cls)
163 |
164 | if args:
165 | for arg in args:
166 | if isinstance(arg, dict):
167 | kwargs.update(arg)
168 | else:
169 | raise ApiTypeError(
170 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
171 | % (
172 | args,
173 | self.__class__.__name__,
174 | ),
175 | path_to_item=_path_to_item,
176 | valid_classes=(self.__class__,),
177 | )
178 |
179 | self._data_store = {}
180 | self._check_type = _check_type
181 | self._spec_property_naming = _spec_property_naming
182 | self._path_to_item = _path_to_item
183 | self._configuration = _configuration
184 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185 |
186 | for var_name, var_value in kwargs.items():
187 | if (
188 | var_name not in self.attribute_map
189 | and self._configuration is not None
190 | and self._configuration.discard_unknown_keys
191 | and self.additional_properties_type is None
192 | ):
193 | # discard variable.
194 | continue
195 | setattr(self, var_name, var_value)
196 | return self
197 |
198 | required_properties = set(
199 | [
200 | "_data_store",
201 | "_check_type",
202 | "_spec_property_naming",
203 | "_path_to_item",
204 | "_configuration",
205 | "_visited_composed_classes",
206 | ]
207 | )
208 |
209 | @convert_js_args_to_python_args
210 | def __init__(self, *args, **kwargs): # noqa: E501
211 | """ResponseArtikel - a model defined in OpenAPI
212 |
213 | Keyword Args:
214 | _check_type (bool): if True, values for parameters in openapi_types
215 | will be type checked and a TypeError will be
216 | raised if the wrong type is input.
217 | Defaults to True
218 | _path_to_item (tuple/list): This is a list of keys or values to
219 | drill down to the model in received_data
220 | when deserializing a response
221 | _spec_property_naming (bool): True if the variable names in the input data
222 | are serialized names, as specified in the OpenAPI document.
223 | False if the variable names in the input data
224 | are pythonic names, e.g. snake case (default)
225 | _configuration (Configuration): the instance to use when
226 | deserializing a file_type parameter.
227 | If passed, type conversion is attempted
228 | If omitted no type conversion is done.
229 | _visited_composed_classes (tuple): This stores a tuple of
230 | classes that we have traveled through so that
231 | if we see that class again we will not use its
232 | discriminator again.
233 | When traveling through a discriminator, the
234 | composed schema that is
235 | is traveled through is added to this set.
236 | For example if Animal has a discriminator
237 | petType and we pass in "Dog", and the class Dog
238 | allOf includes Animal, we move through Animal
239 | once using the discriminator, and pick Dog.
240 | Then in Dog, we will make an instance of the
241 | Animal class but this time we won't travel
242 | through its discriminator because we passed in
243 | _visited_composed_classes = (Animal,)
244 | response (ResponseArtikelResponse): [optional] # noqa: E501
245 | """
246 |
247 | _check_type = kwargs.pop("_check_type", True)
248 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
249 | _path_to_item = kwargs.pop("_path_to_item", ())
250 | _configuration = kwargs.pop("_configuration", None)
251 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
252 |
253 | if args:
254 | for arg in args:
255 | if isinstance(arg, dict):
256 | kwargs.update(arg)
257 | else:
258 | raise ApiTypeError(
259 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
260 | % (
261 | args,
262 | self.__class__.__name__,
263 | ),
264 | path_to_item=_path_to_item,
265 | valid_classes=(self.__class__,),
266 | )
267 |
268 | self._data_store = {}
269 | self._check_type = _check_type
270 | self._spec_property_naming = _spec_property_naming
271 | self._path_to_item = _path_to_item
272 | self._configuration = _configuration
273 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
274 |
275 | for var_name, var_value in kwargs.items():
276 | if (
277 | var_name not in self.attribute_map
278 | and self._configuration is not None
279 | and self._configuration.discard_unknown_keys
280 | and self.additional_properties_type is None
281 | ):
282 | # discard variable.
283 | continue
284 | setattr(self, var_name, var_value)
285 | if var_name in self.read_only_vars:
286 | raise ApiAttributeError(
287 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288 | f"class with read only attributes."
289 | )
290 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/model/response_warning.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.travelwarning.exceptions import ApiAttributeError
16 | from deutschland.travelwarning.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.travelwarning.model.response_warning_response import (
35 | ResponseWarningResponse,
36 | )
37 |
38 | globals()["ResponseWarningResponse"] = ResponseWarningResponse
39 |
40 |
41 | class ResponseWarning(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "response": (ResponseWarningResponse,), # noqa: E501
103 | }
104 |
105 | @cached_property
106 | def discriminator():
107 | return None
108 |
109 | attribute_map = {
110 | "response": "response", # noqa: E501
111 | }
112 |
113 | read_only_vars = {}
114 |
115 | _composed_schemas = {}
116 |
117 | @classmethod
118 | @convert_js_args_to_python_args
119 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
120 | """ResponseWarning - a model defined in OpenAPI
121 |
122 | Keyword Args:
123 | _check_type (bool): if True, values for parameters in openapi_types
124 | will be type checked and a TypeError will be
125 | raised if the wrong type is input.
126 | Defaults to True
127 | _path_to_item (tuple/list): This is a list of keys or values to
128 | drill down to the model in received_data
129 | when deserializing a response
130 | _spec_property_naming (bool): True if the variable names in the input data
131 | are serialized names, as specified in the OpenAPI document.
132 | False if the variable names in the input data
133 | are pythonic names, e.g. snake case (default)
134 | _configuration (Configuration): the instance to use when
135 | deserializing a file_type parameter.
136 | If passed, type conversion is attempted
137 | If omitted no type conversion is done.
138 | _visited_composed_classes (tuple): This stores a tuple of
139 | classes that we have traveled through so that
140 | if we see that class again we will not use its
141 | discriminator again.
142 | When traveling through a discriminator, the
143 | composed schema that is
144 | is traveled through is added to this set.
145 | For example if Animal has a discriminator
146 | petType and we pass in "Dog", and the class Dog
147 | allOf includes Animal, we move through Animal
148 | once using the discriminator, and pick Dog.
149 | Then in Dog, we will make an instance of the
150 | Animal class but this time we won't travel
151 | through its discriminator because we passed in
152 | _visited_composed_classes = (Animal,)
153 | response (ResponseWarningResponse): [optional] # noqa: E501
154 | """
155 |
156 | _check_type = kwargs.pop("_check_type", True)
157 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
158 | _path_to_item = kwargs.pop("_path_to_item", ())
159 | _configuration = kwargs.pop("_configuration", None)
160 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
161 |
162 | self = super(OpenApiModel, cls).__new__(cls)
163 |
164 | if args:
165 | for arg in args:
166 | if isinstance(arg, dict):
167 | kwargs.update(arg)
168 | else:
169 | raise ApiTypeError(
170 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
171 | % (
172 | args,
173 | self.__class__.__name__,
174 | ),
175 | path_to_item=_path_to_item,
176 | valid_classes=(self.__class__,),
177 | )
178 |
179 | self._data_store = {}
180 | self._check_type = _check_type
181 | self._spec_property_naming = _spec_property_naming
182 | self._path_to_item = _path_to_item
183 | self._configuration = _configuration
184 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185 |
186 | for var_name, var_value in kwargs.items():
187 | if (
188 | var_name not in self.attribute_map
189 | and self._configuration is not None
190 | and self._configuration.discard_unknown_keys
191 | and self.additional_properties_type is None
192 | ):
193 | # discard variable.
194 | continue
195 | setattr(self, var_name, var_value)
196 | return self
197 |
198 | required_properties = set(
199 | [
200 | "_data_store",
201 | "_check_type",
202 | "_spec_property_naming",
203 | "_path_to_item",
204 | "_configuration",
205 | "_visited_composed_classes",
206 | ]
207 | )
208 |
209 | @convert_js_args_to_python_args
210 | def __init__(self, *args, **kwargs): # noqa: E501
211 | """ResponseWarning - a model defined in OpenAPI
212 |
213 | Keyword Args:
214 | _check_type (bool): if True, values for parameters in openapi_types
215 | will be type checked and a TypeError will be
216 | raised if the wrong type is input.
217 | Defaults to True
218 | _path_to_item (tuple/list): This is a list of keys or values to
219 | drill down to the model in received_data
220 | when deserializing a response
221 | _spec_property_naming (bool): True if the variable names in the input data
222 | are serialized names, as specified in the OpenAPI document.
223 | False if the variable names in the input data
224 | are pythonic names, e.g. snake case (default)
225 | _configuration (Configuration): the instance to use when
226 | deserializing a file_type parameter.
227 | If passed, type conversion is attempted
228 | If omitted no type conversion is done.
229 | _visited_composed_classes (tuple): This stores a tuple of
230 | classes that we have traveled through so that
231 | if we see that class again we will not use its
232 | discriminator again.
233 | When traveling through a discriminator, the
234 | composed schema that is
235 | is traveled through is added to this set.
236 | For example if Animal has a discriminator
237 | petType and we pass in "Dog", and the class Dog
238 | allOf includes Animal, we move through Animal
239 | once using the discriminator, and pick Dog.
240 | Then in Dog, we will make an instance of the
241 | Animal class but this time we won't travel
242 | through its discriminator because we passed in
243 | _visited_composed_classes = (Animal,)
244 | response (ResponseWarningResponse): [optional] # noqa: E501
245 | """
246 |
247 | _check_type = kwargs.pop("_check_type", True)
248 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
249 | _path_to_item = kwargs.pop("_path_to_item", ())
250 | _configuration = kwargs.pop("_configuration", None)
251 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
252 |
253 | if args:
254 | for arg in args:
255 | if isinstance(arg, dict):
256 | kwargs.update(arg)
257 | else:
258 | raise ApiTypeError(
259 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
260 | % (
261 | args,
262 | self.__class__.__name__,
263 | ),
264 | path_to_item=_path_to_item,
265 | valid_classes=(self.__class__,),
266 | )
267 |
268 | self._data_store = {}
269 | self._check_type = _check_type
270 | self._spec_property_naming = _spec_property_naming
271 | self._path_to_item = _path_to_item
272 | self._configuration = _configuration
273 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
274 |
275 | for var_name, var_value in kwargs.items():
276 | if (
277 | var_name not in self.attribute_map
278 | and self._configuration is not None
279 | and self._configuration.discard_unknown_keys
280 | and self.additional_properties_type is None
281 | ):
282 | # discard variable.
283 | continue
284 | setattr(self, var_name, var_value)
285 | if var_name in self.read_only_vars:
286 | raise ApiAttributeError(
287 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288 | f"class with read only attributes."
289 | )
290 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/model/response_download.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.travelwarning.exceptions import ApiAttributeError
16 | from deutschland.travelwarning.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.travelwarning.model.response_download_response import (
35 | ResponseDownloadResponse,
36 | )
37 |
38 | globals()["ResponseDownloadResponse"] = ResponseDownloadResponse
39 |
40 |
41 | class ResponseDownload(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "response": (ResponseDownloadResponse,), # noqa: E501
103 | }
104 |
105 | @cached_property
106 | def discriminator():
107 | return None
108 |
109 | attribute_map = {
110 | "response": "response", # noqa: E501
111 | }
112 |
113 | read_only_vars = {}
114 |
115 | _composed_schemas = {}
116 |
117 | @classmethod
118 | @convert_js_args_to_python_args
119 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
120 | """ResponseDownload - a model defined in OpenAPI
121 |
122 | Keyword Args:
123 | _check_type (bool): if True, values for parameters in openapi_types
124 | will be type checked and a TypeError will be
125 | raised if the wrong type is input.
126 | Defaults to True
127 | _path_to_item (tuple/list): This is a list of keys or values to
128 | drill down to the model in received_data
129 | when deserializing a response
130 | _spec_property_naming (bool): True if the variable names in the input data
131 | are serialized names, as specified in the OpenAPI document.
132 | False if the variable names in the input data
133 | are pythonic names, e.g. snake case (default)
134 | _configuration (Configuration): the instance to use when
135 | deserializing a file_type parameter.
136 | If passed, type conversion is attempted
137 | If omitted no type conversion is done.
138 | _visited_composed_classes (tuple): This stores a tuple of
139 | classes that we have traveled through so that
140 | if we see that class again we will not use its
141 | discriminator again.
142 | When traveling through a discriminator, the
143 | composed schema that is
144 | is traveled through is added to this set.
145 | For example if Animal has a discriminator
146 | petType and we pass in "Dog", and the class Dog
147 | allOf includes Animal, we move through Animal
148 | once using the discriminator, and pick Dog.
149 | Then in Dog, we will make an instance of the
150 | Animal class but this time we won't travel
151 | through its discriminator because we passed in
152 | _visited_composed_classes = (Animal,)
153 | response (ResponseDownloadResponse): [optional] # noqa: E501
154 | """
155 |
156 | _check_type = kwargs.pop("_check_type", True)
157 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
158 | _path_to_item = kwargs.pop("_path_to_item", ())
159 | _configuration = kwargs.pop("_configuration", None)
160 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
161 |
162 | self = super(OpenApiModel, cls).__new__(cls)
163 |
164 | if args:
165 | for arg in args:
166 | if isinstance(arg, dict):
167 | kwargs.update(arg)
168 | else:
169 | raise ApiTypeError(
170 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
171 | % (
172 | args,
173 | self.__class__.__name__,
174 | ),
175 | path_to_item=_path_to_item,
176 | valid_classes=(self.__class__,),
177 | )
178 |
179 | self._data_store = {}
180 | self._check_type = _check_type
181 | self._spec_property_naming = _spec_property_naming
182 | self._path_to_item = _path_to_item
183 | self._configuration = _configuration
184 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185 |
186 | for var_name, var_value in kwargs.items():
187 | if (
188 | var_name not in self.attribute_map
189 | and self._configuration is not None
190 | and self._configuration.discard_unknown_keys
191 | and self.additional_properties_type is None
192 | ):
193 | # discard variable.
194 | continue
195 | setattr(self, var_name, var_value)
196 | return self
197 |
198 | required_properties = set(
199 | [
200 | "_data_store",
201 | "_check_type",
202 | "_spec_property_naming",
203 | "_path_to_item",
204 | "_configuration",
205 | "_visited_composed_classes",
206 | ]
207 | )
208 |
209 | @convert_js_args_to_python_args
210 | def __init__(self, *args, **kwargs): # noqa: E501
211 | """ResponseDownload - a model defined in OpenAPI
212 |
213 | Keyword Args:
214 | _check_type (bool): if True, values for parameters in openapi_types
215 | will be type checked and a TypeError will be
216 | raised if the wrong type is input.
217 | Defaults to True
218 | _path_to_item (tuple/list): This is a list of keys or values to
219 | drill down to the model in received_data
220 | when deserializing a response
221 | _spec_property_naming (bool): True if the variable names in the input data
222 | are serialized names, as specified in the OpenAPI document.
223 | False if the variable names in the input data
224 | are pythonic names, e.g. snake case (default)
225 | _configuration (Configuration): the instance to use when
226 | deserializing a file_type parameter.
227 | If passed, type conversion is attempted
228 | If omitted no type conversion is done.
229 | _visited_composed_classes (tuple): This stores a tuple of
230 | classes that we have traveled through so that
231 | if we see that class again we will not use its
232 | discriminator again.
233 | When traveling through a discriminator, the
234 | composed schema that is
235 | is traveled through is added to this set.
236 | For example if Animal has a discriminator
237 | petType and we pass in "Dog", and the class Dog
238 | allOf includes Animal, we move through Animal
239 | once using the discriminator, and pick Dog.
240 | Then in Dog, we will make an instance of the
241 | Animal class but this time we won't travel
242 | through its discriminator because we passed in
243 | _visited_composed_classes = (Animal,)
244 | response (ResponseDownloadResponse): [optional] # noqa: E501
245 | """
246 |
247 | _check_type = kwargs.pop("_check_type", True)
248 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
249 | _path_to_item = kwargs.pop("_path_to_item", ())
250 | _configuration = kwargs.pop("_configuration", None)
251 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
252 |
253 | if args:
254 | for arg in args:
255 | if isinstance(arg, dict):
256 | kwargs.update(arg)
257 | else:
258 | raise ApiTypeError(
259 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
260 | % (
261 | args,
262 | self.__class__.__name__,
263 | ),
264 | path_to_item=_path_to_item,
265 | valid_classes=(self.__class__,),
266 | )
267 |
268 | self._data_store = {}
269 | self._check_type = _check_type
270 | self._spec_property_naming = _spec_property_naming
271 | self._path_to_item = _path_to_item
272 | self._configuration = _configuration
273 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
274 |
275 | for var_name, var_value in kwargs.items():
276 | if (
277 | var_name not in self.attribute_map
278 | and self._configuration is not None
279 | and self._configuration.discard_unknown_keys
280 | and self.additional_properties_type is None
281 | ):
282 | # discard variable.
283 | continue
284 | setattr(self, var_name, var_value)
285 | if var_name in self.read_only_vars:
286 | raise ApiAttributeError(
287 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288 | f"class with read only attributes."
289 | )
290 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/model/response_warnings.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.travelwarning.exceptions import ApiAttributeError
16 | from deutschland.travelwarning.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | def lazy_import():
34 | from deutschland.travelwarning.model.response_warnings_response import (
35 | ResponseWarningsResponse,
36 | )
37 |
38 | globals()["ResponseWarningsResponse"] = ResponseWarningsResponse
39 |
40 |
41 | class ResponseWarnings(ModelNormal):
42 | """NOTE: This class is auto generated by OpenAPI Generator.
43 | Ref: https://openapi-generator.tech
44 |
45 | Do not edit the class manually.
46 |
47 | Attributes:
48 | allowed_values (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | with a capitalized key describing the allowed value and an allowed
51 | value. These dicts store the allowed enum values.
52 | attribute_map (dict): The key is attribute name
53 | and the value is json key in definition.
54 | discriminator_value_class_map (dict): A dict to go from the discriminator
55 | variable value to the discriminator class name.
56 | validations (dict): The key is the tuple path to the attribute
57 | and the for var_name this is (var_name,). The value is a dict
58 | that stores validations for max_length, min_length, max_items,
59 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60 | inclusive_minimum, and regex.
61 | additional_properties_type (tuple): A tuple of classes accepted
62 | as additional properties values.
63 | """
64 |
65 | allowed_values = {}
66 |
67 | validations = {}
68 |
69 | @cached_property
70 | def additional_properties_type():
71 | """
72 | This must be a method because a model may have properties that are
73 | of type self, this must run after the class is loaded
74 | """
75 | lazy_import()
76 | return (
77 | bool,
78 | date,
79 | datetime,
80 | dict,
81 | float,
82 | int,
83 | list,
84 | str,
85 | none_type,
86 | ) # noqa: E501
87 |
88 | _nullable = False
89 |
90 | @cached_property
91 | def openapi_types():
92 | """
93 | This must be a method because a model may have properties that are
94 | of type self, this must run after the class is loaded
95 |
96 | Returns
97 | openapi_types (dict): The key is attribute name
98 | and the value is attribute type.
99 | """
100 | lazy_import()
101 | return {
102 | "response": (ResponseWarningsResponse,), # noqa: E501
103 | }
104 |
105 | @cached_property
106 | def discriminator():
107 | return None
108 |
109 | attribute_map = {
110 | "response": "response", # noqa: E501
111 | }
112 |
113 | read_only_vars = {}
114 |
115 | _composed_schemas = {}
116 |
117 | @classmethod
118 | @convert_js_args_to_python_args
119 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
120 | """ResponseWarnings - a model defined in OpenAPI
121 |
122 | Keyword Args:
123 | _check_type (bool): if True, values for parameters in openapi_types
124 | will be type checked and a TypeError will be
125 | raised if the wrong type is input.
126 | Defaults to True
127 | _path_to_item (tuple/list): This is a list of keys or values to
128 | drill down to the model in received_data
129 | when deserializing a response
130 | _spec_property_naming (bool): True if the variable names in the input data
131 | are serialized names, as specified in the OpenAPI document.
132 | False if the variable names in the input data
133 | are pythonic names, e.g. snake case (default)
134 | _configuration (Configuration): the instance to use when
135 | deserializing a file_type parameter.
136 | If passed, type conversion is attempted
137 | If omitted no type conversion is done.
138 | _visited_composed_classes (tuple): This stores a tuple of
139 | classes that we have traveled through so that
140 | if we see that class again we will not use its
141 | discriminator again.
142 | When traveling through a discriminator, the
143 | composed schema that is
144 | is traveled through is added to this set.
145 | For example if Animal has a discriminator
146 | petType and we pass in "Dog", and the class Dog
147 | allOf includes Animal, we move through Animal
148 | once using the discriminator, and pick Dog.
149 | Then in Dog, we will make an instance of the
150 | Animal class but this time we won't travel
151 | through its discriminator because we passed in
152 | _visited_composed_classes = (Animal,)
153 | response (ResponseWarningsResponse): [optional] # noqa: E501
154 | """
155 |
156 | _check_type = kwargs.pop("_check_type", True)
157 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
158 | _path_to_item = kwargs.pop("_path_to_item", ())
159 | _configuration = kwargs.pop("_configuration", None)
160 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
161 |
162 | self = super(OpenApiModel, cls).__new__(cls)
163 |
164 | if args:
165 | for arg in args:
166 | if isinstance(arg, dict):
167 | kwargs.update(arg)
168 | else:
169 | raise ApiTypeError(
170 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
171 | % (
172 | args,
173 | self.__class__.__name__,
174 | ),
175 | path_to_item=_path_to_item,
176 | valid_classes=(self.__class__,),
177 | )
178 |
179 | self._data_store = {}
180 | self._check_type = _check_type
181 | self._spec_property_naming = _spec_property_naming
182 | self._path_to_item = _path_to_item
183 | self._configuration = _configuration
184 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185 |
186 | for var_name, var_value in kwargs.items():
187 | if (
188 | var_name not in self.attribute_map
189 | and self._configuration is not None
190 | and self._configuration.discard_unknown_keys
191 | and self.additional_properties_type is None
192 | ):
193 | # discard variable.
194 | continue
195 | setattr(self, var_name, var_value)
196 | return self
197 |
198 | required_properties = set(
199 | [
200 | "_data_store",
201 | "_check_type",
202 | "_spec_property_naming",
203 | "_path_to_item",
204 | "_configuration",
205 | "_visited_composed_classes",
206 | ]
207 | )
208 |
209 | @convert_js_args_to_python_args
210 | def __init__(self, *args, **kwargs): # noqa: E501
211 | """ResponseWarnings - a model defined in OpenAPI
212 |
213 | Keyword Args:
214 | _check_type (bool): if True, values for parameters in openapi_types
215 | will be type checked and a TypeError will be
216 | raised if the wrong type is input.
217 | Defaults to True
218 | _path_to_item (tuple/list): This is a list of keys or values to
219 | drill down to the model in received_data
220 | when deserializing a response
221 | _spec_property_naming (bool): True if the variable names in the input data
222 | are serialized names, as specified in the OpenAPI document.
223 | False if the variable names in the input data
224 | are pythonic names, e.g. snake case (default)
225 | _configuration (Configuration): the instance to use when
226 | deserializing a file_type parameter.
227 | If passed, type conversion is attempted
228 | If omitted no type conversion is done.
229 | _visited_composed_classes (tuple): This stores a tuple of
230 | classes that we have traveled through so that
231 | if we see that class again we will not use its
232 | discriminator again.
233 | When traveling through a discriminator, the
234 | composed schema that is
235 | is traveled through is added to this set.
236 | For example if Animal has a discriminator
237 | petType and we pass in "Dog", and the class Dog
238 | allOf includes Animal, we move through Animal
239 | once using the discriminator, and pick Dog.
240 | Then in Dog, we will make an instance of the
241 | Animal class but this time we won't travel
242 | through its discriminator because we passed in
243 | _visited_composed_classes = (Animal,)
244 | response (ResponseWarningsResponse): [optional] # noqa: E501
245 | """
246 |
247 | _check_type = kwargs.pop("_check_type", True)
248 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
249 | _path_to_item = kwargs.pop("_path_to_item", ())
250 | _configuration = kwargs.pop("_configuration", None)
251 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
252 |
253 | if args:
254 | for arg in args:
255 | if isinstance(arg, dict):
256 | kwargs.update(arg)
257 | else:
258 | raise ApiTypeError(
259 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
260 | % (
261 | args,
262 | self.__class__.__name__,
263 | ),
264 | path_to_item=_path_to_item,
265 | valid_classes=(self.__class__,),
266 | )
267 |
268 | self._data_store = {}
269 | self._check_type = _check_type
270 | self._spec_property_naming = _spec_property_naming
271 | self._path_to_item = _path_to_item
272 | self._configuration = _configuration
273 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
274 |
275 | for var_name, var_value in kwargs.items():
276 | if (
277 | var_name not in self.attribute_map
278 | and self._configuration is not None
279 | and self._configuration.discard_unknown_keys
280 | and self.additional_properties_type is None
281 | ):
282 | # discard variable.
283 | continue
284 | setattr(self, var_name, var_value)
285 | if var_name in self.read_only_vars:
286 | raise ApiAttributeError(
287 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
288 | f"class with read only attributes."
289 | )
290 |
--------------------------------------------------------------------------------
/python-client/deutschland/travelwarning/model/artikel.py:
--------------------------------------------------------------------------------
1 | """
2 | Auswärtiges Amt: Reisewarnungen OpenData Schnittstelle
3 |
4 | Reisewarnungen OpenData Schnittstelle. Dies ist die Beschreibung für die Schnittstelle zum Zugriff auf die Daten des [Auswärtigen Amtes](https://www.auswaertiges-amt.de/de/) im Rahmen der [OpenData](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) Initiative. ## Deaktivierung Die Schnittstelle kann deaktiviert werden, in dem Fall wird ein leeres JSON-Objekt zurückgegeben. ## Fehlerfall Im Fehlerfall wird ein leeres JSON-Objekt zurückgegeben. ## Nutzungsbedingungen Die Nutzungsbedingungen sind auf der [OpenData-Schnittstelle](https://www.auswaertiges-amt.de/de/open-data-schnittstelle/736118) des Auswärtigen Amtes zu finden. ## Änderungen [(offizielles Changelog)](https://www.auswaertiges-amt.de/de/-/2412916) ### version [1.2.7](https://www.auswaertiges-amt.de/de/-/2412916) - (02.08.2022) Dreistellige ISO-Ländercodes ([ISO 3166-1 alpha-3](https://de.wikipedia.org/wiki/ISO-3166-1-Kodierliste)) wurden als `iso3CountryCode` hinzugefügt. ### version [1.2.6](https://www.auswaertiges-amt.de/de/-/2412916) - (08.12.2021) Es werden zusätzlich zu jedem Land **Ländercodes** mit jeweils **zwei Buchstaben** mit ausgegeben. Die Länderkürzel werden bei [`/travelwarning`](#operations-default-getTravelwarning) und [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) in einem neuen Attribut ausgegeben z.B. in: [`/travelwarning/199124`](https://www.auswaertiges-amt.de/opendata/travelwarning/199124). ### version [1.2.5](https://www.auswaertiges-amt.de/de/-/2412916) (ursprünglich geplant für Ende September 2021) `content` (-> Details des Reise- und Sicherheitshinweis) wurde von [`/travelwarning`](#operations-default-getTravelwarning) entfernt -> bitte ab jetzt [`/travelwarning/{contentId}`](#operations-default-getSingleTravelwarning) nutzen um `content` abzufragen `flagURL` (-> Details des Reise- und Sicherheitshinweis) wurde entfernt -> es werden keine **Flaggen** mehr angeboten # noqa: E501
5 |
6 | The version of the OpenAPI document: 1.2.6
7 | Contact: kontakt@bund.dev
8 | Generated by: https://openapi-generator.tech
9 | """
10 |
11 |
12 | import re # noqa: F401
13 | import sys # noqa: F401
14 |
15 | from deutschland.travelwarning.exceptions import ApiAttributeError
16 | from deutschland.travelwarning.model_utils import ( # noqa: F401
17 | ApiTypeError,
18 | ModelComposed,
19 | ModelNormal,
20 | ModelSimple,
21 | OpenApiModel,
22 | cached_property,
23 | change_keys_js_to_python,
24 | convert_js_args_to_python_args,
25 | date,
26 | datetime,
27 | file_type,
28 | none_type,
29 | validate_get_composed_info,
30 | )
31 |
32 |
33 | class Artikel(ModelNormal):
34 | """NOTE: This class is auto generated by OpenAPI Generator.
35 | Ref: https://openapi-generator.tech
36 |
37 | Do not edit the class manually.
38 |
39 | Attributes:
40 | allowed_values (dict): The key is the tuple path to the attribute
41 | and the for var_name this is (var_name,). The value is a dict
42 | with a capitalized key describing the allowed value and an allowed
43 | value. These dicts store the allowed enum values.
44 | attribute_map (dict): The key is attribute name
45 | and the value is json key in definition.
46 | discriminator_value_class_map (dict): A dict to go from the discriminator
47 | variable value to the discriminator class name.
48 | validations (dict): The key is the tuple path to the attribute
49 | and the for var_name this is (var_name,). The value is a dict
50 | that stores validations for max_length, min_length, max_items,
51 | min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52 | inclusive_minimum, and regex.
53 | additional_properties_type (tuple): A tuple of classes accepted
54 | as additional properties values.
55 | """
56 |
57 | allowed_values = {}
58 |
59 | validations = {}
60 |
61 | @cached_property
62 | def additional_properties_type():
63 | """
64 | This must be a method because a model may have properties that are
65 | of type self, this must run after the class is loaded
66 | """
67 | return (
68 | bool,
69 | date,
70 | datetime,
71 | dict,
72 | float,
73 | int,
74 | list,
75 | str,
76 | none_type,
77 | ) # noqa: E501
78 |
79 | _nullable = False
80 |
81 | @cached_property
82 | def openapi_types():
83 | """
84 | This must be a method because a model may have properties that are
85 | of type self, this must run after the class is loaded
86 |
87 | Returns
88 | openapi_types (dict): The key is attribute name
89 | and the value is attribute type.
90 | """
91 | return {
92 | "last_modified": (float,), # noqa: E501
93 | "title": (str,), # noqa: E501
94 | "content": (str,), # noqa: E501
95 | }
96 |
97 | @cached_property
98 | def discriminator():
99 | return None
100 |
101 | attribute_map = {
102 | "last_modified": "lastModified", # noqa: E501
103 | "title": "title", # noqa: E501
104 | "content": "content", # noqa: E501
105 | }
106 |
107 | read_only_vars = {}
108 |
109 | _composed_schemas = {}
110 |
111 | @classmethod
112 | @convert_js_args_to_python_args
113 | def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
114 | """Artikel - a model defined in OpenAPI
115 |
116 | Keyword Args:
117 | _check_type (bool): if True, values for parameters in openapi_types
118 | will be type checked and a TypeError will be
119 | raised if the wrong type is input.
120 | Defaults to True
121 | _path_to_item (tuple/list): This is a list of keys or values to
122 | drill down to the model in received_data
123 | when deserializing a response
124 | _spec_property_naming (bool): True if the variable names in the input data
125 | are serialized names, as specified in the OpenAPI document.
126 | False if the variable names in the input data
127 | are pythonic names, e.g. snake case (default)
128 | _configuration (Configuration): the instance to use when
129 | deserializing a file_type parameter.
130 | If passed, type conversion is attempted
131 | If omitted no type conversion is done.
132 | _visited_composed_classes (tuple): This stores a tuple of
133 | classes that we have traveled through so that
134 | if we see that class again we will not use its
135 | discriminator again.
136 | When traveling through a discriminator, the
137 | composed schema that is
138 | is traveled through is added to this set.
139 | For example if Animal has a discriminator
140 | petType and we pass in "Dog", and the class Dog
141 | allOf includes Animal, we move through Animal
142 | once using the discriminator, and pick Dog.
143 | Then in Dog, we will make an instance of the
144 | Animal class but this time we won't travel
145 | through its discriminator because we passed in
146 | _visited_composed_classes = (Animal,)
147 | last_modified (float): Zeitstempel der letzten Änderung. [optional] # noqa: E501
148 | title (str): Titel. [optional] # noqa: E501
149 | content (str): Inhalt. [optional] # noqa: E501
150 | """
151 |
152 | _check_type = kwargs.pop("_check_type", True)
153 | _spec_property_naming = kwargs.pop("_spec_property_naming", True)
154 | _path_to_item = kwargs.pop("_path_to_item", ())
155 | _configuration = kwargs.pop("_configuration", None)
156 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
157 |
158 | self = super(OpenApiModel, cls).__new__(cls)
159 |
160 | if args:
161 | for arg in args:
162 | if isinstance(arg, dict):
163 | kwargs.update(arg)
164 | else:
165 | raise ApiTypeError(
166 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
167 | % (
168 | args,
169 | self.__class__.__name__,
170 | ),
171 | path_to_item=_path_to_item,
172 | valid_classes=(self.__class__,),
173 | )
174 |
175 | self._data_store = {}
176 | self._check_type = _check_type
177 | self._spec_property_naming = _spec_property_naming
178 | self._path_to_item = _path_to_item
179 | self._configuration = _configuration
180 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
181 |
182 | for var_name, var_value in kwargs.items():
183 | if (
184 | var_name not in self.attribute_map
185 | and self._configuration is not None
186 | and self._configuration.discard_unknown_keys
187 | and self.additional_properties_type is None
188 | ):
189 | # discard variable.
190 | continue
191 | setattr(self, var_name, var_value)
192 | return self
193 |
194 | required_properties = set(
195 | [
196 | "_data_store",
197 | "_check_type",
198 | "_spec_property_naming",
199 | "_path_to_item",
200 | "_configuration",
201 | "_visited_composed_classes",
202 | ]
203 | )
204 |
205 | @convert_js_args_to_python_args
206 | def __init__(self, *args, **kwargs): # noqa: E501
207 | """Artikel - a model defined in OpenAPI
208 |
209 | Keyword Args:
210 | _check_type (bool): if True, values for parameters in openapi_types
211 | will be type checked and a TypeError will be
212 | raised if the wrong type is input.
213 | Defaults to True
214 | _path_to_item (tuple/list): This is a list of keys or values to
215 | drill down to the model in received_data
216 | when deserializing a response
217 | _spec_property_naming (bool): True if the variable names in the input data
218 | are serialized names, as specified in the OpenAPI document.
219 | False if the variable names in the input data
220 | are pythonic names, e.g. snake case (default)
221 | _configuration (Configuration): the instance to use when
222 | deserializing a file_type parameter.
223 | If passed, type conversion is attempted
224 | If omitted no type conversion is done.
225 | _visited_composed_classes (tuple): This stores a tuple of
226 | classes that we have traveled through so that
227 | if we see that class again we will not use its
228 | discriminator again.
229 | When traveling through a discriminator, the
230 | composed schema that is
231 | is traveled through is added to this set.
232 | For example if Animal has a discriminator
233 | petType and we pass in "Dog", and the class Dog
234 | allOf includes Animal, we move through Animal
235 | once using the discriminator, and pick Dog.
236 | Then in Dog, we will make an instance of the
237 | Animal class but this time we won't travel
238 | through its discriminator because we passed in
239 | _visited_composed_classes = (Animal,)
240 | last_modified (float): Zeitstempel der letzten Änderung. [optional] # noqa: E501
241 | title (str): Titel. [optional] # noqa: E501
242 | content (str): Inhalt. [optional] # noqa: E501
243 | """
244 |
245 | _check_type = kwargs.pop("_check_type", True)
246 | _spec_property_naming = kwargs.pop("_spec_property_naming", False)
247 | _path_to_item = kwargs.pop("_path_to_item", ())
248 | _configuration = kwargs.pop("_configuration", None)
249 | _visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
250 |
251 | if args:
252 | for arg in args:
253 | if isinstance(arg, dict):
254 | kwargs.update(arg)
255 | else:
256 | raise ApiTypeError(
257 | "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
258 | % (
259 | args,
260 | self.__class__.__name__,
261 | ),
262 | path_to_item=_path_to_item,
263 | valid_classes=(self.__class__,),
264 | )
265 |
266 | self._data_store = {}
267 | self._check_type = _check_type
268 | self._spec_property_naming = _spec_property_naming
269 | self._path_to_item = _path_to_item
270 | self._configuration = _configuration
271 | self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
272 |
273 | for var_name, var_value in kwargs.items():
274 | if (
275 | var_name not in self.attribute_map
276 | and self._configuration is not None
277 | and self._configuration.discard_unknown_keys
278 | and self.additional_properties_type is None
279 | ):
280 | # discard variable.
281 | continue
282 | setattr(self, var_name, var_value)
283 | if var_name in self.read_only_vars:
284 | raise ApiAttributeError(
285 | f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
286 | f"class with read only attributes."
287 | )
288 |
--------------------------------------------------------------------------------