diff --git a/docs/contact.md b/docs/contact.md index 435fc74d9ef2130f2207eb0210453391f872be73..c299b470a214a6a5fc7abcbedf7d9a135ce8c0aa 100644 --- a/docs/contact.md +++ b/docs/contact.md @@ -8,30 +8,32 @@ hide: ## Team -### Project +### Project Management -Ao.univ.Prof. Dr. [Andreas Rauber](//tiss.tuwien.ac.at/person/39608.html)<br /> +Ao.univ.Prof. Dr. [Andreas Rauber](https://www.ifs.tuwien.ac.at/~andi)<br /> Technische Universität Wien<br /> -Information and Software Engineering Group<br /> +Research Unit Data Science<br /> Favoritenstraße 9-11<br /> A-1040 Vienna, Austria ### Development -Projektass. Dipl.-Ing. [Martin Weise](//tiss.tuwien.ac.at/person/287722.html)<br /> +Projektass. Dipl.-Ing. [Martin Weise](https://ec.tuwien.ac.at/~weise/)<br /> Technische Universität Wien<br /> -Information and Software Engineering Group<br /> +Research Unit Data Science<br /> Favoritenstraße 9-11<br /> A-1040 Vienna, Austria -## Contributors - -- Martin Weise -- Moritz Staudinger -- Cornelia Michlits -- Eva Gergely -- Kirill Stytsenko -- Josef Taha -- Tobias Grantner -- Raman Ganguly -- Andreas Rauber +## Contributors (alphabetically) + +- Ganguly, Raman +- Gergely, Eva +- Grantner, Tobias +- Karnbach, Geoffrey +- Michlits, Cornelia +- Rauber, Andreas +- Staudinger, Moritz +- Stytsenko, Kirill +- Taha, Josef +- Tsepelakis, Sotiris +- Weise, Martin diff --git a/docs/customization.md b/docs/customization.md index ac90f88cae6db22427205ba85809718b90a1d8bb..af996d9c644c2964a92961c94bbc3b0e72c17404 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -10,11 +10,47 @@ hide: On this page, we showcase the customization capabilities of DBRepo to e.g. whitelabel your deployment. -## Logo +## Custom Title -If you want to display your own logo instead of the placeholder logo in the UI, you need to: +The default title is "Database Repository" and can be replaced by changing the `TITLE` environment variable. + +## Custom Logo + +The default placeholder logo consists of the two universities that developed this software. You can replace it by +mounting your own logo with a volume. + +```console +docker run -v /path/to/your_logo.png:/logo.png ... +``` + +In case your logo is not in PNG format, you need to change the environment variable `LOGO` accordingly, e.g. for a logo +in JPEG format, set `LOGO: "/logo.JPEG"` in the `.env` file and start the container with a volume. + +```console +docker run -v /path/to/your_logo.JPEG:/logo.JPEG ... +``` <figure markdown>  -<figcaption>Custom logo which replaces the default placeholder logo.</figcaption> +<figcaption>Custom logo which replaces the default placeholder logo</figcaption> </figure> + +## Custom Icon + +The default placeholder icon can be replaced by mounting your own icon with a volume. + +```console +docker run -v /path/to/your_logo.ico:/favicon.ico ... +``` + +<figure markdown> + +<figcaption>Custom icon which replaces the default placeholder icon</figcaption> +</figure> + +In case your icon is not in ICO format, you need to change the environment variable `ICON` accordingly, e.g. for an icon +in GIF format, set `ICON: "/favicon.GIF"` in the `.env` file and start the container with a volume. + +```console +docker run -v /path/to/favicon.GIF:/favicon.GIF ... +``` diff --git a/docs/get-started.md b/docs/get-started.md index 862ec4633c95387ad0db989e8b49094d087f702a..59921120fd735ef9ea1646f1b7a8523dba9866b6 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -17,8 +17,9 @@ hide: ### Hardware -For this small, local, test deployment any modern hardware would suffice, we recommend a machine (or laptop) with at -least: +For this small, local, test deployment any modern hardware would suffice, we recommend a dedicated virtual machine with +the following settings. Note that most of the CPU and RAM resources will be needed for starting the infrastructure, +this is because of Docker. - 8 CPU cores - 16GB RAM memory @@ -83,7 +84,7 @@ running system within minutes to play around within the system and explore featu [simple guide](https://onlinehelp.coveo.com/en/ces/7.0/administrator/changing_the_rabbitmq_administrator_password.htm) to be very useful. - * **Search Service**: by default, this service is configured to require authentication with an administrative user + * **Search Database**: by default, this service is configured to require authentication with an administrative user that is allowed to write into the indizes. Following this [simple guide](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/reset-password.html), this can be achieved using the command line. diff --git a/docs/images/architecture.png b/docs/images/architecture.png index f02f070de6eb492e7e294c0e5aa25623cf829c3c..f2353af4120193e1d777f1c1eaf8fad95a5c761c 100644 Binary files a/docs/images/architecture.png and b/docs/images/architecture.png differ diff --git a/docs/images/auth-ssl.png b/docs/images/auth-ssl.png deleted file mode 100644 index 494172505d996c548b2a340b5201b8851b0a6d1d..0000000000000000000000000000000000000000 Binary files a/docs/images/auth-ssl.png and /dev/null differ diff --git a/docs/images/custom_icon.png b/docs/images/custom_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fde478eaffef802311bc0a370931bf6a30f3eb82 Binary files /dev/null and b/docs/images/custom_icon.png differ diff --git a/docs/images/custom_logo.png b/docs/images/custom_logo.png index cf4ea1122c529fb45596860cf5b9a50fcf4adbc8..b84dcdae2f5fd04d84245c05b20b0ad9ad342b12 100644 Binary files a/docs/images/custom_logo.png and b/docs/images/custom_logo.png differ diff --git a/docs/images/deployment-tuwien.png b/docs/images/deployment-tuwien.png index b70dfb7b4e6ff1e191975170f05e8665e93ee28a..642b1de2fe6dfa660b1978bbacb24f7e70cb2886 100644 Binary files a/docs/images/deployment-tuwien.png and b/docs/images/deployment-tuwien.png differ diff --git a/docs/images/groups-roles.png b/docs/images/groups-roles.png index 3c73de60a81e3a9f1343b3f39f4f373daa42b680..8762013cda252dd93e4278df9f5e3994c4d6a8cb 100644 Binary files a/docs/images/groups-roles.png and b/docs/images/groups-roles.png differ diff --git a/docs/system.md b/docs/system.md index a1835dd2f44220d75500429a727a3e3ce36df271..23b1373f5a3ca49d548651df720c2de0c92392ea 100644 --- a/docs/system.md +++ b/docs/system.md @@ -1,7 +1,9 @@ --- author: Martin Weise hide: + - navigation + --- # System @@ -185,6 +187,25 @@ public ResponseEntity<DatabaseBriefDto> create(@NotNull Long containerId, | `modify-user-theme` | Can modify the user theme (light, dark) | | `modify-user-information` | Can modify the user information | +##### Default Maintenance Handling + +| Name | Description | +|------------------------------|------------------------------------------| +| `create-maintenance-message` | Can create a maintenance message banner | +| `delete-maintenance-message` | Can delete a maintenance message banner | +| `find-maintenance-message` | Can find a maintenance message banner | +| `list-maintenance-messages` | Can list all maintenance message banners | +| `update-maintenance-message` | Can update a maintenance message banner | + +##### Default Semantics Handling + +| Name | Description | +|---------------------------|-----------------------------------------------------------------| +| `create-semantic-unit` | Can save a previously unknown unit for a table column | +| `create-semantic-concept` | Can save a previously unknown concept for a table column | +| `execute-semantic-query` | Can query remote SPARQL endpoints to get labels and description | +| `table-semantic-analyse` | Can automatically suggest units and concepts for a table | + ##### Escalated User Handling | Name | Description | @@ -214,6 +235,7 @@ public ResponseEntity<DatabaseBriefDto> create(@NotNull Long containerId, | Name | Description | |------|-------------| +| / | | ##### Escalated Identifier Handling @@ -223,6 +245,18 @@ public ResponseEntity<DatabaseBriefDto> create(@NotNull Long containerId, | `delete-identifier` | Can delete any identifier | | `modify-identifier-metadata` | Can modify any identifier metadata | +##### Escalated Semantics Handling + +| Name | Description | +|-----------------------------------------|----------------------------------------------| +| `create-ontology` | Can register a new ontology | +| `delete-ontology` | Can unregister an ontology | +| `list-ontologies` | Can list all ontologies | +| `modify-foreign-table-column-semantics` | Can modify any table column concept and unit | +| `update-ontology` | Can update ontology metadata | +| `update-semantic-concept` | Can update own table column concept | +| `update-semantic-unit` | Can update own table column unit | + #### API ##### Obtain Access Token @@ -288,7 +322,7 @@ Using the response from above, a new access token can be created via the refresh * RabbitMQ Prometheus Plugin: `http://:15692/metrics` It holds exchanges and topics responsible for holding AMQP messages for later consumption. We -use [RabbitMQ](https://www.rabbitmq.com/) in the reference implementation. The AMQP endpoint listens to port `5672` for +use [RabbitMQ](https://www.rabbitmq.com/) in the implementation. The AMQP endpoint listens to port `5672` for regular declares and offers a management interface at port `15672`. The default credentials are: @@ -321,20 +355,6 @@ It is responsible for Docker container lifecycle operations and updating the loc It creates the databases inside a Docker container and the Query Store. Currently, we only support [MariaDB](https://mariadb.org/) images that allow table versioning with low programmatic effort. -### Discovery Service - -!!! debug "Debug Information" - - * Ports: 9090/tcp - * Info: `http://:9090/actuator/info` - * Health: `http://:9090/actuator/health` - * Prometheus: `http://:9090/actuator/prometheus` - * Eureka Dashboard: `http://:9090/` - -This microservice allows service discovery and registration of containers that provide services. It configures -a [Spring Cloud Netflix Eureka Server](https://cloud.spring.io/spring-cloud-netflix/reference/html/) to discover -services. - ### Gateway Service !!! debug "Debug Information" @@ -344,8 +364,8 @@ services. * Health: `http://:9095/actuator/health` * Prometheus: `http://:9095/actuator/prometheus` -Provides a single point of access to the *application programming interface* (API) and configures -the [Spring Cloud Gateway](https://spring.io/projects/spring-cloud-gateway) to route traffic to the services. +Provides a single point of access to the *application programming interface* (API) and configures a +standard [NGINX](https://www.nginx.com/) reverse proxy for load balancing, SSL/TLS configuration. ### Identifier Service @@ -392,14 +412,6 @@ port `3306`. This service provides an OAI-PMH endpoint for metadata crawler. -### Proxy - -!!! debug "Debug Information" - - * Ports: 80/tcp, 443/tcp - -The NGINX reverse proxy bundles the services and enables SSL/TLS communication for all endpoints. - ### Query Service !!! debug "Debug Information" @@ -414,15 +426,16 @@ It provides an interface to insert data into the tables created by the Table Ser paginated and versioned query execution to the raw data and consumes messages in the message queue from the Broker Service. -### Search Service +### Search Database !!! debug "Debug Information" * Ports: 9200/tcp - * Indizes: `http://:9200/_all` + * Indexes: `http://:9200/_all` + * Health: `http://:9200/_cluster/health/` -It processes search requests from the Gateway Service for full-text lookups in the Metadata Database. We use -[Elasticsearch](https://www.elastic.co/) in the reference implementation. The Search Service implements Elastic Search +It processes search requests from the Gateway Service for full-text lookups in the metadata database. We use +[Elasticsearch](https://www.elastic.co/) in the reference implementation. The search database implements Elastic Search and creates a retrievable index on all databases that is getting updated with each save operation on databases in the metadata database. @@ -432,9 +445,11 @@ All requests need to be authenticated, by default the credentials `elastic:elast !!! debug "Debug Information" - * Ports: 5010/tcp - * Prometheus: `http://:5010/metrics` - * Swagger UI: `http://:5010/swagger-ui/index.html` <a href="/infrastructures/dbrepo/swagger/semantics" target="_blank">:fontawesome-solid-square-up-right: view online</a> + * Ports: 9097/tcp + * Info: `http://:9097/actuator/info` + * Health: `http://:9097/actuator/health` + * Prometheus: `http://:9097/actuator/prometheus` + * Swagger UI: `http://:9097/swagger-ui/index.html` <a href="/infrastructures/dbrepo/swagger/semantics" target="_blank">:fontawesome-solid-square-up-right: view online</a> It is designed to map terms in the domain of units of measurement to controlled vocabulary, modelled in the [ontology of units of measure](https://github.com/HajoRijgersberg/OM). This service validates researcher provided in diff --git a/misc/architecture.drawio b/misc/architecture.drawio index bdd437b0a275aa70fe2e702ce0632dadcd54f665..a688ab902baf1d21022d7a0bfbc1e6c0dbd70a1f 100644 --- a/misc/architecture.drawio +++ b/misc/architecture.drawio @@ -1,4 +1,4 @@ -<mxfile host="Electron" modified="2023-05-24T09:23:45.383Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.1.2 Chrome/106.0.5249.199 Electron/21.4.3 Safari/537.36" etag="5oa3miSaTiV7Vprq83bZ" version="21.1.2" type="device" pages="3"> +<mxfile host="Electron" modified="2023-06-01T06:09:08.990Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.1.2 Chrome/106.0.5249.199 Electron/21.4.3 Safari/537.36" etag="-Z1STi4cUE9hBolYebCG" version="21.1.2" type="device" pages="3"> <diagram name="Deployment" id="BS_rNRZWEkVqn4O3IFNu"> <mxGraphModel dx="1434" dy="822" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="840" pageHeight="509" math="0" shadow="0"> <root> @@ -58,7 +58,7 @@ <mxCell id="qJbSU32InUa3qXW1C_Xf-11" value="Analyse Service" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> <mxGeometry x="516" y="308" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="qJbSU32InUa3qXW1C_Xf-12" value="Search Service" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> + <mxCell id="qJbSU32InUa3qXW1C_Xf-12" value="Search Database" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> <mxGeometry x="666" y="248" width="130" height="40" as="geometry" /> </mxCell> <mxCell id="qJbSU32InUa3qXW1C_Xf-13" value="Semantics Service" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> @@ -199,9 +199,6 @@ <mxCell id="qJbSU32InUa3qXW1C_Xf-95" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://assets.stickpng.com/images/58480f12cef1014c0b5e4931.png;" parent="1" vertex="1"> <mxGeometry x="772.17" y="400" width="34.67" height="23" as="geometry" /> </mxCell> - <mxCell id="k2mV4V4qi4BGH7ll39v4-1" value="Elastic Search" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#B3B3B3;fontColor=#000000;strokeColor=#000000;" parent="1" vertex="1"> - <mxGeometry x="666" y="309" width="130" height="40" as="geometry" /> - </mxCell> <mxCell id="EIwzJq8dkpXTqFd1RJj--1" value="User Service" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> <mxGeometry x="355" y="308" width="130" height="40" as="geometry" /> </mxCell> @@ -240,14 +237,6 @@ <mxCell id="CohMdi7D_fRk0dSxzjYi-1" value="Gateway Service" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#B3B3B3;fontColor=#000000;strokeColor=#000000;" parent="1" vertex="1"> <mxGeometry x="24" y="206" width="130" height="40" as="geometry" /> </mxCell> - <mxCell id="glPSNq5Z3xSe9Szlq7L9-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="FjrNxjV7lKJhjLr2JuWJ-1" edge="1"> - <mxGeometry relative="1" as="geometry"> - <mxPoint x="121" y="466" as="targetPoint" /> - </mxGeometry> - </mxCell> - <mxCell id="FjrNxjV7lKJhjLr2JuWJ-1" value="Search Service" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="212" y="446.5" width="130" height="40" as="geometry" /> - </mxCell> <mxCell id="13tBXMPt0xomx7MP2VuM-1" value="Analyse Service" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> <mxGeometry x="384" y="526" width="130" height="40" as="geometry" /> </mxCell> @@ -540,7 +529,7 @@ <mxCell id="7RDKXMOAFIesw4qWB4ET-105" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://assets.stickpng.com/images/58480f12cef1014c0b5e4931.png;" parent="7RDKXMOAFIesw4qWB4ET-103" vertex="1"> <mxGeometry x="28" y="33" width="34.67" height="23" as="geometry" /> </mxCell> - <mxCell id="glPSNq5Z3xSe9Szlq7L9-6" value="Elastic<br>Search" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#B3B3B3;fontColor=#000000;strokeColor=#000000;" parent="1" vertex="1"> + <mxCell id="glPSNq5Z3xSe9Szlq7L9-6" value="Search<br>Database" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;fillColor=#B3B3B3;fontColor=#000000;strokeColor=#000000;" parent="1" vertex="1"> <mxGeometry x="60" y="426.5" width="60" height="80" as="geometry" /> </mxCell> <mxCell id="45LT9Xtm5jvL1Omwo4Uv-4" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://brandslogos.com/wp-content/uploads/images/large/elastic-elasticsearch-logo.png;imageBackground=default;" parent="1" vertex="1"> diff --git a/misc/diagrams.drawio b/misc/diagrams.drawio index a398066651a1f3f8bb6d01912581d4197c66fef9..fbd74ffbebb5fbef00411b9f97ea8f4a286d3d4b 100644 --- a/misc/diagrams.drawio +++ b/misc/diagrams.drawio @@ -1,6 +1,6 @@ -<mxfile host="Electron" modified="2023-05-24T09:23:59.741Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.1.2 Chrome/106.0.5249.199 Electron/21.4.3 Safari/537.36" etag="kEBBNfs3pHTYPqyQ0YQ_" version="21.1.2" type="device"> +<mxfile host="Electron" modified="2023-06-01T05:20:18.779Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.1.2 Chrome/106.0.5249.199 Electron/21.4.3 Safari/537.36" etag="dIGRWifoC4RPeXPQbuQo" version="21.1.2" type="device"> <diagram id="knNdf-EWXshwNRS6GdW0" name="groups-roles"> - <mxGraphModel dx="1434" dy="822" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="585" pageHeight="520" math="0" shadow="0"> + <mxGraphModel dx="1434" dy="822" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="585" pageHeight="581" math="0" shadow="0"> <root> <mxCell id="0" /> <mxCell id="1" parent="0" /> @@ -13,10 +13,10 @@ </mxGeometry> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-26" value="" style="rounded=1;whiteSpace=wrap;html=1;arcSize=7;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#000000;" parent="1" vertex="1"> - <mxGeometry x="223.5" y="156" width="141" height="360" as="geometry" /> + <mxGeometry x="223.5" y="156" width="141" height="424" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-22" value="" style="rounded=1;whiteSpace=wrap;html=1;arcSize=7;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#000000;" parent="1" vertex="1"> - <mxGeometry x="2" y="156" width="141" height="360" as="geometry" /> + <mxGeometry x="2" y="156" width="141" height="424" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="p7gkXpudOZQYVS-MGniQ-1" target="p7gkXpudOZQYVS-MGniQ-4" edge="1"> <mxGeometry relative="1" as="geometry" /> @@ -75,23 +75,38 @@ <mxGeometry x="12.5" y="346" width="120" height="40" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-18" value="escalated-container-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="234" y="166" width="120" height="40" as="geometry" /> + <mxGeometry x="234" y="226" width="120" height="40" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-19" value="escalated-database-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="234" y="226" width="120" height="40" as="geometry" /> + <mxGeometry x="234" y="286" width="120" height="40" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-20" value="escalated-query-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="234" y="346" width="120" height="40" as="geometry" /> + <mxGeometry x="234" y="406" width="120" height="40" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-21" value="escalated-table-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> - <mxGeometry x="234" y="286" width="120" height="40" as="geometry" /> + <mxGeometry x="234" y="346" width="120" height="40" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-30" value="" style="rounded=1;whiteSpace=wrap;html=1;arcSize=7;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#000000;" parent="1" vertex="1"> - <mxGeometry x="441.5" y="156" width="141" height="360" as="geometry" /> + <mxGeometry x="441.5" y="156" width="141" height="424" as="geometry" /> </mxCell> <mxCell id="p7gkXpudOZQYVS-MGniQ-31" value="escalated-identifier-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"> + <mxGeometry x="452" y="286" width="120" height="40" as="geometry" /> + </mxCell> + <mxCell id="eG7ZnV9Yg5ZkV4eK6rEn-1" value="default-semantics-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="12" y="530" width="120" height="40" as="geometry" /> + </mxCell> + <mxCell id="eG7ZnV9Yg5ZkV4eK6rEn-3" value="default-maintenance-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="234" y="166" width="120" height="40" as="geometry" /> + </mxCell> + <mxCell id="eG7ZnV9Yg5ZkV4eK6rEn-5" value="default-user-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> <mxGeometry x="452" y="166" width="120" height="40" as="geometry" /> </mxCell> + <mxCell id="eG7ZnV9Yg5ZkV4eK6rEn-6" value="default-semantics-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="452" y="226" width="120" height="40" as="geometry" /> + </mxCell> + <mxCell id="eG7ZnV9Yg5ZkV4eK6rEn-7" value="escalated-semantics-<br>handling" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"> + <mxGeometry x="452" y="346" width="120" height="40" as="geometry" /> + </mxCell> </root> </mxGraphModel> </diagram> diff --git a/swagger/api-container.yaml b/swagger/api-container.yaml index bd8f5e74d4bbc1ad62e1c601504e3b1132c17f0f..2102e2f63cab2048d1c546149d233b3c141faf6d 100644 --- a/swagger/api-container.yaml +++ b/swagger/api-container.yaml @@ -32,18 +32,18 @@ paths: type: integer format: int64 responses: - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "200": description: Found image content: application/json: schema: $ref: '#/components/schemas/ImageDto' + "404": + description: Image could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' put: tags: - image-endpoint @@ -63,18 +63,18 @@ paths: $ref: '#/components/schemas/ImageChangeDto' required: true responses: - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "202": description: Updated image successfully content: application/json: schema: $ref: '#/components/schemas/ImageDto' + "404": + description: Image could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] delete: @@ -83,21 +83,21 @@ paths: summary: Delete some image operationId: delete parameters: - - name: imageId + - name: id in: path required: true schema: type: integer format: int64 responses: + "202": + description: Deleted image successfully "404": description: Image could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "202": - description: Deleted image successfully security: - bearerAuth: [] /api/container/{id}: @@ -114,18 +114,18 @@ paths: type: integer format: int64 responses: - "200": - description: Found container + "502": + description: Docker client failed to connect content: application/json: schema: - $ref: '#/components/schemas/ContainerDto' - "502": - description: Connection to the container failed + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Found container content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/ContainerDto' "404": description: Container image could not be found content: @@ -151,20 +151,20 @@ paths: $ref: '#/components/schemas/ContainerChangeDto' required: true responses: - "404": - description: Container or user could not be found + "409": + description: Container is already started/stopped content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Modification of container state is not permitted + "404": + description: Container or user could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Container is already started/stopped + "405": + description: Modification of container state is not permitted content: application/json: schema: @@ -196,14 +196,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "202": - description: Deleted container successfully "409": description: Container is still running content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Deleted container successfully security: - bearerAuth: [] /api/image: @@ -218,7 +218,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/ContainerImage' post: tags: - image-endpoint @@ -231,6 +233,12 @@ paths: $ref: '#/components/schemas/ImageCreateDto' required: true responses: + "201": + description: Created image + content: + application/json: + schema: + $ref: '#/components/schemas/ImageDto' "404": description: User could not be found content: @@ -255,12 +263,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "201": - description: Created image - content: - application/json: - schema: - $ref: '#/components/schemas/ImageDto' security: - bearerAuth: [] /api/container: @@ -282,7 +284,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/ContainerBriefDto' post: tags: - container-endpoint @@ -295,12 +299,6 @@ paths: $ref: '#/components/schemas/ContainerCreateRequestDto' required: true responses: - "502": - description: Docker client failed to connect - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "201": description: Created a new container content: @@ -319,6 +317,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Docker client failed to connect + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] components: @@ -328,8 +332,12 @@ components: - dialect - driver_class - jdbc_method + - registry type: object properties: + registry: + type: string + example: docker.io/library defaultPort: maximum: 65535 minimum: 1024 @@ -370,6 +378,84 @@ components: - password - privileged_username - privileged_password + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - id + - jdbc_method + - registry + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + registry: + type: string + example: docker.io/library + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 ApiErrorDto: required: - code @@ -384,6 +470,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -455,80 +542,6 @@ components: code: type: string example: error.service.code - ImageDateDto: - required: - - database_format - - example - - has_time - - id - - unix_format - type: object - properties: - id: - type: integer - format: int64 - example: - type: string - example: 30.01.2022 - database_format: - type: string - example: '%d.%c.%Y' - unix_format: - type: string - example: dd.MM.YYYY - has_time: - type: boolean - example: false - created_at: - type: string - format: date-time - ImageDto: - required: - - default_port - - dialect - - driver_class - - id - - jdbc_method - - repository - - tag - type: object - properties: - id: - type: integer - format: int64 - repository: - type: string - example: mariadb - tag: - type: string - example: "10.5" - dialect: - type: string - example: org.hibernate.dialect.MariaDBDialect - hash: - type: string - example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e - compiled: - type: string - format: date-time - example: 2021-03-12T15:26:21.678396092Z - size: - type: integer - example: 314295447 - driver_class: - type: string - example: org.mariadb.jdbc.Driver - date_formats: - type: array - items: - $ref: '#/components/schemas/ImageDateDto' - jdbc_method: - type: string - example: mariadb - default_port: - type: integer - format: int32 - example: 3306 ContainerChangeDto: required: - action @@ -570,188 +583,1125 @@ components: format: date-time internal_name: type: string - example: air-quality - CreatorBriefDto: - required: - - firstname - - lastname + example: air-quality + CreatorBriefDto: + required: + - firstname + - lastname + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Wesleyan University + DatabaseBriefDto: + required: + - id + - name + - owner + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + description: + type: string + example: Air Quality in Austria + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' + engine: + type: string + example: mariadb:10.5 + owner: + $ref: '#/components/schemas/UserBriefDto' + container: + $ref: '#/components/schemas/ContainerBriefDto' + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + is_public: + type: boolean + example: true + IdentifierBriefDto: + required: + - container id + - creators + - database id + - id + - publication_year + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creators: + type: array + items: + $ref: '#/components/schemas/CreatorBriefDto' + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + publication_year: + type: integer + format: int32 + example: 2022 + UserBriefDto: + required: + - id + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + username: + type: string + description: Only contains lowercase characters + example: jcarberry + name: + type: string + example: Josiah Carberry + orcid: + type: string + example: 0000-0002-1825-0097 + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + email_verified: + type: boolean + example: true + ImageCreateDto: + required: + - default_port + - dialect + - driver_class + - jdbc_method + - registry + - repository + - tag + type: object + properties: + registry: + type: string + example: docker.io/library + repository: + type: string + example: mariadb + tag: + type: string + dialect: + type: string + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + jdbc_method: + type: string + default_port: + maximum: 65535 + minimum: 1024 + type: integer + format: int32 + ContainerCreateRequestDto: + required: + - name + - repository + - tag + type: object + properties: + name: + type: string + example: Air Quality + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + Constraints: + type: object + properties: + uniques: + type: array + items: + $ref: '#/components/schemas/Unique' + foreignKeys: + type: array + items: + $ref: '#/components/schemas/ForeignKey' + checks: + uniqueItems: true + type: array + items: + type: string + Container: + type: object + properties: + id: + type: integer + format: int64 + createdBy: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + ownedBy: + type: string + format: uuid + owner: + $ref: '#/components/schemas/User' + name: + type: string + internalName: + type: string + hash: + type: string + imageId: + type: integer + format: int64 + port: + type: integer + format: int32 + database: + $ref: '#/components/schemas/Database' + image: + $ref: '#/components/schemas/ContainerImage' + ipAddress: + type: string + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + ContainerImage: + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + registry: + type: string + tag: + type: string + driverClass: + type: string + dialect: + type: string + jdbcMethod: + type: string + hash: + type: string + compiled: + type: string + format: date-time + size: + type: integer + format: int64 + defaultPort: + type: integer + format: int32 + environment: + type: array + items: + $ref: '#/components/schemas/ContainerImageEnvironmentItem' + dateFormats: + type: array + items: + $ref: '#/components/schemas/ContainerImageDate' + containers: + type: array + items: + $ref: '#/components/schemas/Container' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + ContainerImageDate: + type: object + properties: + id: + type: integer + format: int64 + iid: + type: integer + format: int64 + image: + $ref: '#/components/schemas/ContainerImage' + example: + type: string + hasTime: + type: boolean + databaseFormat: + type: string + unixFormat: + type: string + createdAt: + type: string + format: date-time + ContainerImageEnvironmentItem: + type: object + properties: + id: + type: integer + format: int64 + iid: + type: integer + format: int64 + key: + type: string + value: + type: string + type: + type: string + enum: + - USERNAME + - PASSWORD + - PRIVILEGED_USERNAME + - PRIVILEGED_PASSWORD + image: + $ref: '#/components/schemas/ContainerImage' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + Creator: + type: object + properties: + id: + type: integer + format: int64 + pid: + type: integer + format: int64 + firstname: + type: string + lastname: + type: string + affiliation: + type: string + orcid: + type: string + identifier: + $ref: '#/components/schemas/Identifier' + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/User' + lastModified: + type: string + format: date-time + Credential: + type: object + properties: + id: + type: string + format: uuid + type: + type: string + userId: + type: string + format: uuid + createdDate: + type: integer + format: int64 + secretData: + type: string + credentialData: + type: string + priority: + type: integer + format: int32 + user: + $ref: '#/components/schemas/User' + Database: + type: object + properties: + id: + type: integer + format: int64 + createdBy: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + ownedBy: + type: string + format: uuid + owner: + $ref: '#/components/schemas/User' + container: + $ref: '#/components/schemas/Container' + name: + type: string + internalName: + type: string + exchangeName: + type: string + description: + type: string + contactPerson: + type: string + format: uuid + contact: + $ref: '#/components/schemas/User' + identifier: + $ref: '#/components/schemas/Identifier' + tables: + type: array + items: + $ref: '#/components/schemas/Table' + views: + type: array + items: + $ref: '#/components/schemas/View' + isPublic: + type: boolean + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + ForeignKey: + type: object + properties: + fkid: + type: integer + format: int64 + tid: + type: integer + format: int64 + tdbid: + type: integer + format: int64 + table: + $ref: '#/components/schemas/Table' + rtid: + type: integer + format: int64 + rtdbid: + type: integer + format: int64 + referencedTable: + $ref: '#/components/schemas/Table' + references: + type: array + items: + $ref: '#/components/schemas/ForeignKeyReference' + onUpdate: + type: string + enum: + - ReferenceType.RESTRICT + - ReferenceType.CASCADE + - ReferenceType.SET_NULL + - ReferenceType.NO_ACTION + - ReferenceType.SET_DEFAULT + onDelete: + type: string + enum: + - ReferenceType.RESTRICT + - ReferenceType.CASCADE + - ReferenceType.SET_NULL + - ReferenceType.NO_ACTION + - ReferenceType.SET_DEFAULT + ForeignKeyReference: + type: object + properties: + id: + type: integer + format: int64 + foreignKey: + $ref: '#/components/schemas/ForeignKey' + column: + $ref: '#/components/schemas/TableColumn' + referencedColumn: + $ref: '#/components/schemas/TableColumn' + Identifier: + required: + - publisher + type: object + properties: + id: + type: integer + format: int64 + containerId: + type: integer + format: int64 + databaseId: + type: integer + format: int64 + queryId: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/User' + title: + type: string + description: + type: string + publisher: + type: string + language: + type: string + enum: + - LanguageType.AB + - LanguageType.AA + - LanguageType.AF + - LanguageType.AK + - LanguageType.SQ + - LanguageType.AM + - LanguageType.AR + - LanguageType.AN + - LanguageType.HY + - LanguageType.AS + - LanguageType.AV + - LanguageType.AE + - LanguageType.AY + - LanguageType.AZ + - LanguageType.BM + - LanguageType.BA + - LanguageType.EU + - LanguageType.BE + - LanguageType.BN + - LanguageType.BH + - LanguageType.BI + - LanguageType.BS + - LanguageType.BR + - LanguageType.BG + - LanguageType.MY + - LanguageType.CA + - LanguageType.KM + - LanguageType.CH + - LanguageType.CE + - LanguageType.NY + - LanguageType.ZH + - LanguageType.CU + - LanguageType.CV + - LanguageType.KW + - LanguageType.CO + - LanguageType.CR + - LanguageType.HR + - LanguageType.CS + - LanguageType.DA + - LanguageType.DV + - LanguageType.NL + - LanguageType.DZ + - LanguageType.EN + - LanguageType.EO + - LanguageType.ET + - LanguageType.EE + - LanguageType.FO + - LanguageType.FJ + - LanguageType.FI + - LanguageType.FR + - LanguageType.FF + - LanguageType.GD + - LanguageType.GL + - LanguageType.LG + - LanguageType.KA + - LanguageType.DE + - LanguageType.KI + - LanguageType.EL + - LanguageType.KL + - LanguageType.GN + - LanguageType.GU + - LanguageType.HT + - LanguageType.HA + - LanguageType.HE + - LanguageType.HZ + - LanguageType.HI + - LanguageType.HO + - LanguageType.HU + - LanguageType.IS + - LanguageType.IO + - LanguageType.IG + - LanguageType.ID + - LanguageType.IA + - LanguageType.IE + - LanguageType.IU + - LanguageType.IK + - LanguageType.GA + - LanguageType.IT + - LanguageType.JA + - LanguageType.JV + - LanguageType.KN + - LanguageType.KR + - LanguageType.KS + - LanguageType.KK + - LanguageType.RW + - LanguageType.KV + - LanguageType.KG + - LanguageType.KO + - LanguageType.KJ + - LanguageType.KU + - LanguageType.KY + - LanguageType.LO + - LanguageType.LA + - LanguageType.LV + - LanguageType.LB + - LanguageType.LI + - LanguageType.LN + - LanguageType.LT + - LanguageType.LU + - LanguageType.MK + - LanguageType.MG + - LanguageType.MS + - LanguageType.ML + - LanguageType.MT + - LanguageType.GV + - LanguageType.MI + - LanguageType.MR + - LanguageType.MH + - LanguageType.RO + - LanguageType.MN + - LanguageType.NA + - LanguageType.NV + - LanguageType.ND + - LanguageType.NG + - LanguageType.NE + - LanguageType.SE + - LanguageType.NO + - LanguageType.NB + - LanguageType.NN + - LanguageType.II + - LanguageType.OC + - LanguageType.OJ + - LanguageType.OR + - LanguageType.OM + - LanguageType.OS + - LanguageType.PI + - LanguageType.PA + - LanguageType.PS + - LanguageType.FA + - LanguageType.PL + - LanguageType.PT + - LanguageType.QU + - LanguageType.RM + - LanguageType.RN + - LanguageType.RU + - LanguageType.SM + - LanguageType.SG + - LanguageType.SA + - LanguageType.SC + - LanguageType.SR + - LanguageType.SN + - LanguageType.SD + - LanguageType.SI + - LanguageType.SK + - LanguageType.SL + - LanguageType.SO + - LanguageType.ST + - LanguageType.NR + - LanguageType.ES + - LanguageType.SU + - LanguageType.SW + - LanguageType.SS + - LanguageType.SV + - LanguageType.TL + - LanguageType.TY + - LanguageType.TG + - LanguageType.TA + - LanguageType.TT + - LanguageType.TE + - LanguageType.TH + - LanguageType.BO + - LanguageType.TI + - LanguageType.TO + - LanguageType.TS + - LanguageType.TN + - LanguageType.TR + - LanguageType.TK + - LanguageType.TW + - LanguageType.UG + - LanguageType.UK + - LanguageType.UR + - LanguageType.UZ + - LanguageType.VE + - LanguageType.VI + - LanguageType.VO + - LanguageType.WA + - LanguageType.CY + - LanguageType.FY + - LanguageType.WO + - LanguageType.XH + - LanguageType.YI + - LanguageType.YO + - LanguageType.ZA + - LanguageType.ZU + license: + $ref: '#/components/schemas/License' + type: + type: string + enum: + - DATABASE + - SUBSET + query: + type: string + queryNormalized: + type: string + queryHash: + type: string + resultHash: + type: string + execution: + type: string + format: date-time + resultNumber: + type: integer + format: int64 + publicationYear: + type: integer + format: int32 + publicationMonth: + type: integer + format: int32 + publicationDay: + type: integer + format: int32 + visibility: + type: string + enum: + - VisibilityType.EVERYONE + - VisibilityType.SELF + database: + $ref: '#/components/schemas/Database' + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifier' + doi: + type: string + creators: + type: array + items: + $ref: '#/components/schemas/Creator' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + License: + type: object + properties: + identifier: + type: string + uri: + type: string + RelatedIdentifier: + type: object + properties: + id: + type: integer + format: int64 + iid: + type: integer + format: int64 + value: + type: string + type: + type: string + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + creator: + $ref: '#/components/schemas/User' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + Role: type: object properties: - firstname: + id: type: string - example: Josiah - lastname: + format: uuid + name: type: string - example: Carberry - affiliation: + realmId: type: string - example: Wesleyan University - DatabaseBriefDto: - required: - - id - - name - - owner + format: uuid + users: + type: array + items: + $ref: '#/components/schemas/User' + Table: type: object properties: id: type: integer format: int64 + tdbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/User' + owner: + $ref: '#/components/schemas/User' name: type: string - example: Air Quality - description: + internalName: type: string - example: Air Quality in Austria - identifier: - $ref: '#/components/schemas/IdentifierBriefDto' - engine: + queueName: type: string - example: mariadb:10.5 - owner: - $ref: '#/components/schemas/UserBriefDto' - container: - $ref: '#/components/schemas/ContainerBriefDto' - creator: - $ref: '#/components/schemas/UserBriefDto' + routingKey: + type: string + description: + type: string + database: + $ref: '#/components/schemas/Database' + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + constraints: + $ref: '#/components/schemas/Constraints' created: type: string format: date-time - is_public: - type: boolean - example: true - IdentifierBriefDto: - required: - - container id - - creators - - database id - - id - - publication_year - - title - - type + lastModified: + type: string + format: date-time + TableColumn: type: object properties: id: type: integer format: int64 - title: + tid: + type: integer + format: int64 + cdbid: + type: integer + format: int64 + dfid: + type: integer + format: int64 + dateFormat: + $ref: '#/components/schemas/ContainerImageDate' + table: + $ref: '#/components/schemas/Table' + view: + $ref: '#/components/schemas/View' + creator: + $ref: '#/components/schemas/User' + name: type: string - example: "Airquality Stephansplatz, Vienna, Austria" - type: + autoGenerated: + type: boolean + internalName: type: string - enum: - - database - - subset - doi: + isPrimaryKey: + type: boolean + indexLength: + type: integer + format: int32 + alias: type: string - example: 10.1038/nphys1170 - publisher: + columnType: type: string - example: TU Wien - creators: + enum: + - TableColumnType.ENUM + - TableColumnType.NUMBER + - TableColumnType.DECIMAL + - TableColumnType.STRING + - TableColumnType.TEXT + - TableColumnType.BOOLEAN + - TableColumnType.DATE + - TableColumnType.TIMESTAMP + - TableColumnType.BLOB + length: + type: integer + format: int32 + isNullAllowed: + type: boolean + enumValues: type: array items: - $ref: '#/components/schemas/CreatorBriefDto' + type: string + ordinalPosition: + type: integer + format: int32 created: type: string format: date-time + concept: + $ref: '#/components/schemas/TableColumnConcept' + unit: + $ref: '#/components/schemas/TableColumnUnit' lastModified: type: string format: date-time - container id: + TableColumnConcept: + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + TableColumnUnit: + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + Unique: + type: object + properties: + uid: type: integer format: int64 - example: 1 - database id: + tid: type: integer format: int64 - example: 1 - query id: + tdbid: type: integer format: int64 - example: 1 - publication_year: - type: integer - format: int32 - example: 2022 - UserBriefDto: - required: - - id - - username + table: + $ref: '#/components/schemas/Table' + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + User: type: object properties: id: type: string format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 username: type: string - description: Only contains lowercase characters - example: jcarberry - name: + firstname: type: string - example: Josiah Carberry - orcid: + lastname: type: string - example: 0000-0002-1825-0097 - given_name: + realmId: type: string - example: Josiah - family_name: + format: uuid + email: type: string - example: Carberry - email_verified: + emailVerified: type: boolean - example: true - ImageCreateDto: - required: - - default_port - - dialect - - driver_class - - jdbc_method - - repository - - tag + enabled: + type: boolean + createdTimestamp: + type: integer + format: int64 + databasePassword: + type: string + attributes: + type: array + items: + $ref: '#/components/schemas/UserAttribute' + credentials: + type: array + items: + $ref: '#/components/schemas/Credential' + containers: + type: array + items: + $ref: '#/components/schemas/Container' + databases: + type: array + items: + $ref: '#/components/schemas/Database' + identifiers: + type: array + items: + $ref: '#/components/schemas/Identifier' + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tables: + type: array + items: + $ref: '#/components/schemas/Table' + UserAttribute: type: object properties: - repository: - type: string - example: mariadb - tag: + id: type: string - dialect: + format: uuid + userId: type: string - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' - driver_class: + format: uuid + name: type: string - jdbc_method: + value: type: string - default_port: - type: integer - format: int32 - ContainerCreateRequestDto: - required: - - name - - repository - - tag + user: + $ref: '#/components/schemas/User' + View: type: object properties: + id: + type: integer + format: int64 + vcid: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + createdBy: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + database: + $ref: '#/components/schemas/Database' name: type: string - example: Air Quality - repository: + internalName: type: string - example: mariadb - tag: + isPublic: + type: boolean + isInitialView: + type: boolean + query: type: string - example: "10.5" + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -760,6 +1710,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -848,12 +1804,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -967,7 +1917,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1218,6 +2167,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1225,6 +2175,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1325,11 +2278,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -1341,7 +2294,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array diff --git a/swagger/api-database.yaml b/swagger/api-database.yaml index a9f5bff74e5ea70fdfdecbcb8cc0c7ae5bd1941a..40b76995cc7f1fb0776ba1cd9e7dabb012ca377f 100644 --- a/swagger/api-database.yaml +++ b/swagger/api-database.yaml @@ -50,18 +50,18 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Visibility modification is not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "202": description: Visibility modified successfully content: application/json: schema: $ref: '#/components/schemas/DatabaseDto' + "405": + description: Visibility modification is not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/transfer: @@ -90,18 +90,18 @@ paths: $ref: '#/components/schemas/DatabaseTransferDto' required: true responses: - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "202": description: Transfer of ownership was successful content: application/json: schema: $ref: '#/components/schemas/DatabaseDto' + "404": + description: Database or user could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Transfer of ownership is not permitted content: @@ -141,20 +141,20 @@ paths: $ref: '#/components/schemas/DatabaseModifyAccessDto' required: true responses: - "202": - description: Modify access succeeded - "400": - description: Modify access query or database connection is malformed + "404": + description: Database or user not found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Database or user not found + "400": + description: Modify access query or database connection is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Modify access succeeded "403": description: Modify access not permitted when no access is granted in the first place @@ -188,32 +188,32 @@ paths: schema: type: string responses: - "202": - description: Revoked access successfully - "400": - description: Modify access query or database connection is malformed + "404": + description: User with access was not found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "403": - description: Revoke of access not permitted as no access was found + "400": + description: Modify access query or database connection is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: User with access was not found + "405": + description: Revoke of access not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Revoke of access not permitted + "403": + description: Revoke of access not permitted as no access was found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Revoked access successfully security: - bearerAuth: [] /api/container/{id}/database: @@ -235,7 +235,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/DatabaseBriefDto' post: tags: - database-endpoint @@ -255,26 +257,21 @@ paths: $ref: '#/components/schemas/DatabaseCreateDto' required: true responses: - "501": - description: Container image is not supported - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "201": description: Created a new database content: application/json: schema: $ref: '#/components/schemas/DatabaseBriefDto' - "502": - description: Connection to the container failed + "404": + description: "Container, user or database could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Database create query is malformed + "406": + description: Failed to create user at broker service or virtual host could + not be reached at broker service content: application/json: schema: @@ -286,27 +283,32 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Container, user or database could not be found" + "501": + description: Container image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Failed to create user at broker service or virtual host could - not be reached at broker service + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Database name already exist or query store could not be created + "502": + description: Connection to the container failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "400": + description: Database create query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Database name already exist or query store could not be created content: application/json: schema: @@ -333,18 +335,18 @@ paths: type: integer format: int64 responses: - "200": - description: Found database access - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseAccessDto' "403": description: No access to this database content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Found database access + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseAccessDto' "405": description: Check access is not permitted content: @@ -380,14 +382,14 @@ paths: responses: "202": description: Granting access succeeded - "400": - description: Granting access query or database connection is malformed + "405": + description: Granting access not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Granting access not permitted + "400": + description: Granting access query or database connection is malformed content: application/json: schema: @@ -420,12 +422,6 @@ paths: type: integer format: int64 responses: - "200": - description: Database found successfully - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseDto' "405": description: Database information is not permitted content: @@ -433,11 +429,17 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Database could not be found + description: Database or container could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Database found successfully + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseDto' security: - bearerAuth: [] delete: @@ -459,39 +461,33 @@ paths: type: integer format: int64 responses: - "201": - description: Deleted a database - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseBriefDto' - "405": - description: Database delete permission is missing or revoke permissions - at broker service failed + "400": + description: Database delete query is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Container image is not supported + "404": + description: Container or database could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "502": - description: Connection to the container failed + "405": + description: Database delete permission is missing or revoke permissions + at broker service failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Database delete query is malformed + "501": + description: Container image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Container or database could not be found + "503": + description: Connection to the database failed content: application/json: schema: @@ -503,12 +499,18 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "502": + description: Connection to the container failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "201": + description: Deleted a database + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseBriefDto' security: - bearerAuth: [] /api/container/{id}/database/license: @@ -530,7 +532,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DatabaseBriefDto' + type: array + items: + $ref: '#/components/schemas/LicenseDto' components: schemas: DatabaseModifyVisibilityDto: @@ -555,6 +559,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -629,9 +634,11 @@ components: ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -640,6 +647,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -728,12 +741,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -847,7 +854,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1098,6 +1104,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1105,6 +1112,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1145,6 +1155,7 @@ components: - driver_class - id - jdbc_method + - registry - repository - tag type: object @@ -1152,6 +1163,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1279,11 +1293,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -1295,7 +1309,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -1575,12 +1589,6 @@ components: type: array items: $ref: '#/components/schemas/CreatorBriefDto' - created: - type: string - format: date-time - lastModified: - type: string - format: date-time container id: type: integer format: int64 diff --git a/swagger/api-identifier.yaml b/swagger/api-identifier.yaml index a3326c73910181df0c1e310c680b1ad1fd802b1f..002b392bb6df32db0e8153596b5d397297ffb6af 100644 --- a/swagger/api-identifier.yaml +++ b/swagger/api-identifier.yaml @@ -18,10 +18,10 @@ servers: - url: https://dbrepo2.tuwien.ac.at description: Sandbox paths: - /api/identifier/{id}: + /api/pid/{id}: put: tags: - - identifier-endpoint + - persistence-endpoint summary: Update some identifier operationId: update parameters: @@ -35,11 +35,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IdentifierDto' + $ref: '#/components/schemas/IdentifierUpdateDto' required: true responses: - "404": - description: Identifier could not be found + "405": + description: Updating identifier not permitted content: application/json: schema: @@ -50,6 +50,18 @@ paths: application/json: schema: $ref: '#/components/schemas/IdentifierDto' + "404": + description: Identifier or user could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Identifier data is not valid to the form + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "406": description: Updating identifier not allowed content: @@ -60,7 +72,7 @@ paths: - bearerAuth: [] delete: tags: - - identifier-endpoint + - persistence-endpoint summary: Delete some identifier operationId: delete parameters: @@ -77,6 +89,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Deleting identifier not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "202": description: Deleted identifier security: @@ -114,7 +132,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/IdentifierDto' post: tags: - identifier-endpoint @@ -133,20 +153,14 @@ paths: $ref: '#/components/schemas/IdentifierCreateDto' required: true responses: - "201": - description: Created identifier - content: - application/json: - schema: - $ref: '#/components/schemas/IdentifierDto' - "404": - description: "Query, database or user could not be found" + "406": + description: Creating identifier not allowed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Identifier for this resource already exists + "400": + description: Identifier form contains invalid request data content: application/json: schema: @@ -157,14 +171,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Creating identifier not allowed + "201": + description: Created identifier content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Identifier form contains invalid request data + $ref: '#/components/schemas/IdentifierDto' + "403": + description: Insufficient access rights or authorities content: application/json: schema: @@ -175,6 +189,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Identifier for this resource already exists + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/pid/{pid}: @@ -208,6 +228,13 @@ paths: text/bibliography; style=apa: {} text/bibliography; style=ieee: {} text/bibliography; style=bibtex: {} + "404": + description: Identifier could not be exported from database as the resource + was not found + content: + text/csv: + schema: + $ref: '#/components/schemas/ApiErrorDto' "400": description: "Identifier could not be exported, the requested style is not\ \ known" @@ -221,13 +248,6 @@ paths: text/csv: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Identifier could not be exported from database as the resource - was not found - content: - text/csv: - schema: - $ref: '#/components/schemas/ApiErrorDto' components: schemas: CreatorDto: @@ -252,32 +272,29 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time - IdentifierDto: + IdentifierUpdateDto: required: - - container id + - cid - creators - - database id - - execution + - dbid - publication_year - - query - - query_hash - - query_normalized - - result_hash - - result_number - title - type - visibility type: object properties: - id: + cid: + type: integer + format: int64 + dbid: type: integer format: int64 + qid: + type: integer + format: int64 + doi: + type: string + example: 10.1038/nphys1170 type: type: string enum: @@ -289,23 +306,12 @@ components: description: type: string example: "Air quality reports at Stephansplatz, Vienna" - query: - type: string - example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ - \ = \"09:STEF\"" - execution: - type: string - format: date-time visibility: type: string example: everyone enum: - everyone - - trusted - self - doi: - type: string - example: 10.1038/nphys1170 publisher: type: string example: TU Wien @@ -502,38 +508,6 @@ components: type: array items: $ref: '#/components/schemas/CreatorDto' - created: - type: string - format: date-time - container id: - type: integer - format: int64 - example: 1 - database id: - type: integer - format: int64 - example: 1 - query id: - type: integer - format: int64 - example: 1 - query_normalized: - type: string - example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ - \ = \"09:STEF\"" - related: - type: array - items: - $ref: '#/components/schemas/RelatedIdentifierDto' - query_hash: - type: string - description: query hash in sha512 - result_hash: - type: string - result_number: - type: integer - format: int64 - example: 1 publication_day: type: integer format: int32 @@ -546,9 +520,10 @@ components: type: integer format: int32 example: 2022 - last_modified: - type: string - format: date-time + related_identifiers: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierCreateDto' LicenseDto: required: - identifier @@ -561,16 +536,11 @@ components: uri: type: string example: https://opensource.org/licenses/MIT - RelatedIdentifierDto: + RelatedIdentifierCreateDto: required: - - created - - id - value type: object properties: - id: - type: integer - format: int64 value: type: string example: 10.70124/dc4zh-9ce78 @@ -634,12 +604,6 @@ components: - Requires - IsObsoletedBy - Obsoletes - created: - type: string - format: date-time - last_modified: - type: string - format: date-time ApiErrorDto: required: - code @@ -654,6 +618,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -725,41 +690,24 @@ components: code: type: string example: error.service.code - CreatorCreateDto: - required: - - firstname - - lastname - type: object - properties: - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Wesleyan University - orcid: - type: string - example: 0000-0002-1825-0097 - IdentifierCreateDto: + IdentifierDto: required: - - cid + - container id - creators - - dbid + - database id + - execution - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number - title - type + - visibility type: object properties: - cid: - type: integer - format: int64 - dbid: - type: integer - format: int64 - qid: + id: type: integer format: int64 type: @@ -773,6 +721,22 @@ components: description: type: string example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - self + doi: + type: string + example: 10.1038/nphys1170 publisher: type: string example: TU Wien @@ -968,7 +932,39 @@ components: creators: type: array items: - $ref: '#/components/schemas/CreatorCreateDto' + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 publication_day: type: integer format: int32 @@ -981,15 +977,19 @@ components: type: integer format: int32 example: 2022 - related_identifiers: - type: array - items: - $ref: '#/components/schemas/RelatedIdentifierCreateDto' - RelatedIdentifierCreateDto: + last_modified: + type: string + format: date-time + RelatedIdentifierDto: required: + - created + - id - value type: object properties: + id: + type: integer + format: int64 value: type: string example: 10.70124/dc4zh-9ce78 @@ -1053,6 +1053,279 @@ components: - Requires - IsObsoletedBy - Obsoletes + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + CreatorCreateDto: + required: + - firstname + - lastname + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + IdentifierCreateDto: + required: + - cid + - creators + - dbid + - publication_year + - title + - type + - visibility + type: object + properties: + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + qid: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + visibility: + type: string + example: everyone + enum: + - everyone + - self + publisher: + type: string + example: TU Wien + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorCreateDto' + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + related_identifiers: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierCreateDto' securitySchemes: bearerAuth: type: http diff --git a/swagger/api-metadata.yaml b/swagger/api-metadata.yaml index 6ce01267d1c7b283d3ee94006c7b26fb0ce4389e..bc1c717b5b0b8c20060728b7f1ec377f764cdbe9 100644 --- a/swagger/api-metadata.yaml +++ b/swagger/api-metadata.yaml @@ -52,11 +52,11 @@ components: type: string resumptionToken: type: string - parametersString: - type: string fromDate: type: string format: date-time untilDate: type: string format: date-time + parametersString: + type: string diff --git a/swagger/api-query.yaml b/swagger/api-query.yaml index a40d3d70f0437a011147ac7719a9dba32677c208..16168d93b08fc5f2d3b79131526ad2c8a027b0eb 100644 --- a/swagger/api-query.yaml +++ b/swagger/api-query.yaml @@ -23,7 +23,7 @@ paths: tags: - table-history-endpoint summary: Find all history - operationId: getAll_1 + operationId: getAll parameters: - name: id in: path @@ -44,38 +44,40 @@ paths: type: integer format: int64 responses: - "504": - description: Query store failed to query table history + "405": + description: Find table history is not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Table history query is malformed + "200": + description: Find table history successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + type: array + items: + $ref: '#/components/schemas/TableHistoryDto' + "404": + description: "Table, database or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: Find table history successfully + "504": + description: Query store failed to query table history content: application/json: schema: - type: string - "404": - description: "Table, database or user could not be found" + $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find table history is not permitted + "400": + description: Table history query is malformed content: application/json: schema: @@ -86,7 +88,7 @@ paths: tags: - table-history-endpoint summary: Find all history - operationId: getAll + operationId: getAll_1 parameters: - name: id in: path @@ -107,38 +109,40 @@ paths: type: integer format: int64 responses: - "504": - description: Query store failed to query table history + "405": + description: Find table history is not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Table history query is malformed + "200": + description: Find table history successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + type: array + items: + $ref: '#/components/schemas/TableHistoryDto' + "404": + description: "Table, database or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: Find table history successfully + "504": + description: Query store failed to query table history content: application/json: schema: - type: string - "404": - description: "Table, database or user could not be found" + $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find table history is not permitted + "400": + description: Table history query is malformed content: application/json: schema: @@ -150,7 +154,7 @@ paths: tags: - table-data-endpoint summary: Find data - operationId: getAll_3 + operationId: getAll_2 parameters: - name: id in: path @@ -320,7 +324,7 @@ paths: tags: - table-data-endpoint summary: Find data - operationId: getAll_2 + operationId: getAll_3 parameters: - name: id in: path @@ -406,26 +410,20 @@ paths: type: integer format: int64 responses: - "405": - description: Find query is not permitted + "200": + description: List queries content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/QueryDto' "404": description: "Database, query or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: List queries - content: - application/json: - schema: - $ref: '#/components/schemas/QueryDto' - "503": - description: Connection to the database failed + "405": + description: Find query is not permitted content: application/json: schema: @@ -442,6 +440,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] put: @@ -475,6 +479,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "501": + description: Image is not supported + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "200": description: Persist query successful content: @@ -487,8 +497,8 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "504": + description: Query store failed to persist query content: application/json: schema: @@ -499,12 +509,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Query store failed to persist query - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/view: @@ -544,7 +548,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' security: - bearerAuth: [] post: @@ -578,20 +584,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Create view is not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "404": + description: Database or user could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Create view query is malformed + "405": + description: Create view is not permitted content: application/json: schema: @@ -602,24 +602,30 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Database or user could not be found + "201": + description: Create view successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/ViewBriefDto' "423": description: Create view resulted in an invalid query statement content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "201": - description: Create view successfully + "400": + description: Create view query is malformed content: application/json: schema: - $ref: '#/components/schemas/ViewBriefDto' + $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/table/{tableId}/data/import: @@ -683,49 +689,51 @@ paths: schema: type: boolean responses: - "200": - description: List queries + "405": + description: Find all queries is not permitted content: application/json: schema: - type: string - "503": - description: Connection to the database failed + $ref: '#/components/schemas/ApiErrorDto' + "501": + description: Image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find all queries is not permitted + "504": + description: Query store failed to select query content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Selection of time-versioned query resulted in an invalid query - statement + "404": + description: "Database, container or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "423": + description: Selection of time-versioned query resulted in an invalid query + statement content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Database, container or user could not be found" + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Query store failed to select query + "200": + description: List queries content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + type: array + items: + $ref: '#/components/schemas/QueryBriefDto' security: - bearerAuth: [] post: @@ -812,12 +820,6 @@ paths: type: integer format: int64 responses: - "405": - description: Find view is not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "200": description: Find view successfully content: @@ -830,6 +832,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Find view is not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] delete: @@ -863,40 +871,40 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "403": + description: Credentials missing content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "403": - description: Credentials missing + "404": + description: "Database, view or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Delete view is not permitted + "400": + description: Delete view query is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "200": description: Delete view successfully - "404": - description: "Database, view or user could not be found" + "423": + description: Delete view resulted in an invalid query statement content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Delete view query is malformed + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Delete view resulted in an invalid query statement + "405": + description: Delete view is not permitted content: application/json: schema: @@ -941,14 +949,14 @@ paths: type: integer format: int64 responses: - "401": - description: Credentials missing + "200": + description: Find data successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Query store failed to query view data + $ref: '#/components/schemas/QueryResultDto' + "401": + description: Credentials missing content: application/json: schema: @@ -959,26 +967,26 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "403": + description: Credentials missing content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: Find data successfully + "417": + description: Parsing of resulting columns failed content: application/json: schema: - $ref: '#/components/schemas/QueryResultDto' - "403": - description: Credentials missing + $ref: '#/components/schemas/ApiErrorDto' + "504": + description: Query store failed to query view data content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "404": + description: "Database, view, container or user could not be found" content: application/json: schema: @@ -989,20 +997,20 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Database, view, container or user could not be found" + "501": + description: Image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Parsing of resulting columns failed + "405": + description: Find data is not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find data is not permitted + "503": + description: Connection to the database failed content: application/json: schema: @@ -1275,6 +1283,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -1346,6 +1355,22 @@ components: code: type: string example: error.service.code + TableHistoryDto: + required: + - event + - timestamp + - total + type: object + properties: + timestamp: + type: string + format: date-time + event: + type: string + total: + type: integer + format: int64 + example: 1 QueryResultDto: required: - id @@ -1382,9 +1407,11 @@ components: ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -1393,6 +1420,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -1481,12 +1514,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -1600,7 +1627,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1851,6 +1877,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1858,6 +1885,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1898,6 +1928,7 @@ components: - driver_class - id - jdbc_method + - registry - repository - tag type: object @@ -1905,6 +1936,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -2091,11 +2125,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -2107,7 +2141,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -2352,6 +2386,124 @@ components: last_modified: type: string format: date-time + CreatorBriefDto: + required: + - firstname + - lastname + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Wesleyan University + IdentifierBriefDto: + required: + - container id + - creators + - database id + - id + - publication_year + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creators: + type: array + items: + $ref: '#/components/schemas/CreatorBriefDto' + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + publication_year: + type: integer + format: int32 + example: 2022 + QueryBriefDto: + required: + - cid + - created + - creator + - dbid + - id + - query + - query_hash + type: object + properties: + id: + type: integer + format: int64 + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/UserDto' + execution: + type: string + format: date-time + query: + type: string + example: SELECT `id` FROM `air_quality` + type: + type: string + example: query + enum: + - query + - view + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' + created: + type: string + format: date-time + query_normalized: + type: string + example: SELECT `id` FROM `air_quality` + query_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_number: + type: integer + format: int64 + example: 1 + last_modified: + type: string + format: date-time TableCsvDeleteDto: required: - keys diff --git a/swagger/api-semantics.yaml b/swagger/api-semantics.yaml index 20727fde93075baaf0279685df81e7f9320c5f80..c001c6d7bb3539f64f83b76b093d90ac679ce30b 100644 --- a/swagger/api-semantics.yaml +++ b/swagger/api-semantics.yaml @@ -1 +1,685 @@ -{"definitions":{},"externalDocs":{"description":"Sourcecode Documentation","url":"https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services"},"info":{"contact":{"email":"andreas.rauber@tuwien.ac.at","name":"Prof. Andreas Rauber"},"description":"Service for assigning concepts to database tables and columns.","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"title":"Database Repository Unit / Ontology Service API","version":"1.2.0"},"openapi":"3.0.0","paths":{"/api/semantics/concept":{"get":{"consumes":["application/json"],"description":"This is a simple API which returns a list of suggested concepts.","parameters":[{"description":"The query to retrieve a fitting concept","in":"query","name":"q","schema":{"type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Suggest a concept","tags":["concepts-endpoint"]},"post":{"consumes":["application/json"],"description":"This is a simple API for saving concept","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"example":"metre","type":"string"},"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/metre","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"405":{"description":"Invalid input"},"409":{"description":"Concept already present"}},"summary":"Save concept to MDB","tags":["concepts-endpoint"]},"put":{"consumes":["application/json"],"description":"This is a simple API for retrieving label from concepts","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"uri":{"example":"http://www.wikidata.org/entity/Q35120","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid URI"},"500":{"description":"Server error"}},"summary":"Retrieve label from URI","tags":["concepts-endpoint"]}},"/api/semantics/concept/{concept}/validate":{"get":{"consumes":["application/json"],"description":"This is a simple API for validating concepts.","parameters":[{"description":"Validates concepts against om-2.","in":"path","name":"unit","required":true,"schema":{"example":"distance","type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Validate concepts","tags":["concepts-endpoint"]}},"/api/semantics/ontology":{"get":{"consumes":["application/json"],"description":"This is a simple API for listing all ontologies (.nt, .ttl files) used in DB-Repo.","produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"List ontologies","tags":["ontologies-endpoint"]}},"/api/semantics/ontology/{name}":{"get":{"consumes":["application/json"],"description":"This is a simple API for getting a certain ontologies (.nt, .ttl files) stored in DB-Repo.","parameters":[{"in":"path","name":"o_name","required":true,"schema":{"example":"VOCAB_QUDT-UNITS-ALL-v2.1","type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"},"405":{"description":"Invalid input"}},"summary":"Get ontology","tags":["ontologies-endpoint"]}},"/api/semantics/unit":{"get":{"consumes":["application/json"],"description":"This is a simple API which returns a list of suggested units.","parameters":[{"description":"The query to retrieve a fitting unit","in":"query","name":"q","schema":{"type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Suggest a unit","tags":["units-endpoint"]},"post":{"consumes":["application/json"],"description":"This is a simple API for saving units","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"example":"second","type":"string"},"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/second-Time","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"405":{"description":"Invalid input"},"409":{"description":"Concept already present"}},"summary":"Save unit to MDB","tags":["units-endpoint"]},"put":{"consumes":["application/json"],"description":"This is a simple API for retrieving label from units","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/second-Time","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid URI"},"404":{"description":"Unit not found"},"500":{"description":"Server error"}},"summary":"Retrieve label from URI","tags":["units-endpoint"]}},"/api/semantics/unit/{unit}/validate":{"get":{"consumes":["application/json"],"description":"This is a simple API for validating units.","parameters":[{"description":"Validates unit against om-2.","in":"path","name":"unit","required":true,"schema":{"example":"metre","type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Validate units","tags":["units-endpoint"]}}},"servers":[{"description":"Generated server url","url":"http://localhost:5010"},{"description":"Sandbox","url":"https://dbrepo2.ec.tuwien.ac.at"}]} +openapi: 3.0.1 +info: + title: Database Repository Semantic Service API + description: Service that manages the tables + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.2.0 +externalDocs: + description: Sourcecode Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services +servers: +- url: http://localhost:9097 + description: Generated server url +- url: https://dbrepo2.tuwien.ac.at + description: Sandbox +paths: + /api/semantic/ontology/{id}: + get: + tags: + - ontology-endpoint + summary: Find one ontology + operationId: find + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Find one ontology + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyDto' + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + put: + tags: + - ontology-endpoint + summary: Update an ontology + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyModifyDto' + required: true + responses: + "202": + description: Updated ontology successfully + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyDto' + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + delete: + tags: + - ontology-endpoint + summary: Delete an ontology + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "202": + description: Deleted ontology successfully + content: + application/json: {} + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + /api/semantic/unit: + get: + tags: + - semantics-endpoint + summary: List semantic units + operationId: findAllUnits + responses: + "200": + description: Find all semantic units + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UnitDto' + post: + tags: + - semantics-endpoint + summary: Save a semantic unit + operationId: saveUnit + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnitSaveDto' + required: true + responses: + "202": + description: Saved a semantic unit + content: + application/json: + schema: + $ref: '#/components/schemas/UnitDto' + security: + - bearerAuth: [] + /api/semantic/ontology: + get: + tags: + - ontology-endpoint + summary: List all ontologies + operationId: findAll + responses: + "200": + description: List all ontologies + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OntologyDto' + post: + tags: + - ontology-endpoint + summary: Register a new ontology + operationId: create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyCreateDto' + required: true + responses: + "201": + description: Registered ontology successfully + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyDto' + security: + - bearerAuth: [] + /api/semantic/concept: + get: + tags: + - semantics-endpoint + summary: List semantic concepts + operationId: findAllConcepts + responses: + "200": + description: Find all semantic concepts + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ConceptDto' + post: + tags: + - semantics-endpoint + summary: Create or update a semantic concept + operationId: saveUnit_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConceptSaveDto' + required: true + responses: + "202": + description: Saved a semantic concept + content: + application/json: + schema: + $ref: '#/components/schemas/ConceptDto' + security: + - bearerAuth: [] + /api/semantic/ontology/{id}/entity: + get: + tags: + - query-endpoint + summary: Find entities + operationId: find_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: label + in: query + required: false + schema: + type: string + - name: uri + in: query + required: false + schema: + type: string + responses: + "200": + description: Found entities + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EntityDto' + "417": + description: Generated query or uri is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Filter params are invalid + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + /api/semantic/database/{databaseId}/table/{tableId}: + get: + tags: + - table-endpoint + summary: Suggest table semantics + operationId: analyseTable + parameters: + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "417": + description: Generated query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Could not find the table + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Suggested table semantics successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TableColumnEntityDto' + security: + - bearerAuth: [] + /api/semantic/database/{databaseId}/table/{tableId}/column/{columnId}: + get: + tags: + - table-endpoint + summary: Suggest table column semantics + operationId: analyseTableColumn + parameters: + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + - name: columnId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "417": + description: Generated query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Suggested table column semantics successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TableColumnEntityDto' + "404": + description: Could not find the table column + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] +components: + schemas: + OntologyModifyDto: + required: + - prefix + - uri + type: object + properties: + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + OntologyDto: + required: + - created + - id + - prefix + - rdf + - sparql + - uri + type: object + properties: + id: + type: integer + format: int64 + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql: + type: boolean + example: true + rdf: + type: boolean + example: true + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + UserBriefDto: + required: + - id + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + username: + type: string + description: Only contains lowercase characters + example: jcarberry + name: + type: string + example: Josiah Carberry + orcid: + type: string + example: 0000-0002-1825-0097 + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + email_verified: + type: boolean + example: true + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: STATUS + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code + UnitSaveDto: + required: + - description + - name + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + ColumnBriefDto: + required: + - column_type + - database_id + - id + - internal_name + - name + - table_id + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 + internal_name: + type: string + example: mdb_date + column_type: + type: string + example: date + enum: + - enum + - number + - decimal + - string + - text + - boolean + - date + - timestamp + - blob + UnitDto: + required: + - columns + - created + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' + OntologyCreateDto: + required: + - prefix + - uri + type: object + properties: + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + ConceptSaveDto: + required: + - description + - name + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + ConceptDto: + required: + - columns + - created + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' + EntityDto: + required: + - label + - uri + type: object + properties: + uri: + type: string + example: https://www.wikidata.org/entity/Q1686799 + label: + type: string + example: Apache Jena + description: + type: string + example: open source semantic web framework for Java + TableColumnEntityDto: + required: + - columnId + - databaseId + - tableId + - uri + type: object + properties: + databaseId: + type: integer + format: int64 + example: 1 + tableId: + type: integer + format: int64 + example: 1 + columnId: + type: integer + format: int64 + example: 1 + uri: + type: string + example: https://www.wikidata.org/entity/Q1686799 + label: + type: string + example: Apache Jena + description: + type: string + example: open source semantic web framework for Java + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/api-table.yaml b/swagger/api-table.yaml index f0807a9139f19ea684004759464e985aa6b81cbd..9639c5fc4e24d730136b88d16a7b5a526dc469d4 100644 --- a/swagger/api-table.yaml +++ b/swagger/api-table.yaml @@ -49,6 +49,11 @@ paths: schema: type: integer format: int64 + - name: Authorization + in: header + required: true + schema: + type: string requestBody: content: application/json: @@ -56,19 +61,6 @@ paths: $ref: '#/components/schemas/ColumnSemanticsUpdateDto' required: true responses: - "405": - description: Update column semantics not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ColumnDto' - "400": - description: Update semantic concept query is malformed or update unit of - measurement query is malformed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "404": description: "Table, database, semantic concept, unit of measurement or\ \ container could not be found" @@ -88,6 +80,19 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Update semantic concept query is malformed or update unit of + measurement query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Update column semantics not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ColumnDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/table: @@ -127,7 +132,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/TableBriefDto' security: - bearerAuth: [] post: @@ -155,32 +162,26 @@ paths: $ref: '#/components/schemas/TableCreateDto' required: true responses: - "409": - description: Create table conflicts with existing table name + "501": + description: Image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Database, container or user could not be found" + "504": + description: Broker service failed to create queue content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "404": + description: "Database, container or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "201": - description: Created a new table - content: - application/json: - schema: - $ref: '#/components/schemas/TableBriefDto' - "400": - description: Create table query is malformed + "409": + description: Create table conflicts with existing table name content: application/json: schema: @@ -191,8 +192,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Broker service failed to create queue + "201": + description: Created a new table + content: + application/json: + schema: + $ref: '#/components/schemas/TableBriefDto' + "400": + description: Create table query is malformed content: application/json: schema: @@ -237,14 +244,14 @@ paths: application/json: schema: $ref: '#/components/schemas/TableDto' - "404": - description: "Table, database or container could not be found" + "403": + description: Access to the database is forbidden content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "403": - description: Access to the database is forbidden + "404": + description: "Table, database or container could not be found" content: application/json: schema: @@ -276,14 +283,8 @@ paths: type: integer format: int64 responses: - "405": - description: Delete table not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Delete table resulted in an invalid state + "501": + description: Image is not supported content: application/json: schema: @@ -294,20 +295,20 @@ paths: application/json: schema: $ref: '#/components/schemas/TableDto' - "400": - description: Delete table query resulted in an invalid query statement + "405": + description: Delete table not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "423": + description: Delete table resulted in an invalid state content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Table, database or container could not be found" + "400": + description: Delete table query resulted in an invalid query statement content: application/json: schema: @@ -318,6 +319,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "404": + description: "Table, database or container could not be found" + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] components: @@ -329,6 +336,130 @@ components: type: string unit_uri: type: string + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: STATUS + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code + ColumnBriefDto: + required: + - column_type + - database_id + - id + - internal_name + - name + - table_id + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 + internal_name: + type: string + example: mdb_date + column_type: + type: string + example: date + enum: + - enum + - number + - decimal + - string + - text + - boolean + - date + - timestamp + - blob ColumnDto: required: - auto_generated @@ -394,8 +525,8 @@ components: type: string ConceptDto: required: + - columns - created - - name - uri type: object properties: @@ -403,9 +534,15 @@ components: type: string name: type: string + description: + type: string created: type: string format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' ImageDateDto: required: - database_format @@ -435,8 +572,8 @@ components: format: date-time UnitDto: required: + - columns - created - - name - uri type: object properties: @@ -444,94 +581,15 @@ components: type: string name: type: string + description: + type: string created: type: string format: date-time - ApiErrorDto: - required: - - code - - message - - status - type: object - properties: - status: - type: string - example: STATUS - enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED - message: - type: string - example: Error message - code: - type: string - example: error.service.code + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' ColumnCreateDto: required: - name @@ -644,44 +702,14 @@ components: $ref: '#/components/schemas/ColumnCreateDto' constraints: $ref: '#/components/schemas/ConstraintsCreateDto' - ColumnBriefDto: - required: - - column_type - - id - - internal_name - - name - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: date - internal_name: - type: string - example: mdb_date - column_type: - type: string - example: date - enum: - - enum - - number - - decimal - - string - - text - - boolean - - date - - timestamp - - blob TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -693,7 +721,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -786,6 +814,7 @@ components: - internal_name - is_public - name + - owner - queue_name - routing_key type: object @@ -798,6 +827,8 @@ components: example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' + owner: + $ref: '#/components/schemas/UserBriefDto' description: type: string example: Air Quality in Austria diff --git a/swagger/api-user.yaml b/swagger/api-user.yaml index eb32257e2743c2fce889b136218bb2e38559a347..56bd25f5380528b7f08b44b29c83363103d9bd93 100644 --- a/swagger/api-user.yaml +++ b/swagger/api-user.yaml @@ -29,58 +29,22 @@ paths: schema: type: string responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: User was not found content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + description: Find user is not permitted content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "200": - description: OK + description: Found user content: - '*/*': + application/json: schema: $ref: '#/components/schemas/UserDto' security: @@ -103,60 +67,24 @@ paths: $ref: '#/components/schemas/UserUpdateDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Not Found + "202": + description: Modified user information content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/UserDto' "405": - description: Method Not Allowed + description: Modify user is not permitted content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "404": + description: User attribute was not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK - content: - '*/*': - schema: - $ref: '#/components/schemas/UserDto' security: - bearerAuth: [] /api/user/{id}/theme: @@ -178,58 +106,22 @@ paths: $ref: '#/components/schemas/UserThemeSetDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + description: Modify user is not permitted content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "404": + description: User or user attribute was not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK + "202": + description: Modified user theme content: - '*/*': + application/json: schema: $ref: '#/components/schemas/UserDto' security: @@ -253,121 +145,111 @@ paths: $ref: '#/components/schemas/UserPasswordDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: User was not found content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + description: Modify user is not permitted content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "202": + description: Modified user password content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/UserDto' security: - bearerAuth: [] - /api/user: + /api/maintenance/message/{id}: get: tags: - - user-endpoint - summary: Find all users - operationId: findAll + - maintenance-endpoint + summary: Find one maintenance message + operationId: find_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked + "200": + description: Get messages content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/BannerMessageDto' + put: + tags: + - maintenance-endpoint + summary: Update maintenance message + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BannerMessageUpdateDto' + required: true + responses: "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + description: Could not find message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Method Not Allowed + $ref: '#/components/schemas/BannerMessageNotFoundException' + "202": + description: Updated message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + $ref: '#/components/schemas/BannerMessageBriefDto' + delete: + tags: + - maintenance-endpoint + summary: Delete maintenance message + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "202": + description: Deleted message content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + application/json: {} + "404": + description: Could not find message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/BannerMessageNotFoundException' + /api/user: + get: + tags: + - user-endpoint + summary: Find all users + operationId: findAll + responses: "200": - description: OK + description: List users content: - '*/*': + application/json: schema: type: array items: @@ -384,147 +266,80 @@ paths: $ref: '#/components/schemas/SignupRequestDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked + "409": + description: User with username already exists content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: Realm or default role not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "201": + description: Created user content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Method Not Allowed + $ref: '#/components/schemas/UserBriefDto' + "417": + description: User with e-mail already exists content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + /api/maintenance/message: + get: + tags: + - maintenance-endpoint + summary: Find maintenance messages + operationId: list + responses: + "200": + description: List messages content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + type: array + items: + $ref: '#/components/schemas/BannerMessageDto' + post: + tags: + - maintenance-endpoint + summary: Create maintenance message + operationId: create_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BannerMessageCreateDto' + required: true + responses: + "201": + description: Created message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/BannerMessageBriefDto' + /api/maintenance/message/active: + get: + tags: + - maintenance-endpoint + summary: Find active maintenance messages + operationId: active + responses: "200": - description: OK + description: List messages content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/UserBriefDto' + type: array + items: + $ref: '#/components/schemas/BannerMessageBriefDto' components: schemas: - ApiErrorDto: - required: - - code - - message - - status - type: object - properties: - status: - type: string - example: STATUS - enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED - message: - type: string - example: Error message - code: - type: string - example: error.service.code UserUpdateDto: type: object properties: @@ -540,17 +355,14 @@ components: orcid: type: string example: 0000-0002-1825-0097 - titles_before: - type: string - example: Prof. - titles_after: - type: string ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -559,6 +371,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -647,12 +465,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -766,7 +578,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1017,6 +828,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1024,6 +836,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1064,6 +879,7 @@ components: - driver_class - id - jdbc_method + - registry - repository - tag type: object @@ -1071,6 +887,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1198,11 +1017,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -1214,7 +1033,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -1352,6 +1171,92 @@ components: last_modified: type: string format: date-time + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: STATUS + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code UserThemeSetDto: required: - theme_dark @@ -1367,6 +1272,174 @@ components: properties: password: type: string + BannerMessageUpdateDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + display_end: + type: string + format: date-time + BannerMessageNotFoundException: + type: object + properties: + cause: + type: object + properties: + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + suppressed: + type: array + items: + type: object + properties: + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + localizedMessage: + type: string + localizedMessage: + type: string + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + suppressed: + type: array + items: + type: object + properties: + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + localizedMessage: + type: string + localizedMessage: + type: string + BannerMessageBriefDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More SignupRequestDto: required: - email @@ -1383,6 +1456,64 @@ components: example: user@example.com password: type: string + BannerMessageCreateDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + display_end: + type: string + format: date-time + BannerMessageDto: + required: + - id + - message + - type + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + display_end: + type: string + format: date-time securitySchemes: bearerAuth: type: http diff --git a/swagger/api/api_container/__init__.py b/swagger/api/api_container/__init__.py index 5140e78aec6c14139153fdf1ad4c784fce8b72c4..90a1b9142e8b8cff785423e525b1e7d49a402947 100644 --- a/swagger/api/api_container/__init__.py +++ b/swagger/api/api_container/__init__.py @@ -23,15 +23,26 @@ from api_container.configuration import Configuration # import models into sdk package from api_container.models.api_error_dto import ApiErrorDto from api_container.models.column_brief_dto import ColumnBriefDto +from api_container.models.constraints import Constraints +from api_container.models.container import Container from api_container.models.container_brief_dto import ContainerBriefDto from api_container.models.container_change_dto import ContainerChangeDto from api_container.models.container_create_request_dto import ContainerCreateRequestDto from api_container.models.container_dto import ContainerDto +from api_container.models.container_image import ContainerImage +from api_container.models.container_image_date import ContainerImageDate +from api_container.models.container_image_environment_item import ContainerImageEnvironmentItem +from api_container.models.creator import Creator from api_container.models.creator_brief_dto import CreatorBriefDto from api_container.models.creator_dto import CreatorDto +from api_container.models.credential import Credential +from api_container.models.database import Database from api_container.models.database_access_dto import DatabaseAccessDto from api_container.models.database_brief_dto import DatabaseBriefDto from api_container.models.database_dto import DatabaseDto +from api_container.models.foreign_key import ForeignKey +from api_container.models.foreign_key_reference import ForeignKeyReference +from api_container.models.identifier import Identifier from api_container.models.identifier_brief_dto import IdentifierBriefDto from api_container.models.identifier_dto import IdentifierDto from api_container.models.image_brief_dto import ImageBriefDto @@ -40,10 +51,21 @@ from api_container.models.image_create_dto import ImageCreateDto from api_container.models.image_date_dto import ImageDateDto from api_container.models.image_dto import ImageDto from api_container.models.image_env_item_dto import ImageEnvItemDto +from api_container.models.license import License from api_container.models.license_dto import LicenseDto +from api_container.models.related_identifier import RelatedIdentifier from api_container.models.related_identifier_dto import RelatedIdentifierDto +from api_container.models.role import Role +from api_container.models.table import Table from api_container.models.table_brief_dto import TableBriefDto +from api_container.models.table_column import TableColumn +from api_container.models.table_column_concept import TableColumnConcept +from api_container.models.table_column_unit import TableColumnUnit +from api_container.models.unique import Unique +from api_container.models.user import User +from api_container.models.user_attribute import UserAttribute from api_container.models.user_attribute_dto import UserAttributeDto from api_container.models.user_brief_dto import UserBriefDto from api_container.models.user_dto import UserDto +from api_container.models.view import View from api_container.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_container/api/container_endpoint_api.py b/swagger/api/api_container/api/container_endpoint_api.py index 84692d12cc9a7bb74c79b4daf0f1d3abba862de4..0a8fb8bcdbb6622361f8202b08c4506fe0013fb4 100644 --- a/swagger/api/api_container/api/container_endpoint_api.py +++ b/swagger/api/api_container/api/container_endpoint_api.py @@ -232,7 +232,7 @@ class ContainerEndpointApi(object): :param async_req bool :param int limit: - :return: str + :return: list[ContainerBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -253,7 +253,7 @@ class ContainerEndpointApi(object): :param async_req bool :param int limit: - :return: str + :return: list[ContainerBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -303,7 +303,7 @@ class ContainerEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[ContainerBriefDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_container/api/image_endpoint_api.py b/swagger/api/api_container/api/image_endpoint_api.py index 4d1c3d4a6e90e73bc0c74a16e7bf804788490311..d2665807dd1303dd1ce1701972dec66d10ae76ed 100644 --- a/swagger/api/api_container/api/image_endpoint_api.py +++ b/swagger/api/api_container/api/image_endpoint_api.py @@ -129,43 +129,43 @@ class ImageEndpointApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete(self, image_id, **kwargs): # noqa: E501 + def delete(self, id, **kwargs): # noqa: E501 """Delete some image # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete(image_id, async_req=True) + >>> thread = api.delete(id, async_req=True) >>> result = thread.get() :param async_req bool - :param int image_id: (required) + :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_with_http_info(image_id, **kwargs) # noqa: E501 + return self.delete_with_http_info(id, **kwargs) # noqa: E501 else: - (data) = self.delete_with_http_info(image_id, **kwargs) # noqa: E501 + (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 return data - def delete_with_http_info(self, image_id, **kwargs): # noqa: E501 + def delete_with_http_info(self, id, **kwargs): # noqa: E501 """Delete some image # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_with_http_info(image_id, async_req=True) + >>> thread = api.delete_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool - :param int image_id: (required) + :param int id: (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['image_id'] # noqa: E501 + all_params = ['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -180,16 +180,16 @@ class ImageEndpointApi(object): ) params[key] = val del params['kwargs'] - # verify the required parameter 'image_id' is set - if ('image_id' not in params or - params['image_id'] is None): - raise ValueError("Missing the required parameter `image_id` when calling `delete`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 collection_formats = {} path_params = {} - if 'image_id' in params: - path_params['imageId'] = params['image_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -231,7 +231,7 @@ class ImageEndpointApi(object): >>> result = thread.get() :param async_req bool - :return: str + :return: list[ContainerImage] If the method is called asynchronously, returns the request thread. """ @@ -251,7 +251,7 @@ class ImageEndpointApi(object): >>> result = thread.get() :param async_req bool - :return: str + :return: list[ContainerImage] If the method is called asynchronously, returns the request thread. """ @@ -299,7 +299,7 @@ class ImageEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[ContainerImage]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_container/models/__init__.py b/swagger/api/api_container/models/__init__.py index 559ec678be8c44a612e4cb7e60a331e014ef1f40..fb5bfe35109838f995827602cfd1bc73ac1ab79c 100644 --- a/swagger/api/api_container/models/__init__.py +++ b/swagger/api/api_container/models/__init__.py @@ -16,15 +16,26 @@ from __future__ import absolute_import # import models into model package from api_container.models.api_error_dto import ApiErrorDto from api_container.models.column_brief_dto import ColumnBriefDto +from api_container.models.constraints import Constraints +from api_container.models.container import Container from api_container.models.container_brief_dto import ContainerBriefDto from api_container.models.container_change_dto import ContainerChangeDto from api_container.models.container_create_request_dto import ContainerCreateRequestDto from api_container.models.container_dto import ContainerDto +from api_container.models.container_image import ContainerImage +from api_container.models.container_image_date import ContainerImageDate +from api_container.models.container_image_environment_item import ContainerImageEnvironmentItem +from api_container.models.creator import Creator from api_container.models.creator_brief_dto import CreatorBriefDto from api_container.models.creator_dto import CreatorDto +from api_container.models.credential import Credential +from api_container.models.database import Database from api_container.models.database_access_dto import DatabaseAccessDto from api_container.models.database_brief_dto import DatabaseBriefDto from api_container.models.database_dto import DatabaseDto +from api_container.models.foreign_key import ForeignKey +from api_container.models.foreign_key_reference import ForeignKeyReference +from api_container.models.identifier import Identifier from api_container.models.identifier_brief_dto import IdentifierBriefDto from api_container.models.identifier_dto import IdentifierDto from api_container.models.image_brief_dto import ImageBriefDto @@ -33,10 +44,21 @@ from api_container.models.image_create_dto import ImageCreateDto from api_container.models.image_date_dto import ImageDateDto from api_container.models.image_dto import ImageDto from api_container.models.image_env_item_dto import ImageEnvItemDto +from api_container.models.license import License from api_container.models.license_dto import LicenseDto +from api_container.models.related_identifier import RelatedIdentifier from api_container.models.related_identifier_dto import RelatedIdentifierDto +from api_container.models.role import Role +from api_container.models.table import Table from api_container.models.table_brief_dto import TableBriefDto +from api_container.models.table_column import TableColumn +from api_container.models.table_column_concept import TableColumnConcept +from api_container.models.table_column_unit import TableColumnUnit +from api_container.models.unique import Unique +from api_container.models.user import User +from api_container.models.user_attribute import UserAttribute from api_container.models.user_attribute_dto import UserAttributeDto from api_container.models.user_brief_dto import UserBriefDto from api_container.models.user_dto import UserDto +from api_container.models.view import View from api_container.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_container/models/api_error_dto.py b/swagger/api/api_container/models/api_error_dto.py index 6ead500c26918dde1e1e524cfa57eb905f085053..e22a8c60d95f4a8f0079fb03e49e3fd026934137 100644 --- a/swagger/api/api_container/models/api_error_dto.py +++ b/swagger/api/api_container/models/api_error_dto.py @@ -69,7 +69,7 @@ class ApiErrorDto(object): """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_container/models/column_brief_dto.py b/swagger/api/api_container/models/column_brief_dto.py index 82914e61689da2492d47c4f6ea7c2ef7f94dd589..7d1a1a4b68fbabd1dd2ef590da24b3fb5c6befea 100644 --- a/swagger/api/api_container/models/column_brief_dto.py +++ b/swagger/api/api_container/models/column_brief_dto.py @@ -30,6 +30,8 @@ class ColumnBriefDto(object): swagger_types = { 'id': 'int', 'name': 'str', + 'database_id': 'int', + 'table_id': 'int', 'internal_name': 'str', 'column_type': 'str' } @@ -37,19 +39,25 @@ class ColumnBriefDto(object): attribute_map = { 'id': 'id', 'name': 'name', + 'database_id': 'database_id', + 'table_id': 'table_id', 'internal_name': 'internal_name', 'column_type': 'column_type' } - def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None + self._database_id = None + self._table_id = None self._internal_name = None self._column_type = None self.discriminator = None self.id = id self.name = name + self.database_id = database_id + self.table_id = table_id self.internal_name = internal_name self.column_type = column_type @@ -99,6 +107,52 @@ class ColumnBriefDto(object): self._name = name + @property + def database_id(self): + """Gets the database_id of this ColumnBriefDto. # noqa: E501 + + + :return: The database_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this ColumnBriefDto. + + + :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this ColumnBriefDto. # noqa: E501 + + + :return: The table_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this ColumnBriefDto. + + + :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + @property def internal_name(self): """Gets the internal_name of this ColumnBriefDto. # noqa: E501 diff --git a/swagger/api/api_container/models/constraints.py b/swagger/api/api_container/models/constraints.py new file mode 100644 index 0000000000000000000000000000000000000000..b78bb7b305256d612b3ce8d26f5312876679e46f --- /dev/null +++ b/swagger/api/api_container/models/constraints.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Constraints(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uniques': 'list[Unique]', + 'foreign_keys': 'list[ForeignKey]', + 'checks': 'list[str]' + } + + attribute_map = { + 'uniques': 'uniques', + 'foreign_keys': 'foreignKeys', + 'checks': 'checks' + } + + def __init__(self, uniques=None, foreign_keys=None, checks=None): # noqa: E501 + """Constraints - a model defined in Swagger""" # noqa: E501 + self._uniques = None + self._foreign_keys = None + self._checks = None + self.discriminator = None + if uniques is not None: + self.uniques = uniques + if foreign_keys is not None: + self.foreign_keys = foreign_keys + if checks is not None: + self.checks = checks + + @property + def uniques(self): + """Gets the uniques of this Constraints. # noqa: E501 + + + :return: The uniques of this Constraints. # noqa: E501 + :rtype: list[Unique] + """ + return self._uniques + + @uniques.setter + def uniques(self, uniques): + """Sets the uniques of this Constraints. + + + :param uniques: The uniques of this Constraints. # noqa: E501 + :type: list[Unique] + """ + + self._uniques = uniques + + @property + def foreign_keys(self): + """Gets the foreign_keys of this Constraints. # noqa: E501 + + + :return: The foreign_keys of this Constraints. # noqa: E501 + :rtype: list[ForeignKey] + """ + return self._foreign_keys + + @foreign_keys.setter + def foreign_keys(self, foreign_keys): + """Sets the foreign_keys of this Constraints. + + + :param foreign_keys: The foreign_keys of this Constraints. # noqa: E501 + :type: list[ForeignKey] + """ + + self._foreign_keys = foreign_keys + + @property + def checks(self): + """Gets the checks of this Constraints. # noqa: E501 + + + :return: The checks of this Constraints. # noqa: E501 + :rtype: list[str] + """ + return self._checks + + @checks.setter + def checks(self, checks): + """Sets the checks of this Constraints. + + + :param checks: The checks of this Constraints. # noqa: E501 + :type: list[str] + """ + + self._checks = checks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Constraints, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Constraints): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/container.py b/swagger/api/api_container/models/container.py new file mode 100644 index 0000000000000000000000000000000000000000..9a1ebac4f05de3ac9fef464b5593f38ebade52d9 --- /dev/null +++ b/swagger/api/api_container/models/container.py @@ -0,0 +1,474 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Container(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'created_by': 'str', + 'creator': 'User', + 'owned_by': 'str', + 'owner': 'User', + 'name': 'str', + 'internal_name': 'str', + 'hash': 'str', + 'image_id': 'int', + 'port': 'int', + 'database': 'Database', + 'image': 'ContainerImage', + 'ip_address': 'str', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'created_by': 'createdBy', + 'creator': 'creator', + 'owned_by': 'ownedBy', + 'owner': 'owner', + 'name': 'name', + 'internal_name': 'internalName', + 'hash': 'hash', + 'image_id': 'imageId', + 'port': 'port', + 'database': 'database', + 'image': 'image', + 'ip_address': 'ipAddress', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, created_by=None, creator=None, owned_by=None, owner=None, name=None, internal_name=None, hash=None, image_id=None, port=None, database=None, image=None, ip_address=None, created=None, last_modified=None): # noqa: E501 + """Container - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_by = None + self._creator = None + self._owned_by = None + self._owner = None + self._name = None + self._internal_name = None + self._hash = None + self._image_id = None + self._port = None + self._database = None + self._image = None + self._ip_address = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if created_by is not None: + self.created_by = created_by + if creator is not None: + self.creator = creator + if owned_by is not None: + self.owned_by = owned_by + if owner is not None: + self.owner = owner + if name is not None: + self.name = name + if internal_name is not None: + self.internal_name = internal_name + if hash is not None: + self.hash = hash + if image_id is not None: + self.image_id = image_id + if port is not None: + self.port = port + if database is not None: + self.database = database + if image is not None: + self.image = image + if ip_address is not None: + self.ip_address = ip_address + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this Container. # noqa: E501 + + + :return: The id of this Container. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Container. + + + :param id: The id of this Container. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def created_by(self): + """Gets the created_by of this Container. # noqa: E501 + + + :return: The created_by of this Container. # noqa: E501 + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """Sets the created_by of this Container. + + + :param created_by: The created_by of this Container. # noqa: E501 + :type: str + """ + + self._created_by = created_by + + @property + def creator(self): + """Gets the creator of this Container. # noqa: E501 + + + :return: The creator of this Container. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Container. + + + :param creator: The creator of this Container. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def owned_by(self): + """Gets the owned_by of this Container. # noqa: E501 + + + :return: The owned_by of this Container. # noqa: E501 + :rtype: str + """ + return self._owned_by + + @owned_by.setter + def owned_by(self, owned_by): + """Sets the owned_by of this Container. + + + :param owned_by: The owned_by of this Container. # noqa: E501 + :type: str + """ + + self._owned_by = owned_by + + @property + def owner(self): + """Gets the owner of this Container. # noqa: E501 + + + :return: The owner of this Container. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Container. + + + :param owner: The owner of this Container. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def name(self): + """Gets the name of this Container. # noqa: E501 + + + :return: The name of this Container. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Container. + + + :param name: The name of this Container. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def internal_name(self): + """Gets the internal_name of this Container. # noqa: E501 + + + :return: The internal_name of this Container. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this Container. + + + :param internal_name: The internal_name of this Container. # noqa: E501 + :type: str + """ + + self._internal_name = internal_name + + @property + def hash(self): + """Gets the hash of this Container. # noqa: E501 + + + :return: The hash of this Container. # noqa: E501 + :rtype: str + """ + return self._hash + + @hash.setter + def hash(self, hash): + """Sets the hash of this Container. + + + :param hash: The hash of this Container. # noqa: E501 + :type: str + """ + + self._hash = hash + + @property + def image_id(self): + """Gets the image_id of this Container. # noqa: E501 + + + :return: The image_id of this Container. # noqa: E501 + :rtype: int + """ + return self._image_id + + @image_id.setter + def image_id(self, image_id): + """Sets the image_id of this Container. + + + :param image_id: The image_id of this Container. # noqa: E501 + :type: int + """ + + self._image_id = image_id + + @property + def port(self): + """Gets the port of this Container. # noqa: E501 + + + :return: The port of this Container. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this Container. + + + :param port: The port of this Container. # noqa: E501 + :type: int + """ + + self._port = port + + @property + def database(self): + """Gets the database of this Container. # noqa: E501 + + + :return: The database of this Container. # noqa: E501 + :rtype: Database + """ + return self._database + + @database.setter + def database(self, database): + """Sets the database of this Container. + + + :param database: The database of this Container. # noqa: E501 + :type: Database + """ + + self._database = database + + @property + def image(self): + """Gets the image of this Container. # noqa: E501 + + + :return: The image of this Container. # noqa: E501 + :rtype: ContainerImage + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this Container. + + + :param image: The image of this Container. # noqa: E501 + :type: ContainerImage + """ + + self._image = image + + @property + def ip_address(self): + """Gets the ip_address of this Container. # noqa: E501 + + + :return: The ip_address of this Container. # noqa: E501 + :rtype: str + """ + return self._ip_address + + @ip_address.setter + def ip_address(self, ip_address): + """Sets the ip_address of this Container. + + + :param ip_address: The ip_address of this Container. # noqa: E501 + :type: str + """ + + self._ip_address = ip_address + + @property + def created(self): + """Gets the created of this Container. # noqa: E501 + + + :return: The created of this Container. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Container. + + + :param created: The created of this Container. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this Container. # noqa: E501 + + + :return: The last_modified of this Container. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this Container. + + + :param last_modified: The last_modified of this Container. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Container, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Container): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/container_image.py b/swagger/api/api_container/models/container_image.py new file mode 100644 index 0000000000000000000000000000000000000000..d6291d303e8b15e66220283832db454dad6d7f82 --- /dev/null +++ b/swagger/api/api_container/models/container_image.py @@ -0,0 +1,500 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ContainerImage(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'repository': 'str', + 'registry': 'str', + 'tag': 'str', + 'driver_class': 'str', + 'dialect': 'str', + 'jdbc_method': 'str', + 'hash': 'str', + 'compiled': 'datetime', + 'size': 'int', + 'default_port': 'int', + 'environment': 'list[ContainerImageEnvironmentItem]', + 'date_formats': 'list[ContainerImageDate]', + 'containers': 'list[Container]', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'repository': 'repository', + 'registry': 'registry', + 'tag': 'tag', + 'driver_class': 'driverClass', + 'dialect': 'dialect', + 'jdbc_method': 'jdbcMethod', + 'hash': 'hash', + 'compiled': 'compiled', + 'size': 'size', + 'default_port': 'defaultPort', + 'environment': 'environment', + 'date_formats': 'dateFormats', + 'containers': 'containers', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, repository=None, registry=None, tag=None, driver_class=None, dialect=None, jdbc_method=None, hash=None, compiled=None, size=None, default_port=None, environment=None, date_formats=None, containers=None, created=None, last_modified=None): # noqa: E501 + """ContainerImage - a model defined in Swagger""" # noqa: E501 + self._id = None + self._repository = None + self._registry = None + self._tag = None + self._driver_class = None + self._dialect = None + self._jdbc_method = None + self._hash = None + self._compiled = None + self._size = None + self._default_port = None + self._environment = None + self._date_formats = None + self._containers = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if repository is not None: + self.repository = repository + if registry is not None: + self.registry = registry + if tag is not None: + self.tag = tag + if driver_class is not None: + self.driver_class = driver_class + if dialect is not None: + self.dialect = dialect + if jdbc_method is not None: + self.jdbc_method = jdbc_method + if hash is not None: + self.hash = hash + if compiled is not None: + self.compiled = compiled + if size is not None: + self.size = size + if default_port is not None: + self.default_port = default_port + if environment is not None: + self.environment = environment + if date_formats is not None: + self.date_formats = date_formats + if containers is not None: + self.containers = containers + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this ContainerImage. # noqa: E501 + + + :return: The id of this ContainerImage. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ContainerImage. + + + :param id: The id of this ContainerImage. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def repository(self): + """Gets the repository of this ContainerImage. # noqa: E501 + + + :return: The repository of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this ContainerImage. + + + :param repository: The repository of this ContainerImage. # noqa: E501 + :type: str + """ + + self._repository = repository + + @property + def registry(self): + """Gets the registry of this ContainerImage. # noqa: E501 + + + :return: The registry of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ContainerImage. + + + :param registry: The registry of this ContainerImage. # noqa: E501 + :type: str + """ + + self._registry = registry + + @property + def tag(self): + """Gets the tag of this ContainerImage. # noqa: E501 + + + :return: The tag of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this ContainerImage. + + + :param tag: The tag of this ContainerImage. # noqa: E501 + :type: str + """ + + self._tag = tag + + @property + def driver_class(self): + """Gets the driver_class of this ContainerImage. # noqa: E501 + + + :return: The driver_class of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._driver_class + + @driver_class.setter + def driver_class(self, driver_class): + """Sets the driver_class of this ContainerImage. + + + :param driver_class: The driver_class of this ContainerImage. # noqa: E501 + :type: str + """ + + self._driver_class = driver_class + + @property + def dialect(self): + """Gets the dialect of this ContainerImage. # noqa: E501 + + + :return: The dialect of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._dialect + + @dialect.setter + def dialect(self, dialect): + """Sets the dialect of this ContainerImage. + + + :param dialect: The dialect of this ContainerImage. # noqa: E501 + :type: str + """ + + self._dialect = dialect + + @property + def jdbc_method(self): + """Gets the jdbc_method of this ContainerImage. # noqa: E501 + + + :return: The jdbc_method of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._jdbc_method + + @jdbc_method.setter + def jdbc_method(self, jdbc_method): + """Sets the jdbc_method of this ContainerImage. + + + :param jdbc_method: The jdbc_method of this ContainerImage. # noqa: E501 + :type: str + """ + + self._jdbc_method = jdbc_method + + @property + def hash(self): + """Gets the hash of this ContainerImage. # noqa: E501 + + + :return: The hash of this ContainerImage. # noqa: E501 + :rtype: str + """ + return self._hash + + @hash.setter + def hash(self, hash): + """Sets the hash of this ContainerImage. + + + :param hash: The hash of this ContainerImage. # noqa: E501 + :type: str + """ + + self._hash = hash + + @property + def compiled(self): + """Gets the compiled of this ContainerImage. # noqa: E501 + + + :return: The compiled of this ContainerImage. # noqa: E501 + :rtype: datetime + """ + return self._compiled + + @compiled.setter + def compiled(self, compiled): + """Sets the compiled of this ContainerImage. + + + :param compiled: The compiled of this ContainerImage. # noqa: E501 + :type: datetime + """ + + self._compiled = compiled + + @property + def size(self): + """Gets the size of this ContainerImage. # noqa: E501 + + + :return: The size of this ContainerImage. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this ContainerImage. + + + :param size: The size of this ContainerImage. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def default_port(self): + """Gets the default_port of this ContainerImage. # noqa: E501 + + + :return: The default_port of this ContainerImage. # noqa: E501 + :rtype: int + """ + return self._default_port + + @default_port.setter + def default_port(self, default_port): + """Sets the default_port of this ContainerImage. + + + :param default_port: The default_port of this ContainerImage. # noqa: E501 + :type: int + """ + + self._default_port = default_port + + @property + def environment(self): + """Gets the environment of this ContainerImage. # noqa: E501 + + + :return: The environment of this ContainerImage. # noqa: E501 + :rtype: list[ContainerImageEnvironmentItem] + """ + return self._environment + + @environment.setter + def environment(self, environment): + """Sets the environment of this ContainerImage. + + + :param environment: The environment of this ContainerImage. # noqa: E501 + :type: list[ContainerImageEnvironmentItem] + """ + + self._environment = environment + + @property + def date_formats(self): + """Gets the date_formats of this ContainerImage. # noqa: E501 + + + :return: The date_formats of this ContainerImage. # noqa: E501 + :rtype: list[ContainerImageDate] + """ + return self._date_formats + + @date_formats.setter + def date_formats(self, date_formats): + """Sets the date_formats of this ContainerImage. + + + :param date_formats: The date_formats of this ContainerImage. # noqa: E501 + :type: list[ContainerImageDate] + """ + + self._date_formats = date_formats + + @property + def containers(self): + """Gets the containers of this ContainerImage. # noqa: E501 + + + :return: The containers of this ContainerImage. # noqa: E501 + :rtype: list[Container] + """ + return self._containers + + @containers.setter + def containers(self, containers): + """Sets the containers of this ContainerImage. + + + :param containers: The containers of this ContainerImage. # noqa: E501 + :type: list[Container] + """ + + self._containers = containers + + @property + def created(self): + """Gets the created of this ContainerImage. # noqa: E501 + + + :return: The created of this ContainerImage. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ContainerImage. + + + :param created: The created of this ContainerImage. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this ContainerImage. # noqa: E501 + + + :return: The last_modified of this ContainerImage. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this ContainerImage. + + + :param last_modified: The last_modified of this ContainerImage. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ContainerImage, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContainerImage): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/container_image_date.py b/swagger/api/api_container/models/container_image_date.py new file mode 100644 index 0000000000000000000000000000000000000000..45fc8ac3b96619312b23fbfb0f801f983c887487 --- /dev/null +++ b/swagger/api/api_container/models/container_image_date.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ContainerImageDate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'iid': 'int', + 'image': 'ContainerImage', + 'example': 'str', + 'has_time': 'bool', + 'database_format': 'str', + 'unix_format': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'iid': 'iid', + 'image': 'image', + 'example': 'example', + 'has_time': 'hasTime', + 'database_format': 'databaseFormat', + 'unix_format': 'unixFormat', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, iid=None, image=None, example=None, has_time=None, database_format=None, unix_format=None, created_at=None): # noqa: E501 + """ContainerImageDate - a model defined in Swagger""" # noqa: E501 + self._id = None + self._iid = None + self._image = None + self._example = None + self._has_time = None + self._database_format = None + self._unix_format = None + self._created_at = None + self.discriminator = None + if id is not None: + self.id = id + if iid is not None: + self.iid = iid + if image is not None: + self.image = image + if example is not None: + self.example = example + if has_time is not None: + self.has_time = has_time + if database_format is not None: + self.database_format = database_format + if unix_format is not None: + self.unix_format = unix_format + if created_at is not None: + self.created_at = created_at + + @property + def id(self): + """Gets the id of this ContainerImageDate. # noqa: E501 + + + :return: The id of this ContainerImageDate. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ContainerImageDate. + + + :param id: The id of this ContainerImageDate. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def iid(self): + """Gets the iid of this ContainerImageDate. # noqa: E501 + + + :return: The iid of this ContainerImageDate. # noqa: E501 + :rtype: int + """ + return self._iid + + @iid.setter + def iid(self, iid): + """Sets the iid of this ContainerImageDate. + + + :param iid: The iid of this ContainerImageDate. # noqa: E501 + :type: int + """ + + self._iid = iid + + @property + def image(self): + """Gets the image of this ContainerImageDate. # noqa: E501 + + + :return: The image of this ContainerImageDate. # noqa: E501 + :rtype: ContainerImage + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this ContainerImageDate. + + + :param image: The image of this ContainerImageDate. # noqa: E501 + :type: ContainerImage + """ + + self._image = image + + @property + def example(self): + """Gets the example of this ContainerImageDate. # noqa: E501 + + + :return: The example of this ContainerImageDate. # noqa: E501 + :rtype: str + """ + return self._example + + @example.setter + def example(self, example): + """Sets the example of this ContainerImageDate. + + + :param example: The example of this ContainerImageDate. # noqa: E501 + :type: str + """ + + self._example = example + + @property + def has_time(self): + """Gets the has_time of this ContainerImageDate. # noqa: E501 + + + :return: The has_time of this ContainerImageDate. # noqa: E501 + :rtype: bool + """ + return self._has_time + + @has_time.setter + def has_time(self, has_time): + """Sets the has_time of this ContainerImageDate. + + + :param has_time: The has_time of this ContainerImageDate. # noqa: E501 + :type: bool + """ + + self._has_time = has_time + + @property + def database_format(self): + """Gets the database_format of this ContainerImageDate. # noqa: E501 + + + :return: The database_format of this ContainerImageDate. # noqa: E501 + :rtype: str + """ + return self._database_format + + @database_format.setter + def database_format(self, database_format): + """Sets the database_format of this ContainerImageDate. + + + :param database_format: The database_format of this ContainerImageDate. # noqa: E501 + :type: str + """ + + self._database_format = database_format + + @property + def unix_format(self): + """Gets the unix_format of this ContainerImageDate. # noqa: E501 + + + :return: The unix_format of this ContainerImageDate. # noqa: E501 + :rtype: str + """ + return self._unix_format + + @unix_format.setter + def unix_format(self, unix_format): + """Sets the unix_format of this ContainerImageDate. + + + :param unix_format: The unix_format of this ContainerImageDate. # noqa: E501 + :type: str + """ + + self._unix_format = unix_format + + @property + def created_at(self): + """Gets the created_at of this ContainerImageDate. # noqa: E501 + + + :return: The created_at of this ContainerImageDate. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ContainerImageDate. + + + :param created_at: The created_at of this ContainerImageDate. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ContainerImageDate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContainerImageDate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/container_image_environment_item.py b/swagger/api/api_container/models/container_image_environment_item.py new file mode 100644 index 0000000000000000000000000000000000000000..ce7e88c8fe13166906f1512c757cd16518f58625 --- /dev/null +++ b/swagger/api/api_container/models/container_image_environment_item.py @@ -0,0 +1,298 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ContainerImageEnvironmentItem(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'iid': 'int', + 'key': 'str', + 'value': 'str', + 'type': 'str', + 'image': 'ContainerImage', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'iid': 'iid', + 'key': 'key', + 'value': 'value', + 'type': 'type', + 'image': 'image', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, iid=None, key=None, value=None, type=None, image=None, created=None, last_modified=None): # noqa: E501 + """ContainerImageEnvironmentItem - a model defined in Swagger""" # noqa: E501 + self._id = None + self._iid = None + self._key = None + self._value = None + self._type = None + self._image = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if iid is not None: + self.iid = iid + if key is not None: + self.key = key + if value is not None: + self.value = value + if type is not None: + self.type = type + if image is not None: + self.image = image + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The id of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ContainerImageEnvironmentItem. + + + :param id: The id of this ContainerImageEnvironmentItem. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def iid(self): + """Gets the iid of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The iid of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: int + """ + return self._iid + + @iid.setter + def iid(self, iid): + """Sets the iid of this ContainerImageEnvironmentItem. + + + :param iid: The iid of this ContainerImageEnvironmentItem. # noqa: E501 + :type: int + """ + + self._iid = iid + + @property + def key(self): + """Gets the key of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The key of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ContainerImageEnvironmentItem. + + + :param key: The key of this ContainerImageEnvironmentItem. # noqa: E501 + :type: str + """ + + self._key = key + + @property + def value(self): + """Gets the value of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The value of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ContainerImageEnvironmentItem. + + + :param value: The value of this ContainerImageEnvironmentItem. # noqa: E501 + :type: str + """ + + self._value = value + + @property + def type(self): + """Gets the type of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The type of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ContainerImageEnvironmentItem. + + + :param type: The type of this ContainerImageEnvironmentItem. # noqa: E501 + :type: str + """ + allowed_values = ["USERNAME", "PASSWORD", "PRIVILEGED_USERNAME", "PRIVILEGED_PASSWORD"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def image(self): + """Gets the image of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The image of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: ContainerImage + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this ContainerImageEnvironmentItem. + + + :param image: The image of this ContainerImageEnvironmentItem. # noqa: E501 + :type: ContainerImage + """ + + self._image = image + + @property + def created(self): + """Gets the created of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The created of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ContainerImageEnvironmentItem. + + + :param created: The created of this ContainerImageEnvironmentItem. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this ContainerImageEnvironmentItem. # noqa: E501 + + + :return: The last_modified of this ContainerImageEnvironmentItem. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this ContainerImageEnvironmentItem. + + + :param last_modified: The last_modified of this ContainerImageEnvironmentItem. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ContainerImageEnvironmentItem, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContainerImageEnvironmentItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/creator.py b/swagger/api/api_container/models/creator.py new file mode 100644 index 0000000000000000000000000000000000000000..ba0c726b493a01a7b77cbfd786a7f8f7e3b05465 --- /dev/null +++ b/swagger/api/api_container/models/creator.py @@ -0,0 +1,344 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Creator(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'pid': 'int', + 'firstname': 'str', + 'lastname': 'str', + 'affiliation': 'str', + 'orcid': 'str', + 'identifier': 'Identifier', + 'created': 'datetime', + 'creator': 'User', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'pid': 'pid', + 'firstname': 'firstname', + 'lastname': 'lastname', + 'affiliation': 'affiliation', + 'orcid': 'orcid', + 'identifier': 'identifier', + 'created': 'created', + 'creator': 'creator', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, pid=None, firstname=None, lastname=None, affiliation=None, orcid=None, identifier=None, created=None, creator=None, last_modified=None): # noqa: E501 + """Creator - a model defined in Swagger""" # noqa: E501 + self._id = None + self._pid = None + self._firstname = None + self._lastname = None + self._affiliation = None + self._orcid = None + self._identifier = None + self._created = None + self._creator = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if pid is not None: + self.pid = pid + if firstname is not None: + self.firstname = firstname + if lastname is not None: + self.lastname = lastname + if affiliation is not None: + self.affiliation = affiliation + if orcid is not None: + self.orcid = orcid + if identifier is not None: + self.identifier = identifier + if created is not None: + self.created = created + if creator is not None: + self.creator = creator + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this Creator. # noqa: E501 + + + :return: The id of this Creator. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Creator. + + + :param id: The id of this Creator. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def pid(self): + """Gets the pid of this Creator. # noqa: E501 + + + :return: The pid of this Creator. # noqa: E501 + :rtype: int + """ + return self._pid + + @pid.setter + def pid(self, pid): + """Sets the pid of this Creator. + + + :param pid: The pid of this Creator. # noqa: E501 + :type: int + """ + + self._pid = pid + + @property + def firstname(self): + """Gets the firstname of this Creator. # noqa: E501 + + + :return: The firstname of this Creator. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this Creator. + + + :param firstname: The firstname of this Creator. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def lastname(self): + """Gets the lastname of this Creator. # noqa: E501 + + + :return: The lastname of this Creator. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this Creator. + + + :param lastname: The lastname of this Creator. # noqa: E501 + :type: str + """ + + self._lastname = lastname + + @property + def affiliation(self): + """Gets the affiliation of this Creator. # noqa: E501 + + + :return: The affiliation of this Creator. # noqa: E501 + :rtype: str + """ + return self._affiliation + + @affiliation.setter + def affiliation(self, affiliation): + """Sets the affiliation of this Creator. + + + :param affiliation: The affiliation of this Creator. # noqa: E501 + :type: str + """ + + self._affiliation = affiliation + + @property + def orcid(self): + """Gets the orcid of this Creator. # noqa: E501 + + + :return: The orcid of this Creator. # noqa: E501 + :rtype: str + """ + return self._orcid + + @orcid.setter + def orcid(self, orcid): + """Sets the orcid of this Creator. + + + :param orcid: The orcid of this Creator. # noqa: E501 + :type: str + """ + + self._orcid = orcid + + @property + def identifier(self): + """Gets the identifier of this Creator. # noqa: E501 + + + :return: The identifier of this Creator. # noqa: E501 + :rtype: Identifier + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """Sets the identifier of this Creator. + + + :param identifier: The identifier of this Creator. # noqa: E501 + :type: Identifier + """ + + self._identifier = identifier + + @property + def created(self): + """Gets the created of this Creator. # noqa: E501 + + + :return: The created of this Creator. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Creator. + + + :param created: The created of this Creator. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def creator(self): + """Gets the creator of this Creator. # noqa: E501 + + + :return: The creator of this Creator. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Creator. + + + :param creator: The creator of this Creator. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def last_modified(self): + """Gets the last_modified of this Creator. # noqa: E501 + + + :return: The last_modified of this Creator. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this Creator. + + + :param last_modified: The last_modified of this Creator. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Creator, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Creator): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/creator_dto.py b/swagger/api/api_container/models/creator_dto.py index aad3a7ffed69a7cd54b9062eae00ef43197c8885..57e8c6bc25f4d56ec623a0d5a68e065ba03ed6ac 100644 --- a/swagger/api/api_container/models/creator_dto.py +++ b/swagger/api/api_container/models/creator_dto.py @@ -32,9 +32,7 @@ class CreatorDto(object): 'firstname': 'str', 'lastname': 'str', 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' + 'orcid': 'str' } attribute_map = { @@ -42,20 +40,16 @@ class CreatorDto(object): 'firstname': 'firstname', 'lastname': 'lastname', 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' + 'orcid': 'orcid' } - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 """CreatorDto - a model defined in Swagger""" # noqa: E501 self._id = None self._firstname = None self._lastname = None self._affiliation = None self._orcid = None - self._created = None - self._last_modified = None self.discriminator = None self.id = id self.firstname = firstname @@ -64,10 +58,6 @@ class CreatorDto(object): self.affiliation = affiliation if orcid is not None: self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified @property def id(self): @@ -180,48 +170,6 @@ class CreatorDto(object): self._orcid = orcid - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_container/models/credential.py b/swagger/api/api_container/models/credential.py new file mode 100644 index 0000000000000000000000000000000000000000..57ed256f019690412d8768faab7bbc901858c836 --- /dev/null +++ b/swagger/api/api_container/models/credential.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Credential(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'type': 'str', + 'user_id': 'str', + 'created_date': 'int', + 'secret_data': 'str', + 'credential_data': 'str', + 'priority': 'int', + 'user': 'User' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'user_id': 'userId', + 'created_date': 'createdDate', + 'secret_data': 'secretData', + 'credential_data': 'credentialData', + 'priority': 'priority', + 'user': 'user' + } + + def __init__(self, id=None, type=None, user_id=None, created_date=None, secret_data=None, credential_data=None, priority=None, user=None): # noqa: E501 + """Credential - a model defined in Swagger""" # noqa: E501 + self._id = None + self._type = None + self._user_id = None + self._created_date = None + self._secret_data = None + self._credential_data = None + self._priority = None + self._user = None + self.discriminator = None + if id is not None: + self.id = id + if type is not None: + self.type = type + if user_id is not None: + self.user_id = user_id + if created_date is not None: + self.created_date = created_date + if secret_data is not None: + self.secret_data = secret_data + if credential_data is not None: + self.credential_data = credential_data + if priority is not None: + self.priority = priority + if user is not None: + self.user = user + + @property + def id(self): + """Gets the id of this Credential. # noqa: E501 + + + :return: The id of this Credential. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Credential. + + + :param id: The id of this Credential. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def type(self): + """Gets the type of this Credential. # noqa: E501 + + + :return: The type of this Credential. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Credential. + + + :param type: The type of this Credential. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def user_id(self): + """Gets the user_id of this Credential. # noqa: E501 + + + :return: The user_id of this Credential. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Credential. + + + :param user_id: The user_id of this Credential. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def created_date(self): + """Gets the created_date of this Credential. # noqa: E501 + + + :return: The created_date of this Credential. # noqa: E501 + :rtype: int + """ + return self._created_date + + @created_date.setter + def created_date(self, created_date): + """Sets the created_date of this Credential. + + + :param created_date: The created_date of this Credential. # noqa: E501 + :type: int + """ + + self._created_date = created_date + + @property + def secret_data(self): + """Gets the secret_data of this Credential. # noqa: E501 + + + :return: The secret_data of this Credential. # noqa: E501 + :rtype: str + """ + return self._secret_data + + @secret_data.setter + def secret_data(self, secret_data): + """Sets the secret_data of this Credential. + + + :param secret_data: The secret_data of this Credential. # noqa: E501 + :type: str + """ + + self._secret_data = secret_data + + @property + def credential_data(self): + """Gets the credential_data of this Credential. # noqa: E501 + + + :return: The credential_data of this Credential. # noqa: E501 + :rtype: str + """ + return self._credential_data + + @credential_data.setter + def credential_data(self, credential_data): + """Sets the credential_data of this Credential. + + + :param credential_data: The credential_data of this Credential. # noqa: E501 + :type: str + """ + + self._credential_data = credential_data + + @property + def priority(self): + """Gets the priority of this Credential. # noqa: E501 + + + :return: The priority of this Credential. # noqa: E501 + :rtype: int + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this Credential. + + + :param priority: The priority of this Credential. # noqa: E501 + :type: int + """ + + self._priority = priority + + @property + def user(self): + """Gets the user of this Credential. # noqa: E501 + + + :return: The user of this Credential. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Credential. + + + :param user: The user of this Credential. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Credential, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Credential): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/database.py b/swagger/api/api_container/models/database.py new file mode 100644 index 0000000000000000000000000000000000000000..e1d36089614fbf672de93c3565677fcd4140f92e --- /dev/null +++ b/swagger/api/api_container/models/database.py @@ -0,0 +1,552 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Database(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'created_by': 'str', + 'creator': 'User', + 'owned_by': 'str', + 'owner': 'User', + 'container': 'Container', + 'name': 'str', + 'internal_name': 'str', + 'exchange_name': 'str', + 'description': 'str', + 'contact_person': 'str', + 'contact': 'User', + 'identifier': 'Identifier', + 'tables': 'list[Table]', + 'views': 'list[View]', + 'is_public': 'bool', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'created_by': 'createdBy', + 'creator': 'creator', + 'owned_by': 'ownedBy', + 'owner': 'owner', + 'container': 'container', + 'name': 'name', + 'internal_name': 'internalName', + 'exchange_name': 'exchangeName', + 'description': 'description', + 'contact_person': 'contactPerson', + 'contact': 'contact', + 'identifier': 'identifier', + 'tables': 'tables', + 'views': 'views', + 'is_public': 'isPublic', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, created_by=None, creator=None, owned_by=None, owner=None, container=None, name=None, internal_name=None, exchange_name=None, description=None, contact_person=None, contact=None, identifier=None, tables=None, views=None, is_public=None, created=None, last_modified=None): # noqa: E501 + """Database - a model defined in Swagger""" # noqa: E501 + self._id = None + self._created_by = None + self._creator = None + self._owned_by = None + self._owner = None + self._container = None + self._name = None + self._internal_name = None + self._exchange_name = None + self._description = None + self._contact_person = None + self._contact = None + self._identifier = None + self._tables = None + self._views = None + self._is_public = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if created_by is not None: + self.created_by = created_by + if creator is not None: + self.creator = creator + if owned_by is not None: + self.owned_by = owned_by + if owner is not None: + self.owner = owner + if container is not None: + self.container = container + if name is not None: + self.name = name + if internal_name is not None: + self.internal_name = internal_name + if exchange_name is not None: + self.exchange_name = exchange_name + if description is not None: + self.description = description + if contact_person is not None: + self.contact_person = contact_person + if contact is not None: + self.contact = contact + if identifier is not None: + self.identifier = identifier + if tables is not None: + self.tables = tables + if views is not None: + self.views = views + if is_public is not None: + self.is_public = is_public + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this Database. # noqa: E501 + + + :return: The id of this Database. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Database. + + + :param id: The id of this Database. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def created_by(self): + """Gets the created_by of this Database. # noqa: E501 + + + :return: The created_by of this Database. # noqa: E501 + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """Sets the created_by of this Database. + + + :param created_by: The created_by of this Database. # noqa: E501 + :type: str + """ + + self._created_by = created_by + + @property + def creator(self): + """Gets the creator of this Database. # noqa: E501 + + + :return: The creator of this Database. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Database. + + + :param creator: The creator of this Database. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def owned_by(self): + """Gets the owned_by of this Database. # noqa: E501 + + + :return: The owned_by of this Database. # noqa: E501 + :rtype: str + """ + return self._owned_by + + @owned_by.setter + def owned_by(self, owned_by): + """Sets the owned_by of this Database. + + + :param owned_by: The owned_by of this Database. # noqa: E501 + :type: str + """ + + self._owned_by = owned_by + + @property + def owner(self): + """Gets the owner of this Database. # noqa: E501 + + + :return: The owner of this Database. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Database. + + + :param owner: The owner of this Database. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def container(self): + """Gets the container of this Database. # noqa: E501 + + + :return: The container of this Database. # noqa: E501 + :rtype: Container + """ + return self._container + + @container.setter + def container(self, container): + """Sets the container of this Database. + + + :param container: The container of this Database. # noqa: E501 + :type: Container + """ + + self._container = container + + @property + def name(self): + """Gets the name of this Database. # noqa: E501 + + + :return: The name of this Database. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Database. + + + :param name: The name of this Database. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def internal_name(self): + """Gets the internal_name of this Database. # noqa: E501 + + + :return: The internal_name of this Database. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this Database. + + + :param internal_name: The internal_name of this Database. # noqa: E501 + :type: str + """ + + self._internal_name = internal_name + + @property + def exchange_name(self): + """Gets the exchange_name of this Database. # noqa: E501 + + + :return: The exchange_name of this Database. # noqa: E501 + :rtype: str + """ + return self._exchange_name + + @exchange_name.setter + def exchange_name(self, exchange_name): + """Sets the exchange_name of this Database. + + + :param exchange_name: The exchange_name of this Database. # noqa: E501 + :type: str + """ + + self._exchange_name = exchange_name + + @property + def description(self): + """Gets the description of this Database. # noqa: E501 + + + :return: The description of this Database. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Database. + + + :param description: The description of this Database. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def contact_person(self): + """Gets the contact_person of this Database. # noqa: E501 + + + :return: The contact_person of this Database. # noqa: E501 + :rtype: str + """ + return self._contact_person + + @contact_person.setter + def contact_person(self, contact_person): + """Sets the contact_person of this Database. + + + :param contact_person: The contact_person of this Database. # noqa: E501 + :type: str + """ + + self._contact_person = contact_person + + @property + def contact(self): + """Gets the contact of this Database. # noqa: E501 + + + :return: The contact of this Database. # noqa: E501 + :rtype: User + """ + return self._contact + + @contact.setter + def contact(self, contact): + """Sets the contact of this Database. + + + :param contact: The contact of this Database. # noqa: E501 + :type: User + """ + + self._contact = contact + + @property + def identifier(self): + """Gets the identifier of this Database. # noqa: E501 + + + :return: The identifier of this Database. # noqa: E501 + :rtype: Identifier + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """Sets the identifier of this Database. + + + :param identifier: The identifier of this Database. # noqa: E501 + :type: Identifier + """ + + self._identifier = identifier + + @property + def tables(self): + """Gets the tables of this Database. # noqa: E501 + + + :return: The tables of this Database. # noqa: E501 + :rtype: list[Table] + """ + return self._tables + + @tables.setter + def tables(self, tables): + """Sets the tables of this Database. + + + :param tables: The tables of this Database. # noqa: E501 + :type: list[Table] + """ + + self._tables = tables + + @property + def views(self): + """Gets the views of this Database. # noqa: E501 + + + :return: The views of this Database. # noqa: E501 + :rtype: list[View] + """ + return self._views + + @views.setter + def views(self, views): + """Sets the views of this Database. + + + :param views: The views of this Database. # noqa: E501 + :type: list[View] + """ + + self._views = views + + @property + def is_public(self): + """Gets the is_public of this Database. # noqa: E501 + + + :return: The is_public of this Database. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this Database. + + + :param is_public: The is_public of this Database. # noqa: E501 + :type: bool + """ + + self._is_public = is_public + + @property + def created(self): + """Gets the created of this Database. # noqa: E501 + + + :return: The created of this Database. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Database. + + + :param created: The created of this Database. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this Database. # noqa: E501 + + + :return: The last_modified of this Database. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this Database. + + + :param last_modified: The last_modified of this Database. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Database, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Database): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/foreign_key.py b/swagger/api/api_container/models/foreign_key.py new file mode 100644 index 0000000000000000000000000000000000000000..865db8e7e7878ab3b41c7efe49ffe1a6e80d5e05 --- /dev/null +++ b/swagger/api/api_container/models/foreign_key.py @@ -0,0 +1,356 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ForeignKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'fkid': 'int', + 'tid': 'int', + 'tdbid': 'int', + 'table': 'Table', + 'rtid': 'int', + 'rtdbid': 'int', + 'referenced_table': 'Table', + 'references': 'list[ForeignKeyReference]', + 'on_update': 'str', + 'on_delete': 'str' + } + + attribute_map = { + 'fkid': 'fkid', + 'tid': 'tid', + 'tdbid': 'tdbid', + 'table': 'table', + 'rtid': 'rtid', + 'rtdbid': 'rtdbid', + 'referenced_table': 'referencedTable', + 'references': 'references', + 'on_update': 'onUpdate', + 'on_delete': 'onDelete' + } + + def __init__(self, fkid=None, tid=None, tdbid=None, table=None, rtid=None, rtdbid=None, referenced_table=None, references=None, on_update=None, on_delete=None): # noqa: E501 + """ForeignKey - a model defined in Swagger""" # noqa: E501 + self._fkid = None + self._tid = None + self._tdbid = None + self._table = None + self._rtid = None + self._rtdbid = None + self._referenced_table = None + self._references = None + self._on_update = None + self._on_delete = None + self.discriminator = None + if fkid is not None: + self.fkid = fkid + if tid is not None: + self.tid = tid + if tdbid is not None: + self.tdbid = tdbid + if table is not None: + self.table = table + if rtid is not None: + self.rtid = rtid + if rtdbid is not None: + self.rtdbid = rtdbid + if referenced_table is not None: + self.referenced_table = referenced_table + if references is not None: + self.references = references + if on_update is not None: + self.on_update = on_update + if on_delete is not None: + self.on_delete = on_delete + + @property + def fkid(self): + """Gets the fkid of this ForeignKey. # noqa: E501 + + + :return: The fkid of this ForeignKey. # noqa: E501 + :rtype: int + """ + return self._fkid + + @fkid.setter + def fkid(self, fkid): + """Sets the fkid of this ForeignKey. + + + :param fkid: The fkid of this ForeignKey. # noqa: E501 + :type: int + """ + + self._fkid = fkid + + @property + def tid(self): + """Gets the tid of this ForeignKey. # noqa: E501 + + + :return: The tid of this ForeignKey. # noqa: E501 + :rtype: int + """ + return self._tid + + @tid.setter + def tid(self, tid): + """Sets the tid of this ForeignKey. + + + :param tid: The tid of this ForeignKey. # noqa: E501 + :type: int + """ + + self._tid = tid + + @property + def tdbid(self): + """Gets the tdbid of this ForeignKey. # noqa: E501 + + + :return: The tdbid of this ForeignKey. # noqa: E501 + :rtype: int + """ + return self._tdbid + + @tdbid.setter + def tdbid(self, tdbid): + """Sets the tdbid of this ForeignKey. + + + :param tdbid: The tdbid of this ForeignKey. # noqa: E501 + :type: int + """ + + self._tdbid = tdbid + + @property + def table(self): + """Gets the table of this ForeignKey. # noqa: E501 + + + :return: The table of this ForeignKey. # noqa: E501 + :rtype: Table + """ + return self._table + + @table.setter + def table(self, table): + """Sets the table of this ForeignKey. + + + :param table: The table of this ForeignKey. # noqa: E501 + :type: Table + """ + + self._table = table + + @property + def rtid(self): + """Gets the rtid of this ForeignKey. # noqa: E501 + + + :return: The rtid of this ForeignKey. # noqa: E501 + :rtype: int + """ + return self._rtid + + @rtid.setter + def rtid(self, rtid): + """Sets the rtid of this ForeignKey. + + + :param rtid: The rtid of this ForeignKey. # noqa: E501 + :type: int + """ + + self._rtid = rtid + + @property + def rtdbid(self): + """Gets the rtdbid of this ForeignKey. # noqa: E501 + + + :return: The rtdbid of this ForeignKey. # noqa: E501 + :rtype: int + """ + return self._rtdbid + + @rtdbid.setter + def rtdbid(self, rtdbid): + """Sets the rtdbid of this ForeignKey. + + + :param rtdbid: The rtdbid of this ForeignKey. # noqa: E501 + :type: int + """ + + self._rtdbid = rtdbid + + @property + def referenced_table(self): + """Gets the referenced_table of this ForeignKey. # noqa: E501 + + + :return: The referenced_table of this ForeignKey. # noqa: E501 + :rtype: Table + """ + return self._referenced_table + + @referenced_table.setter + def referenced_table(self, referenced_table): + """Sets the referenced_table of this ForeignKey. + + + :param referenced_table: The referenced_table of this ForeignKey. # noqa: E501 + :type: Table + """ + + self._referenced_table = referenced_table + + @property + def references(self): + """Gets the references of this ForeignKey. # noqa: E501 + + + :return: The references of this ForeignKey. # noqa: E501 + :rtype: list[ForeignKeyReference] + """ + return self._references + + @references.setter + def references(self, references): + """Sets the references of this ForeignKey. + + + :param references: The references of this ForeignKey. # noqa: E501 + :type: list[ForeignKeyReference] + """ + + self._references = references + + @property + def on_update(self): + """Gets the on_update of this ForeignKey. # noqa: E501 + + + :return: The on_update of this ForeignKey. # noqa: E501 + :rtype: str + """ + return self._on_update + + @on_update.setter + def on_update(self, on_update): + """Sets the on_update of this ForeignKey. + + + :param on_update: The on_update of this ForeignKey. # noqa: E501 + :type: str + """ + allowed_values = ["ReferenceType.RESTRICT", "ReferenceType.CASCADE", "ReferenceType.SET_NULL", "ReferenceType.NO_ACTION", "ReferenceType.SET_DEFAULT"] # noqa: E501 + if on_update not in allowed_values: + raise ValueError( + "Invalid value for `on_update` ({0}), must be one of {1}" # noqa: E501 + .format(on_update, allowed_values) + ) + + self._on_update = on_update + + @property + def on_delete(self): + """Gets the on_delete of this ForeignKey. # noqa: E501 + + + :return: The on_delete of this ForeignKey. # noqa: E501 + :rtype: str + """ + return self._on_delete + + @on_delete.setter + def on_delete(self, on_delete): + """Sets the on_delete of this ForeignKey. + + + :param on_delete: The on_delete of this ForeignKey. # noqa: E501 + :type: str + """ + allowed_values = ["ReferenceType.RESTRICT", "ReferenceType.CASCADE", "ReferenceType.SET_NULL", "ReferenceType.NO_ACTION", "ReferenceType.SET_DEFAULT"] # noqa: E501 + if on_delete not in allowed_values: + raise ValueError( + "Invalid value for `on_delete` ({0}), must be one of {1}" # noqa: E501 + .format(on_delete, allowed_values) + ) + + self._on_delete = on_delete + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ForeignKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ForeignKey): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/foreign_key_reference.py b/swagger/api/api_container/models/foreign_key_reference.py new file mode 100644 index 0000000000000000000000000000000000000000..9789412be9daf8e6590de905e5c76b9a11925e65 --- /dev/null +++ b/swagger/api/api_container/models/foreign_key_reference.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ForeignKeyReference(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'foreign_key': 'ForeignKey', + 'column': 'TableColumn', + 'referenced_column': 'TableColumn' + } + + attribute_map = { + 'id': 'id', + 'foreign_key': 'foreignKey', + 'column': 'column', + 'referenced_column': 'referencedColumn' + } + + def __init__(self, id=None, foreign_key=None, column=None, referenced_column=None): # noqa: E501 + """ForeignKeyReference - a model defined in Swagger""" # noqa: E501 + self._id = None + self._foreign_key = None + self._column = None + self._referenced_column = None + self.discriminator = None + if id is not None: + self.id = id + if foreign_key is not None: + self.foreign_key = foreign_key + if column is not None: + self.column = column + if referenced_column is not None: + self.referenced_column = referenced_column + + @property + def id(self): + """Gets the id of this ForeignKeyReference. # noqa: E501 + + + :return: The id of this ForeignKeyReference. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ForeignKeyReference. + + + :param id: The id of this ForeignKeyReference. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def foreign_key(self): + """Gets the foreign_key of this ForeignKeyReference. # noqa: E501 + + + :return: The foreign_key of this ForeignKeyReference. # noqa: E501 + :rtype: ForeignKey + """ + return self._foreign_key + + @foreign_key.setter + def foreign_key(self, foreign_key): + """Sets the foreign_key of this ForeignKeyReference. + + + :param foreign_key: The foreign_key of this ForeignKeyReference. # noqa: E501 + :type: ForeignKey + """ + + self._foreign_key = foreign_key + + @property + def column(self): + """Gets the column of this ForeignKeyReference. # noqa: E501 + + + :return: The column of this ForeignKeyReference. # noqa: E501 + :rtype: TableColumn + """ + return self._column + + @column.setter + def column(self, column): + """Sets the column of this ForeignKeyReference. + + + :param column: The column of this ForeignKeyReference. # noqa: E501 + :type: TableColumn + """ + + self._column = column + + @property + def referenced_column(self): + """Gets the referenced_column of this ForeignKeyReference. # noqa: E501 + + + :return: The referenced_column of this ForeignKeyReference. # noqa: E501 + :rtype: TableColumn + """ + return self._referenced_column + + @referenced_column.setter + def referenced_column(self, referenced_column): + """Sets the referenced_column of this ForeignKeyReference. + + + :param referenced_column: The referenced_column of this ForeignKeyReference. # noqa: E501 + :type: TableColumn + """ + + self._referenced_column = referenced_column + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ForeignKeyReference, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ForeignKeyReference): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/identifier.py b/swagger/api/api_container/models/identifier.py new file mode 100644 index 0000000000000000000000000000000000000000..fcfc55f59f85afc887dcba77e13ec5d9a5bf0ad3 --- /dev/null +++ b/swagger/api/api_container/models/identifier.py @@ -0,0 +1,805 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Identifier(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'container_id': 'int', + 'database_id': 'int', + 'query_id': 'int', + 'creator': 'User', + 'title': 'str', + 'description': 'str', + 'publisher': 'str', + 'language': 'str', + 'license': 'License', + 'type': 'str', + 'query': 'str', + 'query_normalized': 'str', + 'query_hash': 'str', + 'result_hash': 'str', + 'execution': 'datetime', + 'result_number': 'int', + 'publication_year': 'int', + 'publication_month': 'int', + 'publication_day': 'int', + 'visibility': 'str', + 'database': 'Database', + 'related': 'list[RelatedIdentifier]', + 'doi': 'str', + 'creators': 'list[Creator]', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'container_id': 'containerId', + 'database_id': 'databaseId', + 'query_id': 'queryId', + 'creator': 'creator', + 'title': 'title', + 'description': 'description', + 'publisher': 'publisher', + 'language': 'language', + 'license': 'license', + 'type': 'type', + 'query': 'query', + 'query_normalized': 'queryNormalized', + 'query_hash': 'queryHash', + 'result_hash': 'resultHash', + 'execution': 'execution', + 'result_number': 'resultNumber', + 'publication_year': 'publicationYear', + 'publication_month': 'publicationMonth', + 'publication_day': 'publicationDay', + 'visibility': 'visibility', + 'database': 'database', + 'related': 'related', + 'doi': 'doi', + 'creators': 'creators', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, container_id=None, database_id=None, query_id=None, creator=None, title=None, description=None, publisher=None, language=None, license=None, type=None, query=None, query_normalized=None, query_hash=None, result_hash=None, execution=None, result_number=None, publication_year=None, publication_month=None, publication_day=None, visibility=None, database=None, related=None, doi=None, creators=None, created=None, last_modified=None): # noqa: E501 + """Identifier - a model defined in Swagger""" # noqa: E501 + self._id = None + self._container_id = None + self._database_id = None + self._query_id = None + self._creator = None + self._title = None + self._description = None + self._publisher = None + self._language = None + self._license = None + self._type = None + self._query = None + self._query_normalized = None + self._query_hash = None + self._result_hash = None + self._execution = None + self._result_number = None + self._publication_year = None + self._publication_month = None + self._publication_day = None + self._visibility = None + self._database = None + self._related = None + self._doi = None + self._creators = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if container_id is not None: + self.container_id = container_id + if database_id is not None: + self.database_id = database_id + if query_id is not None: + self.query_id = query_id + if creator is not None: + self.creator = creator + if title is not None: + self.title = title + if description is not None: + self.description = description + self.publisher = publisher + if language is not None: + self.language = language + if license is not None: + self.license = license + if type is not None: + self.type = type + if query is not None: + self.query = query + if query_normalized is not None: + self.query_normalized = query_normalized + if query_hash is not None: + self.query_hash = query_hash + if result_hash is not None: + self.result_hash = result_hash + if execution is not None: + self.execution = execution + if result_number is not None: + self.result_number = result_number + if publication_year is not None: + self.publication_year = publication_year + if publication_month is not None: + self.publication_month = publication_month + if publication_day is not None: + self.publication_day = publication_day + if visibility is not None: + self.visibility = visibility + if database is not None: + self.database = database + if related is not None: + self.related = related + if doi is not None: + self.doi = doi + if creators is not None: + self.creators = creators + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this Identifier. # noqa: E501 + + + :return: The id of this Identifier. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Identifier. + + + :param id: The id of this Identifier. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def container_id(self): + """Gets the container_id of this Identifier. # noqa: E501 + + + :return: The container_id of this Identifier. # noqa: E501 + :rtype: int + """ + return self._container_id + + @container_id.setter + def container_id(self, container_id): + """Sets the container_id of this Identifier. + + + :param container_id: The container_id of this Identifier. # noqa: E501 + :type: int + """ + + self._container_id = container_id + + @property + def database_id(self): + """Gets the database_id of this Identifier. # noqa: E501 + + + :return: The database_id of this Identifier. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this Identifier. + + + :param database_id: The database_id of this Identifier. # noqa: E501 + :type: int + """ + + self._database_id = database_id + + @property + def query_id(self): + """Gets the query_id of this Identifier. # noqa: E501 + + + :return: The query_id of this Identifier. # noqa: E501 + :rtype: int + """ + return self._query_id + + @query_id.setter + def query_id(self, query_id): + """Sets the query_id of this Identifier. + + + :param query_id: The query_id of this Identifier. # noqa: E501 + :type: int + """ + + self._query_id = query_id + + @property + def creator(self): + """Gets the creator of this Identifier. # noqa: E501 + + + :return: The creator of this Identifier. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Identifier. + + + :param creator: The creator of this Identifier. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def title(self): + """Gets the title of this Identifier. # noqa: E501 + + + :return: The title of this Identifier. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this Identifier. + + + :param title: The title of this Identifier. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def description(self): + """Gets the description of this Identifier. # noqa: E501 + + + :return: The description of this Identifier. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Identifier. + + + :param description: The description of this Identifier. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def publisher(self): + """Gets the publisher of this Identifier. # noqa: E501 + + + :return: The publisher of this Identifier. # noqa: E501 + :rtype: str + """ + return self._publisher + + @publisher.setter + def publisher(self, publisher): + """Sets the publisher of this Identifier. + + + :param publisher: The publisher of this Identifier. # noqa: E501 + :type: str + """ + if publisher is None: + raise ValueError("Invalid value for `publisher`, must not be `None`") # noqa: E501 + + self._publisher = publisher + + @property + def language(self): + """Gets the language of this Identifier. # noqa: E501 + + + :return: The language of this Identifier. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this Identifier. + + + :param language: The language of this Identifier. # noqa: E501 + :type: str + """ + allowed_values = ["LanguageType.AB", "LanguageType.AA", "LanguageType.AF", "LanguageType.AK", "LanguageType.SQ", "LanguageType.AM", "LanguageType.AR", "LanguageType.AN", "LanguageType.HY", "LanguageType.AS", "LanguageType.AV", "LanguageType.AE", "LanguageType.AY", "LanguageType.AZ", "LanguageType.BM", "LanguageType.BA", "LanguageType.EU", "LanguageType.BE", "LanguageType.BN", "LanguageType.BH", "LanguageType.BI", "LanguageType.BS", "LanguageType.BR", "LanguageType.BG", "LanguageType.MY", "LanguageType.CA", "LanguageType.KM", "LanguageType.CH", "LanguageType.CE", "LanguageType.NY", "LanguageType.ZH", "LanguageType.CU", "LanguageType.CV", "LanguageType.KW", "LanguageType.CO", "LanguageType.CR", "LanguageType.HR", "LanguageType.CS", "LanguageType.DA", "LanguageType.DV", "LanguageType.NL", "LanguageType.DZ", "LanguageType.EN", "LanguageType.EO", "LanguageType.ET", "LanguageType.EE", "LanguageType.FO", "LanguageType.FJ", "LanguageType.FI", "LanguageType.FR", "LanguageType.FF", "LanguageType.GD", "LanguageType.GL", "LanguageType.LG", "LanguageType.KA", "LanguageType.DE", "LanguageType.KI", "LanguageType.EL", "LanguageType.KL", "LanguageType.GN", "LanguageType.GU", "LanguageType.HT", "LanguageType.HA", "LanguageType.HE", "LanguageType.HZ", "LanguageType.HI", "LanguageType.HO", "LanguageType.HU", "LanguageType.IS", "LanguageType.IO", "LanguageType.IG", "LanguageType.ID", "LanguageType.IA", "LanguageType.IE", "LanguageType.IU", "LanguageType.IK", "LanguageType.GA", "LanguageType.IT", "LanguageType.JA", "LanguageType.JV", "LanguageType.KN", "LanguageType.KR", "LanguageType.KS", "LanguageType.KK", "LanguageType.RW", "LanguageType.KV", "LanguageType.KG", "LanguageType.KO", "LanguageType.KJ", "LanguageType.KU", "LanguageType.KY", "LanguageType.LO", "LanguageType.LA", "LanguageType.LV", "LanguageType.LB", "LanguageType.LI", "LanguageType.LN", "LanguageType.LT", "LanguageType.LU", "LanguageType.MK", "LanguageType.MG", "LanguageType.MS", "LanguageType.ML", "LanguageType.MT", "LanguageType.GV", "LanguageType.MI", "LanguageType.MR", "LanguageType.MH", "LanguageType.RO", "LanguageType.MN", "LanguageType.NA", "LanguageType.NV", "LanguageType.ND", "LanguageType.NG", "LanguageType.NE", "LanguageType.SE", "LanguageType.NO", "LanguageType.NB", "LanguageType.NN", "LanguageType.II", "LanguageType.OC", "LanguageType.OJ", "LanguageType.OR", "LanguageType.OM", "LanguageType.OS", "LanguageType.PI", "LanguageType.PA", "LanguageType.PS", "LanguageType.FA", "LanguageType.PL", "LanguageType.PT", "LanguageType.QU", "LanguageType.RM", "LanguageType.RN", "LanguageType.RU", "LanguageType.SM", "LanguageType.SG", "LanguageType.SA", "LanguageType.SC", "LanguageType.SR", "LanguageType.SN", "LanguageType.SD", "LanguageType.SI", "LanguageType.SK", "LanguageType.SL", "LanguageType.SO", "LanguageType.ST", "LanguageType.NR", "LanguageType.ES", "LanguageType.SU", "LanguageType.SW", "LanguageType.SS", "LanguageType.SV", "LanguageType.TL", "LanguageType.TY", "LanguageType.TG", "LanguageType.TA", "LanguageType.TT", "LanguageType.TE", "LanguageType.TH", "LanguageType.BO", "LanguageType.TI", "LanguageType.TO", "LanguageType.TS", "LanguageType.TN", "LanguageType.TR", "LanguageType.TK", "LanguageType.TW", "LanguageType.UG", "LanguageType.UK", "LanguageType.UR", "LanguageType.UZ", "LanguageType.VE", "LanguageType.VI", "LanguageType.VO", "LanguageType.WA", "LanguageType.CY", "LanguageType.FY", "LanguageType.WO", "LanguageType.XH", "LanguageType.YI", "LanguageType.YO", "LanguageType.ZA", "LanguageType.ZU"] # noqa: E501 + if language not in allowed_values: + raise ValueError( + "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 + .format(language, allowed_values) + ) + + self._language = language + + @property + def license(self): + """Gets the license of this Identifier. # noqa: E501 + + + :return: The license of this Identifier. # noqa: E501 + :rtype: License + """ + return self._license + + @license.setter + def license(self, license): + """Sets the license of this Identifier. + + + :param license: The license of this Identifier. # noqa: E501 + :type: License + """ + + self._license = license + + @property + def type(self): + """Gets the type of this Identifier. # noqa: E501 + + + :return: The type of this Identifier. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Identifier. + + + :param type: The type of this Identifier. # noqa: E501 + :type: str + """ + allowed_values = ["DATABASE", "SUBSET"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def query(self): + """Gets the query of this Identifier. # noqa: E501 + + + :return: The query of this Identifier. # noqa: E501 + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """Sets the query of this Identifier. + + + :param query: The query of this Identifier. # noqa: E501 + :type: str + """ + + self._query = query + + @property + def query_normalized(self): + """Gets the query_normalized of this Identifier. # noqa: E501 + + + :return: The query_normalized of this Identifier. # noqa: E501 + :rtype: str + """ + return self._query_normalized + + @query_normalized.setter + def query_normalized(self, query_normalized): + """Sets the query_normalized of this Identifier. + + + :param query_normalized: The query_normalized of this Identifier. # noqa: E501 + :type: str + """ + + self._query_normalized = query_normalized + + @property + def query_hash(self): + """Gets the query_hash of this Identifier. # noqa: E501 + + + :return: The query_hash of this Identifier. # noqa: E501 + :rtype: str + """ + return self._query_hash + + @query_hash.setter + def query_hash(self, query_hash): + """Sets the query_hash of this Identifier. + + + :param query_hash: The query_hash of this Identifier. # noqa: E501 + :type: str + """ + + self._query_hash = query_hash + + @property + def result_hash(self): + """Gets the result_hash of this Identifier. # noqa: E501 + + + :return: The result_hash of this Identifier. # noqa: E501 + :rtype: str + """ + return self._result_hash + + @result_hash.setter + def result_hash(self, result_hash): + """Sets the result_hash of this Identifier. + + + :param result_hash: The result_hash of this Identifier. # noqa: E501 + :type: str + """ + + self._result_hash = result_hash + + @property + def execution(self): + """Gets the execution of this Identifier. # noqa: E501 + + + :return: The execution of this Identifier. # noqa: E501 + :rtype: datetime + """ + return self._execution + + @execution.setter + def execution(self, execution): + """Sets the execution of this Identifier. + + + :param execution: The execution of this Identifier. # noqa: E501 + :type: datetime + """ + + self._execution = execution + + @property + def result_number(self): + """Gets the result_number of this Identifier. # noqa: E501 + + + :return: The result_number of this Identifier. # noqa: E501 + :rtype: int + """ + return self._result_number + + @result_number.setter + def result_number(self, result_number): + """Sets the result_number of this Identifier. + + + :param result_number: The result_number of this Identifier. # noqa: E501 + :type: int + """ + + self._result_number = result_number + + @property + def publication_year(self): + """Gets the publication_year of this Identifier. # noqa: E501 + + + :return: The publication_year of this Identifier. # noqa: E501 + :rtype: int + """ + return self._publication_year + + @publication_year.setter + def publication_year(self, publication_year): + """Sets the publication_year of this Identifier. + + + :param publication_year: The publication_year of this Identifier. # noqa: E501 + :type: int + """ + + self._publication_year = publication_year + + @property + def publication_month(self): + """Gets the publication_month of this Identifier. # noqa: E501 + + + :return: The publication_month of this Identifier. # noqa: E501 + :rtype: int + """ + return self._publication_month + + @publication_month.setter + def publication_month(self, publication_month): + """Sets the publication_month of this Identifier. + + + :param publication_month: The publication_month of this Identifier. # noqa: E501 + :type: int + """ + + self._publication_month = publication_month + + @property + def publication_day(self): + """Gets the publication_day of this Identifier. # noqa: E501 + + + :return: The publication_day of this Identifier. # noqa: E501 + :rtype: int + """ + return self._publication_day + + @publication_day.setter + def publication_day(self, publication_day): + """Sets the publication_day of this Identifier. + + + :param publication_day: The publication_day of this Identifier. # noqa: E501 + :type: int + """ + + self._publication_day = publication_day + + @property + def visibility(self): + """Gets the visibility of this Identifier. # noqa: E501 + + + :return: The visibility of this Identifier. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this Identifier. + + + :param visibility: The visibility of this Identifier. # noqa: E501 + :type: str + """ + allowed_values = ["VisibilityType.EVERYONE", "VisibilityType.SELF"] # noqa: E501 + if visibility not in allowed_values: + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @property + def database(self): + """Gets the database of this Identifier. # noqa: E501 + + + :return: The database of this Identifier. # noqa: E501 + :rtype: Database + """ + return self._database + + @database.setter + def database(self, database): + """Sets the database of this Identifier. + + + :param database: The database of this Identifier. # noqa: E501 + :type: Database + """ + + self._database = database + + @property + def related(self): + """Gets the related of this Identifier. # noqa: E501 + + + :return: The related of this Identifier. # noqa: E501 + :rtype: list[RelatedIdentifier] + """ + return self._related + + @related.setter + def related(self, related): + """Sets the related of this Identifier. + + + :param related: The related of this Identifier. # noqa: E501 + :type: list[RelatedIdentifier] + """ + + self._related = related + + @property + def doi(self): + """Gets the doi of this Identifier. # noqa: E501 + + + :return: The doi of this Identifier. # noqa: E501 + :rtype: str + """ + return self._doi + + @doi.setter + def doi(self, doi): + """Sets the doi of this Identifier. + + + :param doi: The doi of this Identifier. # noqa: E501 + :type: str + """ + + self._doi = doi + + @property + def creators(self): + """Gets the creators of this Identifier. # noqa: E501 + + + :return: The creators of this Identifier. # noqa: E501 + :rtype: list[Creator] + """ + return self._creators + + @creators.setter + def creators(self, creators): + """Sets the creators of this Identifier. + + + :param creators: The creators of this Identifier. # noqa: E501 + :type: list[Creator] + """ + + self._creators = creators + + @property + def created(self): + """Gets the created of this Identifier. # noqa: E501 + + + :return: The created of this Identifier. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Identifier. + + + :param created: The created of this Identifier. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this Identifier. # noqa: E501 + + + :return: The last_modified of this Identifier. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this Identifier. + + + :param last_modified: The last_modified of this Identifier. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Identifier, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Identifier): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/identifier_brief_dto.py b/swagger/api/api_container/models/identifier_brief_dto.py index da1c53943d90d3f45c4c8d0f0980a0e198465a65..c0dcdfe9c5ffe24efe93e4fac28091cc323b9019 100644 --- a/swagger/api/api_container/models/identifier_brief_dto.py +++ b/swagger/api/api_container/models/identifier_brief_dto.py @@ -34,8 +34,6 @@ class IdentifierBriefDto(object): 'doi': 'str', 'publisher': 'str', 'creators': 'list[CreatorBriefDto]', - 'created': 'datetime', - 'last_modified': 'datetime', 'container_id': 'int', 'database_id': 'int', 'query_id': 'int', @@ -49,15 +47,13 @@ class IdentifierBriefDto(object): 'doi': 'doi', 'publisher': 'publisher', 'creators': 'creators', - 'created': 'created', - 'last_modified': 'lastModified', 'container_id': 'container id', 'database_id': 'database id', 'query_id': 'query id', 'publication_year': 'publication_year' } - def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, created=None, last_modified=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 + def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 """IdentifierBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._title = None @@ -65,8 +61,6 @@ class IdentifierBriefDto(object): self._doi = None self._publisher = None self._creators = None - self._created = None - self._last_modified = None self._container_id = None self._database_id = None self._query_id = None @@ -80,10 +74,6 @@ class IdentifierBriefDto(object): if publisher is not None: self.publisher = publisher self.creators = creators - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified self.container_id = container_id self.database_id = database_id if query_id is not None: @@ -230,48 +220,6 @@ class IdentifierBriefDto(object): self._creators = creators - @property - def created(self): - """Gets the created of this IdentifierBriefDto. # noqa: E501 - - - :return: The created of this IdentifierBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierBriefDto. - - - :param created: The created of this IdentifierBriefDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierBriefDto. # noqa: E501 - - - :return: The last_modified of this IdentifierBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierBriefDto. - - - :param last_modified: The last_modified of this IdentifierBriefDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - @property def container_id(self): """Gets the container_id of this IdentifierBriefDto. # noqa: E501 diff --git a/swagger/api/api_container/models/identifier_dto.py b/swagger/api/api_container/models/identifier_dto.py index b251e491219933d52485852940cff37030f53fda..0c9814454863d0a828c051cecaf8c43edec017dd 100644 --- a/swagger/api/api_container/models/identifier_dto.py +++ b/swagger/api/api_container/models/identifier_dto.py @@ -309,7 +309,7 @@ class IdentifierDto(object): """ if visibility is None: raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_container/models/image_brief_dto.py b/swagger/api/api_container/models/image_brief_dto.py index 52feb21c03569846ff49b910dd793f81205c6cae..91a8205bb820b2d546986bc6c96f76e2f18255dd 100644 --- a/swagger/api/api_container/models/image_brief_dto.py +++ b/swagger/api/api_container/models/image_brief_dto.py @@ -29,23 +29,27 @@ class ImageBriefDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str' } attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag' } - def __init__(self, id=None, repository=None, tag=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 """ImageBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag @@ -72,6 +76,29 @@ class ImageBriefDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageBriefDto. # noqa: E501 + + + :return: The registry of this ImageBriefDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageBriefDto. + + + :param registry: The registry of this ImageBriefDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageBriefDto. # noqa: E501 diff --git a/swagger/api/api_container/models/image_change_dto.py b/swagger/api/api_container/models/image_change_dto.py index 8b8dc9f699dd07a7803c9a5709d0811a1bd6cf46..d418e30265634fb9b0dec71aa3d815a9d390a517 100644 --- a/swagger/api/api_container/models/image_change_dto.py +++ b/swagger/api/api_container/models/image_change_dto.py @@ -28,6 +28,7 @@ class ImageChangeDto(object): and the value is json key in definition. """ swagger_types = { + 'registry': 'str', 'default_port': 'int', 'environment': 'list[ImageEnvItemDto]', 'dialect': 'str', @@ -36,6 +37,7 @@ class ImageChangeDto(object): } attribute_map = { + 'registry': 'registry', 'default_port': 'defaultPort', 'environment': 'environment', 'dialect': 'dialect', @@ -43,14 +45,16 @@ class ImageChangeDto(object): 'jdbc_method': 'jdbc_method' } - def __init__(self, default_port=None, environment=None, dialect=None, driver_class=None, jdbc_method=None): # noqa: E501 + def __init__(self, registry=None, default_port=None, environment=None, dialect=None, driver_class=None, jdbc_method=None): # noqa: E501 """ImageChangeDto - a model defined in Swagger""" # noqa: E501 + self._registry = None self._default_port = None self._environment = None self._dialect = None self._driver_class = None self._jdbc_method = None self.discriminator = None + self.registry = registry if default_port is not None: self.default_port = default_port if environment is not None: @@ -59,6 +63,29 @@ class ImageChangeDto(object): self.driver_class = driver_class self.jdbc_method = jdbc_method + @property + def registry(self): + """Gets the registry of this ImageChangeDto. # noqa: E501 + + + :return: The registry of this ImageChangeDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageChangeDto. + + + :param registry: The registry of this ImageChangeDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def default_port(self): """Gets the default_port of this ImageChangeDto. # noqa: E501 diff --git a/swagger/api/api_container/models/image_create_dto.py b/swagger/api/api_container/models/image_create_dto.py index 9645abfec31cbff46f696560b98efe590b842186..0488e10128fc1bc46fd2a48455254279c3099eb3 100644 --- a/swagger/api/api_container/models/image_create_dto.py +++ b/swagger/api/api_container/models/image_create_dto.py @@ -28,6 +28,7 @@ class ImageCreateDto(object): and the value is json key in definition. """ swagger_types = { + 'registry': 'str', 'repository': 'str', 'tag': 'str', 'dialect': 'str', @@ -38,6 +39,7 @@ class ImageCreateDto(object): } attribute_map = { + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag', 'dialect': 'dialect', @@ -47,8 +49,9 @@ class ImageCreateDto(object): 'default_port': 'default_port' } - def __init__(self, repository=None, tag=None, dialect=None, environment=None, driver_class=None, jdbc_method=None, default_port=None): # noqa: E501 + def __init__(self, registry=None, repository=None, tag=None, dialect=None, environment=None, driver_class=None, jdbc_method=None, default_port=None): # noqa: E501 """ImageCreateDto - a model defined in Swagger""" # noqa: E501 + self._registry = None self._repository = None self._tag = None self._dialect = None @@ -57,6 +60,7 @@ class ImageCreateDto(object): self._jdbc_method = None self._default_port = None self.discriminator = None + self.registry = registry self.repository = repository self.tag = tag self.dialect = dialect @@ -66,6 +70,29 @@ class ImageCreateDto(object): self.jdbc_method = jdbc_method self.default_port = default_port + @property + def registry(self): + """Gets the registry of this ImageCreateDto. # noqa: E501 + + + :return: The registry of this ImageCreateDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageCreateDto. + + + :param registry: The registry of this ImageCreateDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageCreateDto. # noqa: E501 diff --git a/swagger/api/api_container/models/image_dto.py b/swagger/api/api_container/models/image_dto.py index 01e10e3edbc64d695a1b0534b30379cf8757f81c..c3beb2d423a36ae8bf33564be457cdfdf1ae6b4d 100644 --- a/swagger/api/api_container/models/image_dto.py +++ b/swagger/api/api_container/models/image_dto.py @@ -29,6 +29,7 @@ class ImageDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str', 'dialect': 'str', @@ -43,6 +44,7 @@ class ImageDto(object): attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag', 'dialect': 'dialect', @@ -55,9 +57,10 @@ class ImageDto(object): 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self._dialect = None @@ -70,6 +73,7 @@ class ImageDto(object): self._default_port = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag self.dialect = dialect @@ -108,6 +112,29 @@ class ImageDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageDto. # noqa: E501 + + + :return: The registry of this ImageDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageDto. + + + :param registry: The registry of this ImageDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_container/models/license.py b/swagger/api/api_container/models/license.py new file mode 100644 index 0000000000000000000000000000000000000000..79b289884022e5f45ba22b238389a9b83b549049 --- /dev/null +++ b/swagger/api/api_container/models/license.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class License(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'identifier': 'str', + 'uri': 'str' + } + + attribute_map = { + 'identifier': 'identifier', + 'uri': 'uri' + } + + def __init__(self, identifier=None, uri=None): # noqa: E501 + """License - a model defined in Swagger""" # noqa: E501 + self._identifier = None + self._uri = None + self.discriminator = None + if identifier is not None: + self.identifier = identifier + if uri is not None: + self.uri = uri + + @property + def identifier(self): + """Gets the identifier of this License. # noqa: E501 + + + :return: The identifier of this License. # noqa: E501 + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """Sets the identifier of this License. + + + :param identifier: The identifier of this License. # noqa: E501 + :type: str + """ + + self._identifier = identifier + + @property + def uri(self): + """Gets the uri of this License. # noqa: E501 + + + :return: The uri of this License. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this License. + + + :param uri: The uri of this License. # noqa: E501 + :type: str + """ + + self._uri = uri + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(License, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, License): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/related_identifier.py b/swagger/api/api_container/models/related_identifier.py new file mode 100644 index 0000000000000000000000000000000000000000..f14313fbef8379dc9f6a013fb1de13fe299f2854 --- /dev/null +++ b/swagger/api/api_container/models/related_identifier.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class RelatedIdentifier(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'iid': 'int', + 'value': 'str', + 'type': 'str', + 'relation': 'str', + 'creator': 'User', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'iid': 'iid', + 'value': 'value', + 'type': 'type', + 'relation': 'relation', + 'creator': 'creator', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, iid=None, value=None, type=None, relation=None, creator=None, created=None, last_modified=None): # noqa: E501 + """RelatedIdentifier - a model defined in Swagger""" # noqa: E501 + self._id = None + self._iid = None + self._value = None + self._type = None + self._relation = None + self._creator = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if iid is not None: + self.iid = iid + if value is not None: + self.value = value + if type is not None: + self.type = type + if relation is not None: + self.relation = relation + if creator is not None: + self.creator = creator + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this RelatedIdentifier. # noqa: E501 + + + :return: The id of this RelatedIdentifier. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RelatedIdentifier. + + + :param id: The id of this RelatedIdentifier. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def iid(self): + """Gets the iid of this RelatedIdentifier. # noqa: E501 + + + :return: The iid of this RelatedIdentifier. # noqa: E501 + :rtype: int + """ + return self._iid + + @iid.setter + def iid(self, iid): + """Sets the iid of this RelatedIdentifier. + + + :param iid: The iid of this RelatedIdentifier. # noqa: E501 + :type: int + """ + + self._iid = iid + + @property + def value(self): + """Gets the value of this RelatedIdentifier. # noqa: E501 + + + :return: The value of this RelatedIdentifier. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this RelatedIdentifier. + + + :param value: The value of this RelatedIdentifier. # noqa: E501 + :type: str + """ + + self._value = value + + @property + def type(self): + """Gets the type of this RelatedIdentifier. # noqa: E501 + + + :return: The type of this RelatedIdentifier. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this RelatedIdentifier. + + + :param type: The type of this RelatedIdentifier. # noqa: E501 + :type: str + """ + allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def relation(self): + """Gets the relation of this RelatedIdentifier. # noqa: E501 + + + :return: The relation of this RelatedIdentifier. # noqa: E501 + :rtype: str + """ + return self._relation + + @relation.setter + def relation(self, relation): + """Sets the relation of this RelatedIdentifier. + + + :param relation: The relation of this RelatedIdentifier. # noqa: E501 + :type: str + """ + allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 + if relation not in allowed_values: + raise ValueError( + "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 + .format(relation, allowed_values) + ) + + self._relation = relation + + @property + def creator(self): + """Gets the creator of this RelatedIdentifier. # noqa: E501 + + + :return: The creator of this RelatedIdentifier. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this RelatedIdentifier. + + + :param creator: The creator of this RelatedIdentifier. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def created(self): + """Gets the created of this RelatedIdentifier. # noqa: E501 + + + :return: The created of this RelatedIdentifier. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this RelatedIdentifier. + + + :param created: The created of this RelatedIdentifier. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this RelatedIdentifier. # noqa: E501 + + + :return: The last_modified of this RelatedIdentifier. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this RelatedIdentifier. + + + :param last_modified: The last_modified of this RelatedIdentifier. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RelatedIdentifier, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RelatedIdentifier): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/role.py b/swagger/api/api_container/models/role.py new file mode 100644 index 0000000000000000000000000000000000000000..cdecfc5bd0cc97a51aaf2716dd2f5ba236c3da4c --- /dev/null +++ b/swagger/api/api_container/models/role.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Role(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'realm_id': 'str', + 'users': 'list[User]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'realm_id': 'realmId', + 'users': 'users' + } + + def __init__(self, id=None, name=None, realm_id=None, users=None): # noqa: E501 + """Role - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._realm_id = None + self._users = None + self.discriminator = None + if id is not None: + self.id = id + if name is not None: + self.name = name + if realm_id is not None: + self.realm_id = realm_id + if users is not None: + self.users = users + + @property + def id(self): + """Gets the id of this Role. # noqa: E501 + + + :return: The id of this Role. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Role. + + + :param id: The id of this Role. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Role. # noqa: E501 + + + :return: The name of this Role. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Role. + + + :param name: The name of this Role. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def realm_id(self): + """Gets the realm_id of this Role. # noqa: E501 + + + :return: The realm_id of this Role. # noqa: E501 + :rtype: str + """ + return self._realm_id + + @realm_id.setter + def realm_id(self, realm_id): + """Sets the realm_id of this Role. + + + :param realm_id: The realm_id of this Role. # noqa: E501 + :type: str + """ + + self._realm_id = realm_id + + @property + def users(self): + """Gets the users of this Role. # noqa: E501 + + + :return: The users of this Role. # noqa: E501 + :rtype: list[User] + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this Role. + + + :param users: The users of this Role. # noqa: E501 + :type: list[User] + """ + + self._users = users + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Role, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Role): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/table.py b/swagger/api/api_container/models/table.py new file mode 100644 index 0000000000000000000000000000000000000000..6a60176585bd6229ad8bdb321e5c863a9d4cb393 --- /dev/null +++ b/swagger/api/api_container/models/table.py @@ -0,0 +1,448 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Table(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'tdbid': 'int', + 'creator': 'User', + 'owner': 'User', + 'name': 'str', + 'internal_name': 'str', + 'queue_name': 'str', + 'routing_key': 'str', + 'description': 'str', + 'database': 'Database', + 'columns': 'list[TableColumn]', + 'constraints': 'Constraints', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'tdbid': 'tdbid', + 'creator': 'creator', + 'owner': 'owner', + 'name': 'name', + 'internal_name': 'internalName', + 'queue_name': 'queueName', + 'routing_key': 'routingKey', + 'description': 'description', + 'database': 'database', + 'columns': 'columns', + 'constraints': 'constraints', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, tdbid=None, creator=None, owner=None, name=None, internal_name=None, queue_name=None, routing_key=None, description=None, database=None, columns=None, constraints=None, created=None, last_modified=None): # noqa: E501 + """Table - a model defined in Swagger""" # noqa: E501 + self._id = None + self._tdbid = None + self._creator = None + self._owner = None + self._name = None + self._internal_name = None + self._queue_name = None + self._routing_key = None + self._description = None + self._database = None + self._columns = None + self._constraints = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if tdbid is not None: + self.tdbid = tdbid + if creator is not None: + self.creator = creator + if owner is not None: + self.owner = owner + if name is not None: + self.name = name + if internal_name is not None: + self.internal_name = internal_name + if queue_name is not None: + self.queue_name = queue_name + if routing_key is not None: + self.routing_key = routing_key + if description is not None: + self.description = description + if database is not None: + self.database = database + if columns is not None: + self.columns = columns + if constraints is not None: + self.constraints = constraints + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this Table. # noqa: E501 + + + :return: The id of this Table. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Table. + + + :param id: The id of this Table. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def tdbid(self): + """Gets the tdbid of this Table. # noqa: E501 + + + :return: The tdbid of this Table. # noqa: E501 + :rtype: int + """ + return self._tdbid + + @tdbid.setter + def tdbid(self, tdbid): + """Sets the tdbid of this Table. + + + :param tdbid: The tdbid of this Table. # noqa: E501 + :type: int + """ + + self._tdbid = tdbid + + @property + def creator(self): + """Gets the creator of this Table. # noqa: E501 + + + :return: The creator of this Table. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this Table. + + + :param creator: The creator of this Table. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def owner(self): + """Gets the owner of this Table. # noqa: E501 + + + :return: The owner of this Table. # noqa: E501 + :rtype: User + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this Table. + + + :param owner: The owner of this Table. # noqa: E501 + :type: User + """ + + self._owner = owner + + @property + def name(self): + """Gets the name of this Table. # noqa: E501 + + + :return: The name of this Table. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Table. + + + :param name: The name of this Table. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def internal_name(self): + """Gets the internal_name of this Table. # noqa: E501 + + + :return: The internal_name of this Table. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this Table. + + + :param internal_name: The internal_name of this Table. # noqa: E501 + :type: str + """ + + self._internal_name = internal_name + + @property + def queue_name(self): + """Gets the queue_name of this Table. # noqa: E501 + + + :return: The queue_name of this Table. # noqa: E501 + :rtype: str + """ + return self._queue_name + + @queue_name.setter + def queue_name(self, queue_name): + """Sets the queue_name of this Table. + + + :param queue_name: The queue_name of this Table. # noqa: E501 + :type: str + """ + + self._queue_name = queue_name + + @property + def routing_key(self): + """Gets the routing_key of this Table. # noqa: E501 + + + :return: The routing_key of this Table. # noqa: E501 + :rtype: str + """ + return self._routing_key + + @routing_key.setter + def routing_key(self, routing_key): + """Sets the routing_key of this Table. + + + :param routing_key: The routing_key of this Table. # noqa: E501 + :type: str + """ + + self._routing_key = routing_key + + @property + def description(self): + """Gets the description of this Table. # noqa: E501 + + + :return: The description of this Table. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Table. + + + :param description: The description of this Table. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def database(self): + """Gets the database of this Table. # noqa: E501 + + + :return: The database of this Table. # noqa: E501 + :rtype: Database + """ + return self._database + + @database.setter + def database(self, database): + """Sets the database of this Table. + + + :param database: The database of this Table. # noqa: E501 + :type: Database + """ + + self._database = database + + @property + def columns(self): + """Gets the columns of this Table. # noqa: E501 + + + :return: The columns of this Table. # noqa: E501 + :rtype: list[TableColumn] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this Table. + + + :param columns: The columns of this Table. # noqa: E501 + :type: list[TableColumn] + """ + + self._columns = columns + + @property + def constraints(self): + """Gets the constraints of this Table. # noqa: E501 + + + :return: The constraints of this Table. # noqa: E501 + :rtype: Constraints + """ + return self._constraints + + @constraints.setter + def constraints(self, constraints): + """Sets the constraints of this Table. + + + :param constraints: The constraints of this Table. # noqa: E501 + :type: Constraints + """ + + self._constraints = constraints + + @property + def created(self): + """Gets the created of this Table. # noqa: E501 + + + :return: The created of this Table. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Table. + + + :param created: The created of this Table. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this Table. # noqa: E501 + + + :return: The last_modified of this Table. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this Table. + + + :param last_modified: The last_modified of this Table. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Table, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Table): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/table_brief_dto.py b/swagger/api/api_container/models/table_brief_dto.py index d7d1e9b771393caa780c5afbfa6aecd70e471993..34b45ce00f789c9103d7d0d5e7b1f1e3de92f18f 100644 --- a/swagger/api/api_container/models/table_brief_dto.py +++ b/swagger/api/api_container/models/table_brief_dto.py @@ -31,7 +31,7 @@ class TableBriefDto(object): 'id': 'int', 'name': 'str', 'description': 'str', - 'creator': 'UserBriefDto', + 'owner': 'UserBriefDto', 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,24 +40,24 @@ class TableBriefDto(object): 'id': 'id', 'name': 'name', 'description': 'description', - 'creator': 'creator', + 'owner': 'owner', 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, columns=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 """TableBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._description = None - self._creator = None + self._owner = None self._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description - self.creator = creator + self.owner = owner self.columns = columns self.internal_name = internal_name @@ -131,27 +131,27 @@ class TableBriefDto(object): self._description = description @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 + def owner(self): + """Gets the owner of this TableBriefDto. # noqa: E501 - :return: The creator of this TableBriefDto. # noqa: E501 + :return: The owner of this TableBriefDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._owner - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. + @owner.setter + def owner(self, owner): + """Sets the owner of this TableBriefDto. - :param creator: The creator of this TableBriefDto. # noqa: E501 + :param owner: The owner of this TableBriefDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - self._creator = creator + self._owner = owner @property def columns(self): diff --git a/swagger/api/api_container/models/table_column.py b/swagger/api/api_container/models/table_column.py new file mode 100644 index 0000000000000000000000000000000000000000..bfed7ffd841afc474d035697bbbc538d8988a5a3 --- /dev/null +++ b/swagger/api/api_container/models/table_column.py @@ -0,0 +1,688 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class TableColumn(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'tid': 'int', + 'cdbid': 'int', + 'dfid': 'int', + 'date_format': 'ContainerImageDate', + 'table': 'Table', + 'view': 'View', + 'creator': 'User', + 'name': 'str', + 'auto_generated': 'bool', + 'internal_name': 'str', + 'is_primary_key': 'bool', + 'index_length': 'int', + 'alias': 'str', + 'column_type': 'str', + 'length': 'int', + 'is_null_allowed': 'bool', + 'enum_values': 'list[str]', + 'ordinal_position': 'int', + 'created': 'datetime', + 'concept': 'TableColumnConcept', + 'unit': 'TableColumnUnit', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'tid': 'tid', + 'cdbid': 'cdbid', + 'dfid': 'dfid', + 'date_format': 'dateFormat', + 'table': 'table', + 'view': 'view', + 'creator': 'creator', + 'name': 'name', + 'auto_generated': 'autoGenerated', + 'internal_name': 'internalName', + 'is_primary_key': 'isPrimaryKey', + 'index_length': 'indexLength', + 'alias': 'alias', + 'column_type': 'columnType', + 'length': 'length', + 'is_null_allowed': 'isNullAllowed', + 'enum_values': 'enumValues', + 'ordinal_position': 'ordinalPosition', + 'created': 'created', + 'concept': 'concept', + 'unit': 'unit', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, tid=None, cdbid=None, dfid=None, date_format=None, table=None, view=None, creator=None, name=None, auto_generated=None, internal_name=None, is_primary_key=None, index_length=None, alias=None, column_type=None, length=None, is_null_allowed=None, enum_values=None, ordinal_position=None, created=None, concept=None, unit=None, last_modified=None): # noqa: E501 + """TableColumn - a model defined in Swagger""" # noqa: E501 + self._id = None + self._tid = None + self._cdbid = None + self._dfid = None + self._date_format = None + self._table = None + self._view = None + self._creator = None + self._name = None + self._auto_generated = None + self._internal_name = None + self._is_primary_key = None + self._index_length = None + self._alias = None + self._column_type = None + self._length = None + self._is_null_allowed = None + self._enum_values = None + self._ordinal_position = None + self._created = None + self._concept = None + self._unit = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if tid is not None: + self.tid = tid + if cdbid is not None: + self.cdbid = cdbid + if dfid is not None: + self.dfid = dfid + if date_format is not None: + self.date_format = date_format + if table is not None: + self.table = table + if view is not None: + self.view = view + if creator is not None: + self.creator = creator + if name is not None: + self.name = name + if auto_generated is not None: + self.auto_generated = auto_generated + if internal_name is not None: + self.internal_name = internal_name + if is_primary_key is not None: + self.is_primary_key = is_primary_key + if index_length is not None: + self.index_length = index_length + if alias is not None: + self.alias = alias + if column_type is not None: + self.column_type = column_type + if length is not None: + self.length = length + if is_null_allowed is not None: + self.is_null_allowed = is_null_allowed + if enum_values is not None: + self.enum_values = enum_values + if ordinal_position is not None: + self.ordinal_position = ordinal_position + if created is not None: + self.created = created + if concept is not None: + self.concept = concept + if unit is not None: + self.unit = unit + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this TableColumn. # noqa: E501 + + + :return: The id of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TableColumn. + + + :param id: The id of this TableColumn. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def tid(self): + """Gets the tid of this TableColumn. # noqa: E501 + + + :return: The tid of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._tid + + @tid.setter + def tid(self, tid): + """Sets the tid of this TableColumn. + + + :param tid: The tid of this TableColumn. # noqa: E501 + :type: int + """ + + self._tid = tid + + @property + def cdbid(self): + """Gets the cdbid of this TableColumn. # noqa: E501 + + + :return: The cdbid of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._cdbid + + @cdbid.setter + def cdbid(self, cdbid): + """Sets the cdbid of this TableColumn. + + + :param cdbid: The cdbid of this TableColumn. # noqa: E501 + :type: int + """ + + self._cdbid = cdbid + + @property + def dfid(self): + """Gets the dfid of this TableColumn. # noqa: E501 + + + :return: The dfid of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._dfid + + @dfid.setter + def dfid(self, dfid): + """Sets the dfid of this TableColumn. + + + :param dfid: The dfid of this TableColumn. # noqa: E501 + :type: int + """ + + self._dfid = dfid + + @property + def date_format(self): + """Gets the date_format of this TableColumn. # noqa: E501 + + + :return: The date_format of this TableColumn. # noqa: E501 + :rtype: ContainerImageDate + """ + return self._date_format + + @date_format.setter + def date_format(self, date_format): + """Sets the date_format of this TableColumn. + + + :param date_format: The date_format of this TableColumn. # noqa: E501 + :type: ContainerImageDate + """ + + self._date_format = date_format + + @property + def table(self): + """Gets the table of this TableColumn. # noqa: E501 + + + :return: The table of this TableColumn. # noqa: E501 + :rtype: Table + """ + return self._table + + @table.setter + def table(self, table): + """Sets the table of this TableColumn. + + + :param table: The table of this TableColumn. # noqa: E501 + :type: Table + """ + + self._table = table + + @property + def view(self): + """Gets the view of this TableColumn. # noqa: E501 + + + :return: The view of this TableColumn. # noqa: E501 + :rtype: View + """ + return self._view + + @view.setter + def view(self, view): + """Sets the view of this TableColumn. + + + :param view: The view of this TableColumn. # noqa: E501 + :type: View + """ + + self._view = view + + @property + def creator(self): + """Gets the creator of this TableColumn. # noqa: E501 + + + :return: The creator of this TableColumn. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this TableColumn. + + + :param creator: The creator of this TableColumn. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def name(self): + """Gets the name of this TableColumn. # noqa: E501 + + + :return: The name of this TableColumn. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TableColumn. + + + :param name: The name of this TableColumn. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def auto_generated(self): + """Gets the auto_generated of this TableColumn. # noqa: E501 + + + :return: The auto_generated of this TableColumn. # noqa: E501 + :rtype: bool + """ + return self._auto_generated + + @auto_generated.setter + def auto_generated(self, auto_generated): + """Sets the auto_generated of this TableColumn. + + + :param auto_generated: The auto_generated of this TableColumn. # noqa: E501 + :type: bool + """ + + self._auto_generated = auto_generated + + @property + def internal_name(self): + """Gets the internal_name of this TableColumn. # noqa: E501 + + + :return: The internal_name of this TableColumn. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this TableColumn. + + + :param internal_name: The internal_name of this TableColumn. # noqa: E501 + :type: str + """ + + self._internal_name = internal_name + + @property + def is_primary_key(self): + """Gets the is_primary_key of this TableColumn. # noqa: E501 + + + :return: The is_primary_key of this TableColumn. # noqa: E501 + :rtype: bool + """ + return self._is_primary_key + + @is_primary_key.setter + def is_primary_key(self, is_primary_key): + """Sets the is_primary_key of this TableColumn. + + + :param is_primary_key: The is_primary_key of this TableColumn. # noqa: E501 + :type: bool + """ + + self._is_primary_key = is_primary_key + + @property + def index_length(self): + """Gets the index_length of this TableColumn. # noqa: E501 + + + :return: The index_length of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._index_length + + @index_length.setter + def index_length(self, index_length): + """Sets the index_length of this TableColumn. + + + :param index_length: The index_length of this TableColumn. # noqa: E501 + :type: int + """ + + self._index_length = index_length + + @property + def alias(self): + """Gets the alias of this TableColumn. # noqa: E501 + + + :return: The alias of this TableColumn. # noqa: E501 + :rtype: str + """ + return self._alias + + @alias.setter + def alias(self, alias): + """Sets the alias of this TableColumn. + + + :param alias: The alias of this TableColumn. # noqa: E501 + :type: str + """ + + self._alias = alias + + @property + def column_type(self): + """Gets the column_type of this TableColumn. # noqa: E501 + + + :return: The column_type of this TableColumn. # noqa: E501 + :rtype: str + """ + return self._column_type + + @column_type.setter + def column_type(self, column_type): + """Sets the column_type of this TableColumn. + + + :param column_type: The column_type of this TableColumn. # noqa: E501 + :type: str + """ + allowed_values = ["TableColumnType.ENUM", "TableColumnType.NUMBER", "TableColumnType.DECIMAL", "TableColumnType.STRING", "TableColumnType.TEXT", "TableColumnType.BOOLEAN", "TableColumnType.DATE", "TableColumnType.TIMESTAMP", "TableColumnType.BLOB"] # noqa: E501 + if column_type not in allowed_values: + raise ValueError( + "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 + .format(column_type, allowed_values) + ) + + self._column_type = column_type + + @property + def length(self): + """Gets the length of this TableColumn. # noqa: E501 + + + :return: The length of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """Sets the length of this TableColumn. + + + :param length: The length of this TableColumn. # noqa: E501 + :type: int + """ + + self._length = length + + @property + def is_null_allowed(self): + """Gets the is_null_allowed of this TableColumn. # noqa: E501 + + + :return: The is_null_allowed of this TableColumn. # noqa: E501 + :rtype: bool + """ + return self._is_null_allowed + + @is_null_allowed.setter + def is_null_allowed(self, is_null_allowed): + """Sets the is_null_allowed of this TableColumn. + + + :param is_null_allowed: The is_null_allowed of this TableColumn. # noqa: E501 + :type: bool + """ + + self._is_null_allowed = is_null_allowed + + @property + def enum_values(self): + """Gets the enum_values of this TableColumn. # noqa: E501 + + + :return: The enum_values of this TableColumn. # noqa: E501 + :rtype: list[str] + """ + return self._enum_values + + @enum_values.setter + def enum_values(self, enum_values): + """Sets the enum_values of this TableColumn. + + + :param enum_values: The enum_values of this TableColumn. # noqa: E501 + :type: list[str] + """ + + self._enum_values = enum_values + + @property + def ordinal_position(self): + """Gets the ordinal_position of this TableColumn. # noqa: E501 + + + :return: The ordinal_position of this TableColumn. # noqa: E501 + :rtype: int + """ + return self._ordinal_position + + @ordinal_position.setter + def ordinal_position(self, ordinal_position): + """Sets the ordinal_position of this TableColumn. + + + :param ordinal_position: The ordinal_position of this TableColumn. # noqa: E501 + :type: int + """ + + self._ordinal_position = ordinal_position + + @property + def created(self): + """Gets the created of this TableColumn. # noqa: E501 + + + :return: The created of this TableColumn. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TableColumn. + + + :param created: The created of this TableColumn. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def concept(self): + """Gets the concept of this TableColumn. # noqa: E501 + + + :return: The concept of this TableColumn. # noqa: E501 + :rtype: TableColumnConcept + """ + return self._concept + + @concept.setter + def concept(self, concept): + """Sets the concept of this TableColumn. + + + :param concept: The concept of this TableColumn. # noqa: E501 + :type: TableColumnConcept + """ + + self._concept = concept + + @property + def unit(self): + """Gets the unit of this TableColumn. # noqa: E501 + + + :return: The unit of this TableColumn. # noqa: E501 + :rtype: TableColumnUnit + """ + return self._unit + + @unit.setter + def unit(self, unit): + """Sets the unit of this TableColumn. + + + :param unit: The unit of this TableColumn. # noqa: E501 + :type: TableColumnUnit + """ + + self._unit = unit + + @property + def last_modified(self): + """Gets the last_modified of this TableColumn. # noqa: E501 + + + :return: The last_modified of this TableColumn. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this TableColumn. + + + :param last_modified: The last_modified of this TableColumn. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TableColumn, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TableColumn): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/table_column_concept.py b/swagger/api/api_container/models/table_column_concept.py new file mode 100644 index 0000000000000000000000000000000000000000..6ebfb1d1260461da36990e764588a85fefef1fc5 --- /dev/null +++ b/swagger/api/api_container/models/table_column_concept.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class TableColumnConcept(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'name': 'str', + 'description': 'str', + 'created': 'datetime', + 'columns': 'list[TableColumn]' + } + + attribute_map = { + 'uri': 'uri', + 'name': 'name', + 'description': 'description', + 'created': 'created', + 'columns': 'columns' + } + + def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 + """TableColumnConcept - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._name = None + self._description = None + self._created = None + self._columns = None + self.discriminator = None + if uri is not None: + self.uri = uri + if name is not None: + self.name = name + if description is not None: + self.description = description + if created is not None: + self.created = created + if columns is not None: + self.columns = columns + + @property + def uri(self): + """Gets the uri of this TableColumnConcept. # noqa: E501 + + + :return: The uri of this TableColumnConcept. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this TableColumnConcept. + + + :param uri: The uri of this TableColumnConcept. # noqa: E501 + :type: str + """ + + self._uri = uri + + @property + def name(self): + """Gets the name of this TableColumnConcept. # noqa: E501 + + + :return: The name of this TableColumnConcept. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TableColumnConcept. + + + :param name: The name of this TableColumnConcept. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this TableColumnConcept. # noqa: E501 + + + :return: The description of this TableColumnConcept. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this TableColumnConcept. + + + :param description: The description of this TableColumnConcept. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created(self): + """Gets the created of this TableColumnConcept. # noqa: E501 + + + :return: The created of this TableColumnConcept. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TableColumnConcept. + + + :param created: The created of this TableColumnConcept. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def columns(self): + """Gets the columns of this TableColumnConcept. # noqa: E501 + + + :return: The columns of this TableColumnConcept. # noqa: E501 + :rtype: list[TableColumn] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableColumnConcept. + + + :param columns: The columns of this TableColumnConcept. # noqa: E501 + :type: list[TableColumn] + """ + + self._columns = columns + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TableColumnConcept, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TableColumnConcept): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/table_column_unit.py b/swagger/api/api_container/models/table_column_unit.py new file mode 100644 index 0000000000000000000000000000000000000000..eca05a2d47f4fa87534bd6fe0df73fe5a2159895 --- /dev/null +++ b/swagger/api/api_container/models/table_column_unit.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class TableColumnUnit(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'name': 'str', + 'description': 'str', + 'created': 'datetime', + 'columns': 'list[TableColumn]' + } + + attribute_map = { + 'uri': 'uri', + 'name': 'name', + 'description': 'description', + 'created': 'created', + 'columns': 'columns' + } + + def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 + """TableColumnUnit - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._name = None + self._description = None + self._created = None + self._columns = None + self.discriminator = None + if uri is not None: + self.uri = uri + if name is not None: + self.name = name + if description is not None: + self.description = description + if created is not None: + self.created = created + if columns is not None: + self.columns = columns + + @property + def uri(self): + """Gets the uri of this TableColumnUnit. # noqa: E501 + + + :return: The uri of this TableColumnUnit. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this TableColumnUnit. + + + :param uri: The uri of this TableColumnUnit. # noqa: E501 + :type: str + """ + + self._uri = uri + + @property + def name(self): + """Gets the name of this TableColumnUnit. # noqa: E501 + + + :return: The name of this TableColumnUnit. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TableColumnUnit. + + + :param name: The name of this TableColumnUnit. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this TableColumnUnit. # noqa: E501 + + + :return: The description of this TableColumnUnit. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this TableColumnUnit. + + + :param description: The description of this TableColumnUnit. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created(self): + """Gets the created of this TableColumnUnit. # noqa: E501 + + + :return: The created of this TableColumnUnit. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this TableColumnUnit. + + + :param created: The created of this TableColumnUnit. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def columns(self): + """Gets the columns of this TableColumnUnit. # noqa: E501 + + + :return: The columns of this TableColumnUnit. # noqa: E501 + :rtype: list[TableColumn] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableColumnUnit. + + + :param columns: The columns of this TableColumnUnit. # noqa: E501 + :type: list[TableColumn] + """ + + self._columns = columns + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TableColumnUnit, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TableColumnUnit): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/unique.py b/swagger/api/api_container/models/unique.py new file mode 100644 index 0000000000000000000000000000000000000000..495f2582c6f990ccce248c2b7e262cdefa476e73 --- /dev/null +++ b/swagger/api/api_container/models/unique.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class Unique(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uid': 'int', + 'tid': 'int', + 'tdbid': 'int', + 'table': 'Table', + 'columns': 'list[TableColumn]' + } + + attribute_map = { + 'uid': 'uid', + 'tid': 'tid', + 'tdbid': 'tdbid', + 'table': 'table', + 'columns': 'columns' + } + + def __init__(self, uid=None, tid=None, tdbid=None, table=None, columns=None): # noqa: E501 + """Unique - a model defined in Swagger""" # noqa: E501 + self._uid = None + self._tid = None + self._tdbid = None + self._table = None + self._columns = None + self.discriminator = None + if uid is not None: + self.uid = uid + if tid is not None: + self.tid = tid + if tdbid is not None: + self.tdbid = tdbid + if table is not None: + self.table = table + if columns is not None: + self.columns = columns + + @property + def uid(self): + """Gets the uid of this Unique. # noqa: E501 + + + :return: The uid of this Unique. # noqa: E501 + :rtype: int + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this Unique. + + + :param uid: The uid of this Unique. # noqa: E501 + :type: int + """ + + self._uid = uid + + @property + def tid(self): + """Gets the tid of this Unique. # noqa: E501 + + + :return: The tid of this Unique. # noqa: E501 + :rtype: int + """ + return self._tid + + @tid.setter + def tid(self, tid): + """Sets the tid of this Unique. + + + :param tid: The tid of this Unique. # noqa: E501 + :type: int + """ + + self._tid = tid + + @property + def tdbid(self): + """Gets the tdbid of this Unique. # noqa: E501 + + + :return: The tdbid of this Unique. # noqa: E501 + :rtype: int + """ + return self._tdbid + + @tdbid.setter + def tdbid(self, tdbid): + """Sets the tdbid of this Unique. + + + :param tdbid: The tdbid of this Unique. # noqa: E501 + :type: int + """ + + self._tdbid = tdbid + + @property + def table(self): + """Gets the table of this Unique. # noqa: E501 + + + :return: The table of this Unique. # noqa: E501 + :rtype: Table + """ + return self._table + + @table.setter + def table(self, table): + """Sets the table of this Unique. + + + :param table: The table of this Unique. # noqa: E501 + :type: Table + """ + + self._table = table + + @property + def columns(self): + """Gets the columns of this Unique. # noqa: E501 + + + :return: The columns of this Unique. # noqa: E501 + :rtype: list[TableColumn] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this Unique. + + + :param columns: The columns of this Unique. # noqa: E501 + :type: list[TableColumn] + """ + + self._columns = columns + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Unique, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Unique): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/user.py b/swagger/api/api_container/models/user.py new file mode 100644 index 0000000000000000000000000000000000000000..ed602c9d7f83e926b272f13e7a29a7ac1869a0f3 --- /dev/null +++ b/swagger/api/api_container/models/user.py @@ -0,0 +1,526 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class User(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'username': 'str', + 'firstname': 'str', + 'lastname': 'str', + 'realm_id': 'str', + 'email': 'str', + 'email_verified': 'bool', + 'enabled': 'bool', + 'created_timestamp': 'int', + 'database_password': 'str', + 'attributes': 'list[UserAttribute]', + 'credentials': 'list[Credential]', + 'containers': 'list[Container]', + 'databases': 'list[Database]', + 'identifiers': 'list[Identifier]', + 'roles': 'list[Role]', + 'tables': 'list[Table]' + } + + attribute_map = { + 'id': 'id', + 'username': 'username', + 'firstname': 'firstname', + 'lastname': 'lastname', + 'realm_id': 'realmId', + 'email': 'email', + 'email_verified': 'emailVerified', + 'enabled': 'enabled', + 'created_timestamp': 'createdTimestamp', + 'database_password': 'databasePassword', + 'attributes': 'attributes', + 'credentials': 'credentials', + 'containers': 'containers', + 'databases': 'databases', + 'identifiers': 'identifiers', + 'roles': 'roles', + 'tables': 'tables' + } + + def __init__(self, id=None, username=None, firstname=None, lastname=None, realm_id=None, email=None, email_verified=None, enabled=None, created_timestamp=None, database_password=None, attributes=None, credentials=None, containers=None, databases=None, identifiers=None, roles=None, tables=None): # noqa: E501 + """User - a model defined in Swagger""" # noqa: E501 + self._id = None + self._username = None + self._firstname = None + self._lastname = None + self._realm_id = None + self._email = None + self._email_verified = None + self._enabled = None + self._created_timestamp = None + self._database_password = None + self._attributes = None + self._credentials = None + self._containers = None + self._databases = None + self._identifiers = None + self._roles = None + self._tables = None + self.discriminator = None + if id is not None: + self.id = id + if username is not None: + self.username = username + if firstname is not None: + self.firstname = firstname + if lastname is not None: + self.lastname = lastname + if realm_id is not None: + self.realm_id = realm_id + if email is not None: + self.email = email + if email_verified is not None: + self.email_verified = email_verified + if enabled is not None: + self.enabled = enabled + if created_timestamp is not None: + self.created_timestamp = created_timestamp + if database_password is not None: + self.database_password = database_password + if attributes is not None: + self.attributes = attributes + if credentials is not None: + self.credentials = credentials + if containers is not None: + self.containers = containers + if databases is not None: + self.databases = databases + if identifiers is not None: + self.identifiers = identifiers + if roles is not None: + self.roles = roles + if tables is not None: + self.tables = tables + + @property + def id(self): + """Gets the id of this User. # noqa: E501 + + + :return: The id of this User. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this User. + + + :param id: The id of this User. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def username(self): + """Gets the username of this User. # noqa: E501 + + + :return: The username of this User. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this User. + + + :param username: The username of this User. # noqa: E501 + :type: str + """ + + self._username = username + + @property + def firstname(self): + """Gets the firstname of this User. # noqa: E501 + + + :return: The firstname of this User. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this User. + + + :param firstname: The firstname of this User. # noqa: E501 + :type: str + """ + + self._firstname = firstname + + @property + def lastname(self): + """Gets the lastname of this User. # noqa: E501 + + + :return: The lastname of this User. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this User. + + + :param lastname: The lastname of this User. # noqa: E501 + :type: str + """ + + self._lastname = lastname + + @property + def realm_id(self): + """Gets the realm_id of this User. # noqa: E501 + + + :return: The realm_id of this User. # noqa: E501 + :rtype: str + """ + return self._realm_id + + @realm_id.setter + def realm_id(self, realm_id): + """Sets the realm_id of this User. + + + :param realm_id: The realm_id of this User. # noqa: E501 + :type: str + """ + + self._realm_id = realm_id + + @property + def email(self): + """Gets the email of this User. # noqa: E501 + + + :return: The email of this User. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this User. + + + :param email: The email of this User. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def email_verified(self): + """Gets the email_verified of this User. # noqa: E501 + + + :return: The email_verified of this User. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this User. + + + :param email_verified: The email_verified of this User. # noqa: E501 + :type: bool + """ + + self._email_verified = email_verified + + @property + def enabled(self): + """Gets the enabled of this User. # noqa: E501 + + + :return: The enabled of this User. # noqa: E501 + :rtype: bool + """ + return self._enabled + + @enabled.setter + def enabled(self, enabled): + """Sets the enabled of this User. + + + :param enabled: The enabled of this User. # noqa: E501 + :type: bool + """ + + self._enabled = enabled + + @property + def created_timestamp(self): + """Gets the created_timestamp of this User. # noqa: E501 + + + :return: The created_timestamp of this User. # noqa: E501 + :rtype: int + """ + return self._created_timestamp + + @created_timestamp.setter + def created_timestamp(self, created_timestamp): + """Sets the created_timestamp of this User. + + + :param created_timestamp: The created_timestamp of this User. # noqa: E501 + :type: int + """ + + self._created_timestamp = created_timestamp + + @property + def database_password(self): + """Gets the database_password of this User. # noqa: E501 + + + :return: The database_password of this User. # noqa: E501 + :rtype: str + """ + return self._database_password + + @database_password.setter + def database_password(self, database_password): + """Sets the database_password of this User. + + + :param database_password: The database_password of this User. # noqa: E501 + :type: str + """ + + self._database_password = database_password + + @property + def attributes(self): + """Gets the attributes of this User. # noqa: E501 + + + :return: The attributes of this User. # noqa: E501 + :rtype: list[UserAttribute] + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this User. + + + :param attributes: The attributes of this User. # noqa: E501 + :type: list[UserAttribute] + """ + + self._attributes = attributes + + @property + def credentials(self): + """Gets the credentials of this User. # noqa: E501 + + + :return: The credentials of this User. # noqa: E501 + :rtype: list[Credential] + """ + return self._credentials + + @credentials.setter + def credentials(self, credentials): + """Sets the credentials of this User. + + + :param credentials: The credentials of this User. # noqa: E501 + :type: list[Credential] + """ + + self._credentials = credentials + + @property + def containers(self): + """Gets the containers of this User. # noqa: E501 + + + :return: The containers of this User. # noqa: E501 + :rtype: list[Container] + """ + return self._containers + + @containers.setter + def containers(self, containers): + """Sets the containers of this User. + + + :param containers: The containers of this User. # noqa: E501 + :type: list[Container] + """ + + self._containers = containers + + @property + def databases(self): + """Gets the databases of this User. # noqa: E501 + + + :return: The databases of this User. # noqa: E501 + :rtype: list[Database] + """ + return self._databases + + @databases.setter + def databases(self, databases): + """Sets the databases of this User. + + + :param databases: The databases of this User. # noqa: E501 + :type: list[Database] + """ + + self._databases = databases + + @property + def identifiers(self): + """Gets the identifiers of this User. # noqa: E501 + + + :return: The identifiers of this User. # noqa: E501 + :rtype: list[Identifier] + """ + return self._identifiers + + @identifiers.setter + def identifiers(self, identifiers): + """Sets the identifiers of this User. + + + :param identifiers: The identifiers of this User. # noqa: E501 + :type: list[Identifier] + """ + + self._identifiers = identifiers + + @property + def roles(self): + """Gets the roles of this User. # noqa: E501 + + + :return: The roles of this User. # noqa: E501 + :rtype: list[Role] + """ + return self._roles + + @roles.setter + def roles(self, roles): + """Sets the roles of this User. + + + :param roles: The roles of this User. # noqa: E501 + :type: list[Role] + """ + + self._roles = roles + + @property + def tables(self): + """Gets the tables of this User. # noqa: E501 + + + :return: The tables of this User. # noqa: E501 + :rtype: list[Table] + """ + return self._tables + + @tables.setter + def tables(self, tables): + """Sets the tables of this User. + + + :param tables: The tables of this User. # noqa: E501 + :type: list[Table] + """ + + self._tables = tables + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(User, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, User): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/user_attribute.py b/swagger/api/api_container/models/user_attribute.py new file mode 100644 index 0000000000000000000000000000000000000000..f497a5e06c774c3f1779cdefc7d29ce3a82211e0 --- /dev/null +++ b/swagger/api/api_container/models/user_attribute.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserAttribute(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'user_id': 'str', + 'name': 'str', + 'value': 'str', + 'user': 'User' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'name': 'name', + 'value': 'value', + 'user': 'user' + } + + def __init__(self, id=None, user_id=None, name=None, value=None, user=None): # noqa: E501 + """UserAttribute - a model defined in Swagger""" # noqa: E501 + self._id = None + self._user_id = None + self._name = None + self._value = None + self._user = None + self.discriminator = None + if id is not None: + self.id = id + if user_id is not None: + self.user_id = user_id + if name is not None: + self.name = name + if value is not None: + self.value = value + if user is not None: + self.user = user + + @property + def id(self): + """Gets the id of this UserAttribute. # noqa: E501 + + + :return: The id of this UserAttribute. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserAttribute. + + + :param id: The id of this UserAttribute. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this UserAttribute. # noqa: E501 + + + :return: The user_id of this UserAttribute. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this UserAttribute. + + + :param user_id: The user_id of this UserAttribute. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def name(self): + """Gets the name of this UserAttribute. # noqa: E501 + + + :return: The name of this UserAttribute. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserAttribute. + + + :param name: The name of this UserAttribute. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this UserAttribute. # noqa: E501 + + + :return: The value of this UserAttribute. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this UserAttribute. + + + :param value: The value of this UserAttribute. # noqa: E501 + :type: str + """ + + self._value = value + + @property + def user(self): + """Gets the user of this UserAttribute. # noqa: E501 + + + :return: The user of this UserAttribute. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this UserAttribute. + + + :param user: The user of this UserAttribute. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserAttribute, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserAttribute): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_container/models/view.py b/swagger/api/api_container/models/view.py new file mode 100644 index 0000000000000000000000000000000000000000..8aff6664edd4b3bb98f15f28deced7c9b27a81e0 --- /dev/null +++ b/swagger/api/api_container/models/view.py @@ -0,0 +1,448 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class View(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'vcid': 'int', + 'vdbid': 'int', + 'created_by': 'str', + 'creator': 'User', + 'database': 'Database', + 'name': 'str', + 'internal_name': 'str', + 'is_public': 'bool', + 'is_initial_view': 'bool', + 'query': 'str', + 'columns': 'list[TableColumn]', + 'created': 'datetime', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'vcid': 'vcid', + 'vdbid': 'vdbid', + 'created_by': 'createdBy', + 'creator': 'creator', + 'database': 'database', + 'name': 'name', + 'internal_name': 'internalName', + 'is_public': 'isPublic', + 'is_initial_view': 'isInitialView', + 'query': 'query', + 'columns': 'columns', + 'created': 'created', + 'last_modified': 'lastModified' + } + + def __init__(self, id=None, vcid=None, vdbid=None, created_by=None, creator=None, database=None, name=None, internal_name=None, is_public=None, is_initial_view=None, query=None, columns=None, created=None, last_modified=None): # noqa: E501 + """View - a model defined in Swagger""" # noqa: E501 + self._id = None + self._vcid = None + self._vdbid = None + self._created_by = None + self._creator = None + self._database = None + self._name = None + self._internal_name = None + self._is_public = None + self._is_initial_view = None + self._query = None + self._columns = None + self._created = None + self._last_modified = None + self.discriminator = None + if id is not None: + self.id = id + if vcid is not None: + self.vcid = vcid + if vdbid is not None: + self.vdbid = vdbid + if created_by is not None: + self.created_by = created_by + if creator is not None: + self.creator = creator + if database is not None: + self.database = database + if name is not None: + self.name = name + if internal_name is not None: + self.internal_name = internal_name + if is_public is not None: + self.is_public = is_public + if is_initial_view is not None: + self.is_initial_view = is_initial_view + if query is not None: + self.query = query + if columns is not None: + self.columns = columns + if created is not None: + self.created = created + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this View. # noqa: E501 + + + :return: The id of this View. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this View. + + + :param id: The id of this View. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def vcid(self): + """Gets the vcid of this View. # noqa: E501 + + + :return: The vcid of this View. # noqa: E501 + :rtype: int + """ + return self._vcid + + @vcid.setter + def vcid(self, vcid): + """Sets the vcid of this View. + + + :param vcid: The vcid of this View. # noqa: E501 + :type: int + """ + + self._vcid = vcid + + @property + def vdbid(self): + """Gets the vdbid of this View. # noqa: E501 + + + :return: The vdbid of this View. # noqa: E501 + :rtype: int + """ + return self._vdbid + + @vdbid.setter + def vdbid(self, vdbid): + """Sets the vdbid of this View. + + + :param vdbid: The vdbid of this View. # noqa: E501 + :type: int + """ + + self._vdbid = vdbid + + @property + def created_by(self): + """Gets the created_by of this View. # noqa: E501 + + + :return: The created_by of this View. # noqa: E501 + :rtype: str + """ + return self._created_by + + @created_by.setter + def created_by(self, created_by): + """Sets the created_by of this View. + + + :param created_by: The created_by of this View. # noqa: E501 + :type: str + """ + + self._created_by = created_by + + @property + def creator(self): + """Gets the creator of this View. # noqa: E501 + + + :return: The creator of this View. # noqa: E501 + :rtype: User + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this View. + + + :param creator: The creator of this View. # noqa: E501 + :type: User + """ + + self._creator = creator + + @property + def database(self): + """Gets the database of this View. # noqa: E501 + + + :return: The database of this View. # noqa: E501 + :rtype: Database + """ + return self._database + + @database.setter + def database(self, database): + """Sets the database of this View. + + + :param database: The database of this View. # noqa: E501 + :type: Database + """ + + self._database = database + + @property + def name(self): + """Gets the name of this View. # noqa: E501 + + + :return: The name of this View. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this View. + + + :param name: The name of this View. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def internal_name(self): + """Gets the internal_name of this View. # noqa: E501 + + + :return: The internal_name of this View. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this View. + + + :param internal_name: The internal_name of this View. # noqa: E501 + :type: str + """ + + self._internal_name = internal_name + + @property + def is_public(self): + """Gets the is_public of this View. # noqa: E501 + + + :return: The is_public of this View. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this View. + + + :param is_public: The is_public of this View. # noqa: E501 + :type: bool + """ + + self._is_public = is_public + + @property + def is_initial_view(self): + """Gets the is_initial_view of this View. # noqa: E501 + + + :return: The is_initial_view of this View. # noqa: E501 + :rtype: bool + """ + return self._is_initial_view + + @is_initial_view.setter + def is_initial_view(self, is_initial_view): + """Sets the is_initial_view of this View. + + + :param is_initial_view: The is_initial_view of this View. # noqa: E501 + :type: bool + """ + + self._is_initial_view = is_initial_view + + @property + def query(self): + """Gets the query of this View. # noqa: E501 + + + :return: The query of this View. # noqa: E501 + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """Sets the query of this View. + + + :param query: The query of this View. # noqa: E501 + :type: str + """ + + self._query = query + + @property + def columns(self): + """Gets the columns of this View. # noqa: E501 + + + :return: The columns of this View. # noqa: E501 + :rtype: list[TableColumn] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this View. + + + :param columns: The columns of this View. # noqa: E501 + :type: list[TableColumn] + """ + + self._columns = columns + + @property + def created(self): + """Gets the created of this View. # noqa: E501 + + + :return: The created of this View. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this View. + + + :param created: The created of this View. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def last_modified(self): + """Gets the last_modified of this View. # noqa: E501 + + + :return: The last_modified of this View. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this View. + + + :param last_modified: The last_modified of this View. # noqa: E501 + :type: datetime + """ + + self._last_modified = last_modified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(View, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, View): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_database/api/database_endpoint_api.py b/swagger/api/api_database/api/database_endpoint_api.py index 1c7b89259f901d555279fad4954ae8c37e7bfc82..660a40368d25315227c55b94313ee6336e40b048 100644 --- a/swagger/api/api_database/api/database_endpoint_api.py +++ b/swagger/api/api_database/api/database_endpoint_api.py @@ -349,7 +349,7 @@ class DatabaseEndpointApi(object): :param async_req bool :param int id: (required) - :return: str + :return: list[DatabaseBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -370,7 +370,7 @@ class DatabaseEndpointApi(object): :param async_req bool :param int id: (required) - :return: str + :return: list[DatabaseBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -424,7 +424,7 @@ class DatabaseEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[DatabaseBriefDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_database/api/license_endpoint_api.py b/swagger/api/api_database/api/license_endpoint_api.py index 2b45a225c26b441245c698f5d5d27f7c04ef64c3..82e1f10efe88ff1a67009df266804c8e3684cdec 100644 --- a/swagger/api/api_database/api/license_endpoint_api.py +++ b/swagger/api/api_database/api/license_endpoint_api.py @@ -42,7 +42,7 @@ class LicenseEndpointApi(object): :param async_req bool :param int id: (required) - :return: DatabaseBriefDto + :return: list[LicenseDto] If the method is called asynchronously, returns the request thread. """ @@ -63,7 +63,7 @@ class LicenseEndpointApi(object): :param async_req bool :param int id: (required) - :return: DatabaseBriefDto + :return: list[LicenseDto] If the method is called asynchronously, returns the request thread. """ @@ -117,7 +117,7 @@ class LicenseEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='DatabaseBriefDto', # noqa: E501 + response_type='list[LicenseDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_database/models/api_error_dto.py b/swagger/api/api_database/models/api_error_dto.py index 75c27d937711ffd3174c82805f452e1fe32ab056..c5b8e89f5ba13d94df1a88f25b6b44478fb38497 100644 --- a/swagger/api/api_database/models/api_error_dto.py +++ b/swagger/api/api_database/models/api_error_dto.py @@ -69,7 +69,7 @@ class ApiErrorDto(object): """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_database/models/column_brief_dto.py b/swagger/api/api_database/models/column_brief_dto.py index dda2b246eeb33dcc75fc8628f620edbc4db4629b..fe2553e01aa1c48428486e3b870e8d6815de21ab 100644 --- a/swagger/api/api_database/models/column_brief_dto.py +++ b/swagger/api/api_database/models/column_brief_dto.py @@ -30,6 +30,8 @@ class ColumnBriefDto(object): swagger_types = { 'id': 'int', 'name': 'str', + 'database_id': 'int', + 'table_id': 'int', 'internal_name': 'str', 'column_type': 'str' } @@ -37,19 +39,25 @@ class ColumnBriefDto(object): attribute_map = { 'id': 'id', 'name': 'name', + 'database_id': 'database_id', + 'table_id': 'table_id', 'internal_name': 'internal_name', 'column_type': 'column_type' } - def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None + self._database_id = None + self._table_id = None self._internal_name = None self._column_type = None self.discriminator = None self.id = id self.name = name + self.database_id = database_id + self.table_id = table_id self.internal_name = internal_name self.column_type = column_type @@ -99,6 +107,52 @@ class ColumnBriefDto(object): self._name = name + @property + def database_id(self): + """Gets the database_id of this ColumnBriefDto. # noqa: E501 + + + :return: The database_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this ColumnBriefDto. + + + :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this ColumnBriefDto. # noqa: E501 + + + :return: The table_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this ColumnBriefDto. + + + :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + @property def internal_name(self): """Gets the internal_name of this ColumnBriefDto. # noqa: E501 diff --git a/swagger/api/api_database/models/creator_dto.py b/swagger/api/api_database/models/creator_dto.py index 54d49c26f643fe8a10085aa1aadada80dc522860..383cdb181461685267258bc79f45e6cd3c95ee95 100644 --- a/swagger/api/api_database/models/creator_dto.py +++ b/swagger/api/api_database/models/creator_dto.py @@ -32,9 +32,7 @@ class CreatorDto(object): 'firstname': 'str', 'lastname': 'str', 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' + 'orcid': 'str' } attribute_map = { @@ -42,20 +40,16 @@ class CreatorDto(object): 'firstname': 'firstname', 'lastname': 'lastname', 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' + 'orcid': 'orcid' } - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 """CreatorDto - a model defined in Swagger""" # noqa: E501 self._id = None self._firstname = None self._lastname = None self._affiliation = None self._orcid = None - self._created = None - self._last_modified = None self.discriminator = None self.id = id self.firstname = firstname @@ -64,10 +58,6 @@ class CreatorDto(object): self.affiliation = affiliation if orcid is not None: self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified @property def id(self): @@ -180,48 +170,6 @@ class CreatorDto(object): self._orcid = orcid - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_database/models/identifier_brief_dto.py b/swagger/api/api_database/models/identifier_brief_dto.py index f3f62be8d2acf0b660d63b1cedf34377cad54e5f..95ac69b97a6178c2cf8398086cf71d89a52c7710 100644 --- a/swagger/api/api_database/models/identifier_brief_dto.py +++ b/swagger/api/api_database/models/identifier_brief_dto.py @@ -34,8 +34,6 @@ class IdentifierBriefDto(object): 'doi': 'str', 'publisher': 'str', 'creators': 'list[CreatorBriefDto]', - 'created': 'datetime', - 'last_modified': 'datetime', 'container_id': 'int', 'database_id': 'int', 'query_id': 'int', @@ -49,15 +47,13 @@ class IdentifierBriefDto(object): 'doi': 'doi', 'publisher': 'publisher', 'creators': 'creators', - 'created': 'created', - 'last_modified': 'lastModified', 'container_id': 'container id', 'database_id': 'database id', 'query_id': 'query id', 'publication_year': 'publication_year' } - def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, created=None, last_modified=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 + def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 """IdentifierBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._title = None @@ -65,8 +61,6 @@ class IdentifierBriefDto(object): self._doi = None self._publisher = None self._creators = None - self._created = None - self._last_modified = None self._container_id = None self._database_id = None self._query_id = None @@ -80,10 +74,6 @@ class IdentifierBriefDto(object): if publisher is not None: self.publisher = publisher self.creators = creators - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified self.container_id = container_id self.database_id = database_id if query_id is not None: @@ -230,48 +220,6 @@ class IdentifierBriefDto(object): self._creators = creators - @property - def created(self): - """Gets the created of this IdentifierBriefDto. # noqa: E501 - - - :return: The created of this IdentifierBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierBriefDto. - - - :param created: The created of this IdentifierBriefDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierBriefDto. # noqa: E501 - - - :return: The last_modified of this IdentifierBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierBriefDto. - - - :param last_modified: The last_modified of this IdentifierBriefDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - @property def container_id(self): """Gets the container_id of this IdentifierBriefDto. # noqa: E501 diff --git a/swagger/api/api_database/models/identifier_dto.py b/swagger/api/api_database/models/identifier_dto.py index b8635502fd7f852b14b7e742be2e0aa6153143b2..406ed00ef871e52dd5330a5c1825be10b4fb1b4b 100644 --- a/swagger/api/api_database/models/identifier_dto.py +++ b/swagger/api/api_database/models/identifier_dto.py @@ -309,7 +309,7 @@ class IdentifierDto(object): """ if visibility is None: raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_database/models/image_brief_dto.py b/swagger/api/api_database/models/image_brief_dto.py index c4be79117a5f6f9709bc52c9de5b9efbb2efeb3e..b58450851cb300fb0c725d8898478fd1cc7c6c1f 100644 --- a/swagger/api/api_database/models/image_brief_dto.py +++ b/swagger/api/api_database/models/image_brief_dto.py @@ -29,23 +29,27 @@ class ImageBriefDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str' } attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag' } - def __init__(self, id=None, repository=None, tag=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 """ImageBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag @@ -72,6 +76,29 @@ class ImageBriefDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageBriefDto. # noqa: E501 + + + :return: The registry of this ImageBriefDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageBriefDto. + + + :param registry: The registry of this ImageBriefDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageBriefDto. # noqa: E501 diff --git a/swagger/api/api_database/models/image_dto.py b/swagger/api/api_database/models/image_dto.py index fd8eae2a85d235f0b220be71b2d0344e98b167e0..c9bedc4b7d71b6e68fceefcc1be8d0a8bed4c356 100644 --- a/swagger/api/api_database/models/image_dto.py +++ b/swagger/api/api_database/models/image_dto.py @@ -29,6 +29,7 @@ class ImageDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str', 'dialect': 'str', @@ -43,6 +44,7 @@ class ImageDto(object): attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag', 'dialect': 'dialect', @@ -55,9 +57,10 @@ class ImageDto(object): 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self._dialect = None @@ -70,6 +73,7 @@ class ImageDto(object): self._default_port = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag self.dialect = dialect @@ -108,6 +112,29 @@ class ImageDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageDto. # noqa: E501 + + + :return: The registry of this ImageDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageDto. + + + :param registry: The registry of this ImageDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_database/models/table_brief_dto.py b/swagger/api/api_database/models/table_brief_dto.py index 2871c14bf18e9c81b0fbd282cd41a130a1708331..1983111ebc65f0dd0affecc6b603c127e9bf3d32 100644 --- a/swagger/api/api_database/models/table_brief_dto.py +++ b/swagger/api/api_database/models/table_brief_dto.py @@ -31,7 +31,7 @@ class TableBriefDto(object): 'id': 'int', 'name': 'str', 'description': 'str', - 'creator': 'UserBriefDto', + 'owner': 'UserBriefDto', 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,24 +40,24 @@ class TableBriefDto(object): 'id': 'id', 'name': 'name', 'description': 'description', - 'creator': 'creator', + 'owner': 'owner', 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, columns=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 """TableBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._description = None - self._creator = None + self._owner = None self._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description - self.creator = creator + self.owner = owner self.columns = columns self.internal_name = internal_name @@ -131,27 +131,27 @@ class TableBriefDto(object): self._description = description @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 + def owner(self): + """Gets the owner of this TableBriefDto. # noqa: E501 - :return: The creator of this TableBriefDto. # noqa: E501 + :return: The owner of this TableBriefDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._owner - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. + @owner.setter + def owner(self, owner): + """Sets the owner of this TableBriefDto. - :param creator: The creator of this TableBriefDto. # noqa: E501 + :param owner: The owner of this TableBriefDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - self._creator = creator + self._owner = owner @property def columns(self): diff --git a/swagger/api/api_identifier/__init__.py b/swagger/api/api_identifier/__init__.py index c3f3bb6b7f86a8aac5916b5ab81d9d846d28f80c..4dab50d505775a317d5f0e17c37f8641ad616496 100644 --- a/swagger/api/api_identifier/__init__.py +++ b/swagger/api/api_identifier/__init__.py @@ -26,6 +26,7 @@ from api_identifier.models.creator_create_dto import CreatorCreateDto from api_identifier.models.creator_dto import CreatorDto from api_identifier.models.identifier_create_dto import IdentifierCreateDto from api_identifier.models.identifier_dto import IdentifierDto +from api_identifier.models.identifier_update_dto import IdentifierUpdateDto from api_identifier.models.license_dto import LicenseDto from api_identifier.models.related_identifier_create_dto import RelatedIdentifierCreateDto from api_identifier.models.related_identifier_dto import RelatedIdentifierDto diff --git a/swagger/api/api_identifier/api/identifier_endpoint_api.py b/swagger/api/api_identifier/api/identifier_endpoint_api.py index a25a5838fd556888d2751e5894b8e230c7d4a09e..72934f34931e9d0e5e580d12f3625d2212898a79 100644 --- a/swagger/api/api_identifier/api/identifier_endpoint_api.py +++ b/swagger/api/api_identifier/api/identifier_endpoint_api.py @@ -137,99 +137,6 @@ class IdentifierEndpointApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def delete(self, id, **kwargs): # noqa: E501 - """Delete some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/identifier/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - def list(self, **kwargs): # noqa: E501 """Find identifiers # noqa: E501 @@ -242,7 +149,7 @@ class IdentifierEndpointApi(object): :param int dbid: :param int qid: :param str type: - :return: str + :return: list[IdentifierDto] If the method is called asynchronously, returns the request thread. """ @@ -265,7 +172,7 @@ class IdentifierEndpointApi(object): :param int dbid: :param int qid: :param str type: - :return: str + :return: list[IdentifierDto] If the method is called asynchronously, returns the request thread. """ @@ -319,112 +226,7 @@ class IdentifierEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update(self, body, id, **kwargs): # noqa: E501 - """Update some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentifierDto body: (required) - :param int id: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentifierDto body: (required) - :param int id: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/identifier/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='IdentifierDto', # noqa: E501 + response_type='list[IdentifierDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_identifier/api/persistence_endpoint_api.py b/swagger/api/api_identifier/api/persistence_endpoint_api.py index 074686f93612a55d06d482efa88599e3655a0be1..94308dc9c69e7c6f1c43977b2954efbd30865a27 100644 --- a/swagger/api/api_identifier/api/persistence_endpoint_api.py +++ b/swagger/api/api_identifier/api/persistence_endpoint_api.py @@ -32,6 +32,99 @@ class PersistenceEndpointApi(object): api_client = ApiClient() self.api_client = api_client + def delete(self, id, **kwargs): # noqa: E501 + """Delete some identifier # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete some identifier # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/pid/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def find(self, pid, accept, **kwargs): # noqa: E501 """Find some identifier # noqa: E501 @@ -132,3 +225,108 @@ class PersistenceEndpointApi(object): _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def update(self, body, id, **kwargs): # noqa: E501 + """Update some identifier # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param IdentifierUpdateDto body: (required) + :param int id: (required) + :return: IdentifierDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def update_with_http_info(self, body, id, **kwargs): # noqa: E501 + """Update some identifier # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param IdentifierUpdateDto body: (required) + :param int id: (required) + :return: IdentifierDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/pid/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IdentifierDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/swagger/api/api_identifier/models/__init__.py b/swagger/api/api_identifier/models/__init__.py index 845f477d076b77e01ecf61bf8aea698b5638fd34..c4f0d7970fd045aedf1a38a3f808b984550f0a0d 100644 --- a/swagger/api/api_identifier/models/__init__.py +++ b/swagger/api/api_identifier/models/__init__.py @@ -19,6 +19,7 @@ from api_identifier.models.creator_create_dto import CreatorCreateDto from api_identifier.models.creator_dto import CreatorDto from api_identifier.models.identifier_create_dto import IdentifierCreateDto from api_identifier.models.identifier_dto import IdentifierDto +from api_identifier.models.identifier_update_dto import IdentifierUpdateDto from api_identifier.models.license_dto import LicenseDto from api_identifier.models.related_identifier_create_dto import RelatedIdentifierCreateDto from api_identifier.models.related_identifier_dto import RelatedIdentifierDto diff --git a/swagger/api/api_identifier/models/api_error_dto.py b/swagger/api/api_identifier/models/api_error_dto.py index c47a3366e3f0e268862db70243b6a73b347af33c..dc406e54d9e103ceae898280255b9c9eb170c2b7 100644 --- a/swagger/api/api_identifier/models/api_error_dto.py +++ b/swagger/api/api_identifier/models/api_error_dto.py @@ -69,7 +69,7 @@ class ApiErrorDto(object): """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_identifier/models/creator_dto.py b/swagger/api/api_identifier/models/creator_dto.py index 8a6b3dd8a26533fd7828a38b1eceab9376dd2575..cc892dbd3dd5713210cef4a371dcaf0f8a7e27c7 100644 --- a/swagger/api/api_identifier/models/creator_dto.py +++ b/swagger/api/api_identifier/models/creator_dto.py @@ -32,9 +32,7 @@ class CreatorDto(object): 'firstname': 'str', 'lastname': 'str', 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' + 'orcid': 'str' } attribute_map = { @@ -42,20 +40,16 @@ class CreatorDto(object): 'firstname': 'firstname', 'lastname': 'lastname', 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' + 'orcid': 'orcid' } - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 """CreatorDto - a model defined in Swagger""" # noqa: E501 self._id = None self._firstname = None self._lastname = None self._affiliation = None self._orcid = None - self._created = None - self._last_modified = None self.discriminator = None self.id = id self.firstname = firstname @@ -64,10 +58,6 @@ class CreatorDto(object): self.affiliation = affiliation if orcid is not None: self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified @property def id(self): @@ -180,48 +170,6 @@ class CreatorDto(object): self._orcid = orcid - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_identifier/models/identifier_create_dto.py b/swagger/api/api_identifier/models/identifier_create_dto.py index c147d4ce494fcbbec9c3b0d913431eaf71acbdcf..376cb14181b81ae48f739e93a07a125bc24b06af 100644 --- a/swagger/api/api_identifier/models/identifier_create_dto.py +++ b/swagger/api/api_identifier/models/identifier_create_dto.py @@ -34,6 +34,7 @@ class IdentifierCreateDto(object): 'type': 'str', 'title': 'str', 'description': 'str', + 'visibility': 'str', 'publisher': 'str', 'language': 'str', 'license': 'LicenseDto', @@ -51,6 +52,7 @@ class IdentifierCreateDto(object): 'type': 'type', 'title': 'title', 'description': 'description', + 'visibility': 'visibility', 'publisher': 'publisher', 'language': 'language', 'license': 'license', @@ -61,7 +63,7 @@ class IdentifierCreateDto(object): 'related_identifiers': 'related_identifiers' } - def __init__(self, cid=None, dbid=None, qid=None, type=None, title=None, description=None, publisher=None, language=None, license=None, creators=None, publication_day=None, publication_month=None, publication_year=None, related_identifiers=None): # noqa: E501 + def __init__(self, cid=None, dbid=None, qid=None, type=None, title=None, description=None, visibility=None, publisher=None, language=None, license=None, creators=None, publication_day=None, publication_month=None, publication_year=None, related_identifiers=None): # noqa: E501 """IdentifierCreateDto - a model defined in Swagger""" # noqa: E501 self._cid = None self._dbid = None @@ -69,6 +71,7 @@ class IdentifierCreateDto(object): self._type = None self._title = None self._description = None + self._visibility = None self._publisher = None self._language = None self._license = None @@ -86,6 +89,7 @@ class IdentifierCreateDto(object): self.title = title if description is not None: self.description = description + self.visibility = visibility if publisher is not None: self.publisher = publisher if language is not None: @@ -241,6 +245,35 @@ class IdentifierCreateDto(object): self._description = description + @property + def visibility(self): + """Gets the visibility of this IdentifierCreateDto. # noqa: E501 + + + :return: The visibility of this IdentifierCreateDto. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this IdentifierCreateDto. + + + :param visibility: The visibility of this IdentifierCreateDto. # noqa: E501 + :type: str + """ + if visibility is None: + raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 + if visibility not in allowed_values: + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + @property def publisher(self): """Gets the publisher of this IdentifierCreateDto. # noqa: E501 diff --git a/swagger/api/api_identifier/models/identifier_dto.py b/swagger/api/api_identifier/models/identifier_dto.py index ada34b9d158b63b7a54b23f5d3c15a12c1829e0a..75ef56e36f7d65072e0f549957a3f372c8d6a3dd 100644 --- a/swagger/api/api_identifier/models/identifier_dto.py +++ b/swagger/api/api_identifier/models/identifier_dto.py @@ -309,7 +309,7 @@ class IdentifierDto(object): """ if visibility is None: raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_identifier/models/identifier_update_dto.py b/swagger/api/api_identifier/models/identifier_update_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..fc11594e9b7fe25068f622605df2bf856ee8b517 --- /dev/null +++ b/swagger/api/api_identifier/models/identifier_update_dto.py @@ -0,0 +1,525 @@ +# coding: utf-8 + +""" + Database Repository Identifier Service API + + Service that manages the identifiers # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class IdentifierUpdateDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'cid': 'int', + 'dbid': 'int', + 'qid': 'int', + 'doi': 'str', + 'type': 'str', + 'title': 'str', + 'description': 'str', + 'visibility': 'str', + 'publisher': 'str', + 'language': 'str', + 'license': 'LicenseDto', + 'creators': 'list[CreatorDto]', + 'publication_day': 'int', + 'publication_month': 'int', + 'publication_year': 'int', + 'related_identifiers': 'list[RelatedIdentifierCreateDto]' + } + + attribute_map = { + 'cid': 'cid', + 'dbid': 'dbid', + 'qid': 'qid', + 'doi': 'doi', + 'type': 'type', + 'title': 'title', + 'description': 'description', + 'visibility': 'visibility', + 'publisher': 'publisher', + 'language': 'language', + 'license': 'license', + 'creators': 'creators', + 'publication_day': 'publication_day', + 'publication_month': 'publication_month', + 'publication_year': 'publication_year', + 'related_identifiers': 'related_identifiers' + } + + def __init__(self, cid=None, dbid=None, qid=None, doi=None, type=None, title=None, description=None, visibility=None, publisher=None, language=None, license=None, creators=None, publication_day=None, publication_month=None, publication_year=None, related_identifiers=None): # noqa: E501 + """IdentifierUpdateDto - a model defined in Swagger""" # noqa: E501 + self._cid = None + self._dbid = None + self._qid = None + self._doi = None + self._type = None + self._title = None + self._description = None + self._visibility = None + self._publisher = None + self._language = None + self._license = None + self._creators = None + self._publication_day = None + self._publication_month = None + self._publication_year = None + self._related_identifiers = None + self.discriminator = None + self.cid = cid + self.dbid = dbid + if qid is not None: + self.qid = qid + if doi is not None: + self.doi = doi + self.type = type + self.title = title + if description is not None: + self.description = description + self.visibility = visibility + if publisher is not None: + self.publisher = publisher + if language is not None: + self.language = language + if license is not None: + self.license = license + self.creators = creators + if publication_day is not None: + self.publication_day = publication_day + if publication_month is not None: + self.publication_month = publication_month + self.publication_year = publication_year + if related_identifiers is not None: + self.related_identifiers = related_identifiers + + @property + def cid(self): + """Gets the cid of this IdentifierUpdateDto. # noqa: E501 + + + :return: The cid of this IdentifierUpdateDto. # noqa: E501 + :rtype: int + """ + return self._cid + + @cid.setter + def cid(self, cid): + """Sets the cid of this IdentifierUpdateDto. + + + :param cid: The cid of this IdentifierUpdateDto. # noqa: E501 + :type: int + """ + if cid is None: + raise ValueError("Invalid value for `cid`, must not be `None`") # noqa: E501 + + self._cid = cid + + @property + def dbid(self): + """Gets the dbid of this IdentifierUpdateDto. # noqa: E501 + + + :return: The dbid of this IdentifierUpdateDto. # noqa: E501 + :rtype: int + """ + return self._dbid + + @dbid.setter + def dbid(self, dbid): + """Sets the dbid of this IdentifierUpdateDto. + + + :param dbid: The dbid of this IdentifierUpdateDto. # noqa: E501 + :type: int + """ + if dbid is None: + raise ValueError("Invalid value for `dbid`, must not be `None`") # noqa: E501 + + self._dbid = dbid + + @property + def qid(self): + """Gets the qid of this IdentifierUpdateDto. # noqa: E501 + + + :return: The qid of this IdentifierUpdateDto. # noqa: E501 + :rtype: int + """ + return self._qid + + @qid.setter + def qid(self, qid): + """Sets the qid of this IdentifierUpdateDto. + + + :param qid: The qid of this IdentifierUpdateDto. # noqa: E501 + :type: int + """ + + self._qid = qid + + @property + def doi(self): + """Gets the doi of this IdentifierUpdateDto. # noqa: E501 + + + :return: The doi of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._doi + + @doi.setter + def doi(self, doi): + """Sets the doi of this IdentifierUpdateDto. + + + :param doi: The doi of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + + self._doi = doi + + @property + def type(self): + """Gets the type of this IdentifierUpdateDto. # noqa: E501 + + + :return: The type of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this IdentifierUpdateDto. + + + :param type: The type of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["database", "subset"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def title(self): + """Gets the title of this IdentifierUpdateDto. # noqa: E501 + + + :return: The title of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this IdentifierUpdateDto. + + + :param title: The title of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + if title is None: + raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 + + self._title = title + + @property + def description(self): + """Gets the description of this IdentifierUpdateDto. # noqa: E501 + + + :return: The description of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this IdentifierUpdateDto. + + + :param description: The description of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def visibility(self): + """Gets the visibility of this IdentifierUpdateDto. # noqa: E501 + + + :return: The visibility of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """Sets the visibility of this IdentifierUpdateDto. + + + :param visibility: The visibility of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + if visibility is None: + raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 + if visibility not in allowed_values: + raise ValueError( + "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 + .format(visibility, allowed_values) + ) + + self._visibility = visibility + + @property + def publisher(self): + """Gets the publisher of this IdentifierUpdateDto. # noqa: E501 + + + :return: The publisher of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._publisher + + @publisher.setter + def publisher(self, publisher): + """Sets the publisher of this IdentifierUpdateDto. + + + :param publisher: The publisher of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + + self._publisher = publisher + + @property + def language(self): + """Gets the language of this IdentifierUpdateDto. # noqa: E501 + + + :return: The language of this IdentifierUpdateDto. # noqa: E501 + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this IdentifierUpdateDto. + + + :param language: The language of this IdentifierUpdateDto. # noqa: E501 + :type: str + """ + allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 + if language not in allowed_values: + raise ValueError( + "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 + .format(language, allowed_values) + ) + + self._language = language + + @property + def license(self): + """Gets the license of this IdentifierUpdateDto. # noqa: E501 + + + :return: The license of this IdentifierUpdateDto. # noqa: E501 + :rtype: LicenseDto + """ + return self._license + + @license.setter + def license(self, license): + """Sets the license of this IdentifierUpdateDto. + + + :param license: The license of this IdentifierUpdateDto. # noqa: E501 + :type: LicenseDto + """ + + self._license = license + + @property + def creators(self): + """Gets the creators of this IdentifierUpdateDto. # noqa: E501 + + + :return: The creators of this IdentifierUpdateDto. # noqa: E501 + :rtype: list[CreatorDto] + """ + return self._creators + + @creators.setter + def creators(self, creators): + """Sets the creators of this IdentifierUpdateDto. + + + :param creators: The creators of this IdentifierUpdateDto. # noqa: E501 + :type: list[CreatorDto] + """ + if creators is None: + raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 + + self._creators = creators + + @property + def publication_day(self): + """Gets the publication_day of this IdentifierUpdateDto. # noqa: E501 + + + :return: The publication_day of this IdentifierUpdateDto. # noqa: E501 + :rtype: int + """ + return self._publication_day + + @publication_day.setter + def publication_day(self, publication_day): + """Sets the publication_day of this IdentifierUpdateDto. + + + :param publication_day: The publication_day of this IdentifierUpdateDto. # noqa: E501 + :type: int + """ + + self._publication_day = publication_day + + @property + def publication_month(self): + """Gets the publication_month of this IdentifierUpdateDto. # noqa: E501 + + + :return: The publication_month of this IdentifierUpdateDto. # noqa: E501 + :rtype: int + """ + return self._publication_month + + @publication_month.setter + def publication_month(self, publication_month): + """Sets the publication_month of this IdentifierUpdateDto. + + + :param publication_month: The publication_month of this IdentifierUpdateDto. # noqa: E501 + :type: int + """ + + self._publication_month = publication_month + + @property + def publication_year(self): + """Gets the publication_year of this IdentifierUpdateDto. # noqa: E501 + + + :return: The publication_year of this IdentifierUpdateDto. # noqa: E501 + :rtype: int + """ + return self._publication_year + + @publication_year.setter + def publication_year(self, publication_year): + """Sets the publication_year of this IdentifierUpdateDto. + + + :param publication_year: The publication_year of this IdentifierUpdateDto. # noqa: E501 + :type: int + """ + if publication_year is None: + raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 + + self._publication_year = publication_year + + @property + def related_identifiers(self): + """Gets the related_identifiers of this IdentifierUpdateDto. # noqa: E501 + + + :return: The related_identifiers of this IdentifierUpdateDto. # noqa: E501 + :rtype: list[RelatedIdentifierCreateDto] + """ + return self._related_identifiers + + @related_identifiers.setter + def related_identifiers(self, related_identifiers): + """Sets the related_identifiers of this IdentifierUpdateDto. + + + :param related_identifiers: The related_identifiers of this IdentifierUpdateDto. # noqa: E501 + :type: list[RelatedIdentifierCreateDto] + """ + + self._related_identifiers = related_identifiers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IdentifierUpdateDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IdentifierUpdateDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py b/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py index 10de0500d5e7b6c5d9dae50d2046c2e960274a2b..fc88c7aca6ea4e640afcdb6864f586743a5d2220 100644 --- a/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py +++ b/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py @@ -33,9 +33,9 @@ class OaiListIdentifiersParameters(object): 'until': 'str', 'set': 'str', 'resumption_token': 'str', - 'parameters_string': 'str', 'from_date': 'datetime', - 'until_date': 'datetime' + 'until_date': 'datetime', + 'parameters_string': 'str' } attribute_map = { @@ -44,21 +44,21 @@ class OaiListIdentifiersParameters(object): 'until': 'until', 'set': 'set', 'resumption_token': 'resumptionToken', - 'parameters_string': 'parametersString', 'from_date': 'fromDate', - 'until_date': 'untilDate' + 'until_date': 'untilDate', + 'parameters_string': 'parametersString' } - def __init__(self, metadata_prefix=None, _from=None, until=None, set=None, resumption_token=None, parameters_string=None, from_date=None, until_date=None): # noqa: E501 + def __init__(self, metadata_prefix=None, _from=None, until=None, set=None, resumption_token=None, from_date=None, until_date=None, parameters_string=None): # noqa: E501 """OaiListIdentifiersParameters - a model defined in Swagger""" # noqa: E501 self._metadata_prefix = None self.__from = None self._until = None self._set = None self._resumption_token = None - self._parameters_string = None self._from_date = None self._until_date = None + self._parameters_string = None self.discriminator = None if metadata_prefix is not None: self.metadata_prefix = metadata_prefix @@ -70,12 +70,12 @@ class OaiListIdentifiersParameters(object): self.set = set if resumption_token is not None: self.resumption_token = resumption_token - if parameters_string is not None: - self.parameters_string = parameters_string if from_date is not None: self.from_date = from_date if until_date is not None: self.until_date = until_date + if parameters_string is not None: + self.parameters_string = parameters_string @property def metadata_prefix(self): @@ -182,27 +182,6 @@ class OaiListIdentifiersParameters(object): self._resumption_token = resumption_token - @property - def parameters_string(self): - """Gets the parameters_string of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The parameters_string of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: str - """ - return self._parameters_string - - @parameters_string.setter - def parameters_string(self, parameters_string): - """Sets the parameters_string of this OaiListIdentifiersParameters. - - - :param parameters_string: The parameters_string of this OaiListIdentifiersParameters. # noqa: E501 - :type: str - """ - - self._parameters_string = parameters_string - @property def from_date(self): """Gets the from_date of this OaiListIdentifiersParameters. # noqa: E501 @@ -245,6 +224,27 @@ class OaiListIdentifiersParameters(object): self._until_date = until_date + @property + def parameters_string(self): + """Gets the parameters_string of this OaiListIdentifiersParameters. # noqa: E501 + + + :return: The parameters_string of this OaiListIdentifiersParameters. # noqa: E501 + :rtype: str + """ + return self._parameters_string + + @parameters_string.setter + def parameters_string(self, parameters_string): + """Sets the parameters_string of this OaiListIdentifiersParameters. + + + :param parameters_string: The parameters_string of this OaiListIdentifiersParameters. # noqa: E501 + :type: str + """ + + self._parameters_string = parameters_string + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_query/__init__.py b/swagger/api/api_query/__init__.py index a36aab6e204a1b651ce6dcf493c71d704ff85256..c8bac1979428186a59bd534ace5f47806bf0a94a 100644 --- a/swagger/api/api_query/__init__.py +++ b/swagger/api/api_query/__init__.py @@ -28,16 +28,19 @@ from api_query.configuration import Configuration from api_query.models.api_error_dto import ApiErrorDto from api_query.models.column_brief_dto import ColumnBriefDto from api_query.models.container_dto import ContainerDto +from api_query.models.creator_brief_dto import CreatorBriefDto from api_query.models.creator_dto import CreatorDto from api_query.models.database_access_dto import DatabaseAccessDto from api_query.models.database_dto import DatabaseDto from api_query.models.execute_statement_dto import ExecuteStatementDto +from api_query.models.identifier_brief_dto import IdentifierBriefDto from api_query.models.identifier_dto import IdentifierDto from api_query.models.image_brief_dto import ImageBriefDto from api_query.models.image_date_dto import ImageDateDto from api_query.models.image_dto import ImageDto from api_query.models.import_dto import ImportDto from api_query.models.license_dto import LicenseDto +from api_query.models.query_brief_dto import QueryBriefDto from api_query.models.query_dto import QueryDto from api_query.models.query_result_dto import QueryResultDto from api_query.models.related_identifier_dto import RelatedIdentifierDto @@ -45,6 +48,7 @@ from api_query.models.table_brief_dto import TableBriefDto from api_query.models.table_csv_delete_dto import TableCsvDeleteDto from api_query.models.table_csv_dto import TableCsvDto from api_query.models.table_csv_update_dto import TableCsvUpdateDto +from api_query.models.table_history_dto import TableHistoryDto from api_query.models.user_attribute_dto import UserAttributeDto from api_query.models.user_brief_dto import UserBriefDto from api_query.models.user_dto import UserDto diff --git a/swagger/api/api_query/api/__init__.py b/swagger/api/api_query/api/__init__.py index 9bfad55219d9b25067e92b18090783d26da8f795..eef04da51c4146f817c9fd0aafcf53dce05dd4d9 100644 --- a/swagger/api/api_query/api/__init__.py +++ b/swagger/api/api_query/api/__init__.py @@ -3,9 +3,9 @@ from __future__ import absolute_import # flake8: noqa # import apis into api package -from swagger_client.api.export_endpoint_api import ExportEndpointApi -from swagger_client.api.query_endpoint_api import QueryEndpointApi -from swagger_client.api.store_endpoint_api import StoreEndpointApi -from swagger_client.api.table_data_endpoint_api import TableDataEndpointApi -from swagger_client.api.table_history_endpoint_api import TableHistoryEndpointApi -from swagger_client.api.view_endpoint_api import ViewEndpointApi +from api_query.api.export_endpoint_api import ExportEndpointApi +from api_query.api.query_endpoint_api import QueryEndpointApi +from api_query.api.store_endpoint_api import StoreEndpointApi +from api_query.api.table_data_endpoint_api import TableDataEndpointApi +from api_query.api.table_history_endpoint_api import TableHistoryEndpointApi +from api_query.api.view_endpoint_api import ViewEndpointApi diff --git a/swagger/api/api_query/api/export_endpoint_api.py b/swagger/api/api_query/api/export_endpoint_api.py index bd63bf3b5e55e082028f8ff22b5733c1a7c72936..ab2ef340325505beed9da949eac3a87e0c47df96 100644 --- a/swagger/api/api_query/api/export_endpoint_api.py +++ b/swagger/api/api_query/api/export_endpoint_api.py @@ -17,7 +17,7 @@ import re # noqa: F401 # python 2 and python 3 compatibility library import six -from swagger_client.api_client import ApiClient +from api_query.api_client import ApiClient class ExportEndpointApi(object): diff --git a/swagger/api/api_query/api/query_endpoint_api.py b/swagger/api/api_query/api/query_endpoint_api.py index b07abd5777d1f903670721bf99ea60f53d482577..16d0c3df11fccd86961b31f520f454dbad91c8e6 100644 --- a/swagger/api/api_query/api/query_endpoint_api.py +++ b/swagger/api/api_query/api/query_endpoint_api.py @@ -17,7 +17,7 @@ import re # noqa: F401 # python 2 and python 3 compatibility library import six -from swagger_client.api_client import ApiClient +from api_query.api_client import ApiClient class QueryEndpointApi(object): diff --git a/swagger/api/api_query/api/store_endpoint_api.py b/swagger/api/api_query/api/store_endpoint_api.py index 352718b049b017dbcd95ae94c7b90e4ea2b5822c..e858fd277ade19b718d3baf2677a113ccd01bcc5 100644 --- a/swagger/api/api_query/api/store_endpoint_api.py +++ b/swagger/api/api_query/api/store_endpoint_api.py @@ -17,7 +17,7 @@ import re # noqa: F401 # python 2 and python 3 compatibility library import six -from swagger_client.api_client import ApiClient +from api_query.api_client import ApiClient class StoreEndpointApi(object): @@ -153,7 +153,7 @@ class StoreEndpointApi(object): :param int id: (required) :param int database_id: (required) :param bool persisted: - :return: str + :return: list[QueryBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -176,7 +176,7 @@ class StoreEndpointApi(object): :param int id: (required) :param int database_id: (required) :param bool persisted: - :return: str + :return: list[QueryBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -238,7 +238,7 @@ class StoreEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[QueryBriefDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_query/api/table_data_endpoint_api.py b/swagger/api/api_query/api/table_data_endpoint_api.py index 5814165c9aba918251719fe4e3fa9ab7936f144b..83a382d7ff0bca1d6173af5d95e74c3373e39174 100644 --- a/swagger/api/api_query/api/table_data_endpoint_api.py +++ b/swagger/api/api_query/api/table_data_endpoint_api.py @@ -17,7 +17,7 @@ import re # noqa: F401 # python 2 and python 3 compatibility library import six -from swagger_client.api_client import ApiClient +from api_query.api_client import ApiClient class TableDataEndpointApi(object): @@ -263,7 +263,7 @@ class TableDataEndpointApi(object): auth_settings = ['bearerAuth'] # noqa: E501 return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'HEAD', + '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'GET', path_params, query_params, header_params, @@ -392,7 +392,7 @@ class TableDataEndpointApi(object): auth_settings = ['bearerAuth'] # noqa: E501 return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'GET', + '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'HEAD', path_params, query_params, header_params, diff --git a/swagger/api/api_query/api/table_history_endpoint_api.py b/swagger/api/api_query/api/table_history_endpoint_api.py index 95949e03e46408064aa084b34cb8f323cd044a3c..c5d0d510f7da8a6e170281442bfcf21e61cb3f03 100644 --- a/swagger/api/api_query/api/table_history_endpoint_api.py +++ b/swagger/api/api_query/api/table_history_endpoint_api.py @@ -17,7 +17,7 @@ import re # noqa: F401 # python 2 and python 3 compatibility library import six -from swagger_client.api_client import ApiClient +from api_query.api_client import ApiClient class TableHistoryEndpointApi(object): @@ -44,7 +44,7 @@ class TableHistoryEndpointApi(object): :param int id: (required) :param int database_id: (required) :param int table_id: (required) - :return: str + :return: list[TableHistoryDto] If the method is called asynchronously, returns the request thread. """ @@ -67,7 +67,7 @@ class TableHistoryEndpointApi(object): :param int id: (required) :param int database_id: (required) :param int table_id: (required) - :return: str + :return: list[TableHistoryDto] If the method is called asynchronously, returns the request thread. """ @@ -126,14 +126,14 @@ class TableHistoryEndpointApi(object): auth_settings = ['bearerAuth'] # noqa: E501 return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'HEAD', + '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[TableHistoryDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -153,7 +153,7 @@ class TableHistoryEndpointApi(object): :param int id: (required) :param int database_id: (required) :param int table_id: (required) - :return: str + :return: list[TableHistoryDto] If the method is called asynchronously, returns the request thread. """ @@ -176,7 +176,7 @@ class TableHistoryEndpointApi(object): :param int id: (required) :param int database_id: (required) :param int table_id: (required) - :return: str + :return: list[TableHistoryDto] If the method is called asynchronously, returns the request thread. """ @@ -235,14 +235,14 @@ class TableHistoryEndpointApi(object): auth_settings = ['bearerAuth'] # noqa: E501 return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'GET', + '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'HEAD', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[TableHistoryDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_query/api/view_endpoint_api.py b/swagger/api/api_query/api/view_endpoint_api.py index de4ad15d8e46ea8aaea95b3310c879ea08be6b8e..fa07cd3ac59e153fdead4aaa20ddbcf17eebe80a 100644 --- a/swagger/api/api_query/api/view_endpoint_api.py +++ b/swagger/api/api_query/api/view_endpoint_api.py @@ -17,7 +17,7 @@ import re # noqa: F401 # python 2 and python 3 compatibility library import six -from swagger_client.api_client import ApiClient +from api_query.api_client import ApiClient class ViewEndpointApi(object): @@ -600,7 +600,7 @@ class ViewEndpointApi(object): :param async_req bool :param int id: (required) :param int database_id: (required) - :return: str + :return: list[ViewBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -622,7 +622,7 @@ class ViewEndpointApi(object): :param async_req bool :param int id: (required) :param int database_id: (required) - :return: str + :return: list[ViewBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -682,7 +682,7 @@ class ViewEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[ViewBriefDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_query/configuration.py b/swagger/api/api_query/configuration.py index e6c7c7dba2189531acf5181d0f0a2963615cd11d..2268056caefa568017d366a1510177a002e9976b 100644 --- a/swagger/api/api_query/configuration.py +++ b/swagger/api/api_query/configuration.py @@ -46,7 +46,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): def __init__(self): """Constructor""" # Default Base url - self.host = "http://localhost:9093" + self.host = "http://localhost:9095" # Temp file folder for downloading files self.temp_folder_path = None @@ -63,7 +63,7 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)): self.password = "" # Logging Settings self.logger = {} - self.logger["package_logger"] = logging.getLogger("swagger_client") + self.logger["package_logger"] = logging.getLogger("api_query") self.logger["urllib3_logger"] = logging.getLogger("urllib3") # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' diff --git a/swagger/api/api_query/models/__init__.py b/swagger/api/api_query/models/__init__.py index b967f62366eb7f16caa05d13a461971536d810af..ee1d231c2f899aee7c9a62a19f19827bb740c865 100644 --- a/swagger/api/api_query/models/__init__.py +++ b/swagger/api/api_query/models/__init__.py @@ -17,16 +17,19 @@ from __future__ import absolute_import from api_query.models.api_error_dto import ApiErrorDto from api_query.models.column_brief_dto import ColumnBriefDto from api_query.models.container_dto import ContainerDto +from api_query.models.creator_brief_dto import CreatorBriefDto from api_query.models.creator_dto import CreatorDto from api_query.models.database_access_dto import DatabaseAccessDto from api_query.models.database_dto import DatabaseDto from api_query.models.execute_statement_dto import ExecuteStatementDto +from api_query.models.identifier_brief_dto import IdentifierBriefDto from api_query.models.identifier_dto import IdentifierDto from api_query.models.image_brief_dto import ImageBriefDto from api_query.models.image_date_dto import ImageDateDto from api_query.models.image_dto import ImageDto from api_query.models.import_dto import ImportDto from api_query.models.license_dto import LicenseDto +from api_query.models.query_brief_dto import QueryBriefDto from api_query.models.query_dto import QueryDto from api_query.models.query_result_dto import QueryResultDto from api_query.models.related_identifier_dto import RelatedIdentifierDto @@ -34,6 +37,7 @@ from api_query.models.table_brief_dto import TableBriefDto from api_query.models.table_csv_delete_dto import TableCsvDeleteDto from api_query.models.table_csv_dto import TableCsvDto from api_query.models.table_csv_update_dto import TableCsvUpdateDto +from api_query.models.table_history_dto import TableHistoryDto from api_query.models.user_attribute_dto import UserAttributeDto from api_query.models.user_brief_dto import UserBriefDto from api_query.models.user_dto import UserDto diff --git a/swagger/api/api_query/models/api_error_dto.py b/swagger/api/api_query/models/api_error_dto.py index ab6998e3ebf32d19fb2d10c7ba56649a0b097b66..218e194d0287dd71cabb5a0bf9ad2689a254fd65 100644 --- a/swagger/api/api_query/models/api_error_dto.py +++ b/swagger/api/api_query/models/api_error_dto.py @@ -69,7 +69,7 @@ class ApiErrorDto(object): """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_query/models/column_brief_dto.py b/swagger/api/api_query/models/column_brief_dto.py index a60f9a189b636dfd281c5ad101a8ceae2977e2a9..cd3cd68dd0dd280730038608e0ed1c4d7f1e1e59 100644 --- a/swagger/api/api_query/models/column_brief_dto.py +++ b/swagger/api/api_query/models/column_brief_dto.py @@ -30,6 +30,8 @@ class ColumnBriefDto(object): swagger_types = { 'id': 'int', 'name': 'str', + 'database_id': 'int', + 'table_id': 'int', 'internal_name': 'str', 'column_type': 'str' } @@ -37,19 +39,25 @@ class ColumnBriefDto(object): attribute_map = { 'id': 'id', 'name': 'name', + 'database_id': 'database_id', + 'table_id': 'table_id', 'internal_name': 'internal_name', 'column_type': 'column_type' } - def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None + self._database_id = None + self._table_id = None self._internal_name = None self._column_type = None self.discriminator = None self.id = id self.name = name + self.database_id = database_id + self.table_id = table_id self.internal_name = internal_name self.column_type = column_type @@ -99,6 +107,52 @@ class ColumnBriefDto(object): self._name = name + @property + def database_id(self): + """Gets the database_id of this ColumnBriefDto. # noqa: E501 + + + :return: The database_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this ColumnBriefDto. + + + :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this ColumnBriefDto. # noqa: E501 + + + :return: The table_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this ColumnBriefDto. + + + :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + @property def internal_name(self): """Gets the internal_name of this ColumnBriefDto. # noqa: E501 diff --git a/swagger/api/api_query/models/creator_brief_dto.py b/swagger/api/api_query/models/creator_brief_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..b234e4d9931fb051c0e841c6fe749011fd26db52 --- /dev/null +++ b/swagger/api/api_query/models/creator_brief_dto.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Database Repository Query Service API + + Service that manages the queries # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class CreatorBriefDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'firstname': 'str', + 'lastname': 'str', + 'affiliation': 'str' + } + + attribute_map = { + 'firstname': 'firstname', + 'lastname': 'lastname', + 'affiliation': 'affiliation' + } + + def __init__(self, firstname=None, lastname=None, affiliation=None): # noqa: E501 + """CreatorBriefDto - a model defined in Swagger""" # noqa: E501 + self._firstname = None + self._lastname = None + self._affiliation = None + self.discriminator = None + self.firstname = firstname + self.lastname = lastname + if affiliation is not None: + self.affiliation = affiliation + + @property + def firstname(self): + """Gets the firstname of this CreatorBriefDto. # noqa: E501 + + + :return: The firstname of this CreatorBriefDto. # noqa: E501 + :rtype: str + """ + return self._firstname + + @firstname.setter + def firstname(self, firstname): + """Sets the firstname of this CreatorBriefDto. + + + :param firstname: The firstname of this CreatorBriefDto. # noqa: E501 + :type: str + """ + if firstname is None: + raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 + + self._firstname = firstname + + @property + def lastname(self): + """Gets the lastname of this CreatorBriefDto. # noqa: E501 + + + :return: The lastname of this CreatorBriefDto. # noqa: E501 + :rtype: str + """ + return self._lastname + + @lastname.setter + def lastname(self, lastname): + """Sets the lastname of this CreatorBriefDto. + + + :param lastname: The lastname of this CreatorBriefDto. # noqa: E501 + :type: str + """ + if lastname is None: + raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 + + self._lastname = lastname + + @property + def affiliation(self): + """Gets the affiliation of this CreatorBriefDto. # noqa: E501 + + + :return: The affiliation of this CreatorBriefDto. # noqa: E501 + :rtype: str + """ + return self._affiliation + + @affiliation.setter + def affiliation(self, affiliation): + """Sets the affiliation of this CreatorBriefDto. + + + :param affiliation: The affiliation of this CreatorBriefDto. # noqa: E501 + :type: str + """ + + self._affiliation = affiliation + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreatorBriefDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatorBriefDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_query/models/creator_dto.py b/swagger/api/api_query/models/creator_dto.py index a7c9d92420ee5243c566ac40717714d83e4edfd0..383e4e6562bd928d6a5511a3c4be96aab8c4bfc4 100644 --- a/swagger/api/api_query/models/creator_dto.py +++ b/swagger/api/api_query/models/creator_dto.py @@ -32,9 +32,7 @@ class CreatorDto(object): 'firstname': 'str', 'lastname': 'str', 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' + 'orcid': 'str' } attribute_map = { @@ -42,20 +40,16 @@ class CreatorDto(object): 'firstname': 'firstname', 'lastname': 'lastname', 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' + 'orcid': 'orcid' } - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 """CreatorDto - a model defined in Swagger""" # noqa: E501 self._id = None self._firstname = None self._lastname = None self._affiliation = None self._orcid = None - self._created = None - self._last_modified = None self.discriminator = None self.id = id self.firstname = firstname @@ -64,10 +58,6 @@ class CreatorDto(object): self.affiliation = affiliation if orcid is not None: self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified @property def id(self): @@ -180,48 +170,6 @@ class CreatorDto(object): self._orcid = orcid - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_query/models/identifier_brief_dto.py b/swagger/api/api_query/models/identifier_brief_dto.py index 32acb76c29082049f5dcd1299ce43212302221fa..31a92e0b944d37f4eec2a31b6d1ac29f70bd2ca4 100644 --- a/swagger/api/api_query/models/identifier_brief_dto.py +++ b/swagger/api/api_query/models/identifier_brief_dto.py @@ -5,7 +5,7 @@ Service that manages the queries # noqa: E501 - OpenAPI spec version: 1.1.0-alpha + OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -31,46 +31,54 @@ class IdentifierBriefDto(object): 'id': 'int', 'title': 'str', 'type': 'str', - 'created': 'datetime', - 'last_modified': 'datetime', + 'doi': 'str', + 'publisher': 'str', + 'creators': 'list[CreatorBriefDto]', 'container_id': 'int', 'database_id': 'int', - 'query_id': 'int' + 'query_id': 'int', + 'publication_year': 'int' } attribute_map = { 'id': 'id', 'title': 'title', 'type': 'type', - 'created': 'created', - 'last_modified': 'lastModified', + 'doi': 'doi', + 'publisher': 'publisher', + 'creators': 'creators', 'container_id': 'container id', 'database_id': 'database id', - 'query_id': 'query id' + 'query_id': 'query id', + 'publication_year': 'publication_year' } - def __init__(self, id=None, title=None, type=None, created=None, last_modified=None, container_id=None, database_id=None, query_id=None): # noqa: E501 + def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 """IdentifierBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._title = None self._type = None - self._created = None - self._last_modified = None + self._doi = None + self._publisher = None + self._creators = None self._container_id = None self._database_id = None self._query_id = None + self._publication_year = None self.discriminator = None self.id = id self.title = title self.type = type - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified + if doi is not None: + self.doi = doi + if publisher is not None: + self.publisher = publisher + self.creators = creators self.container_id = container_id self.database_id = database_id if query_id is not None: self.query_id = query_id + self.publication_year = publication_year @property def id(self): @@ -148,46 +156,69 @@ class IdentifierBriefDto(object): self._type = type @property - def created(self): - """Gets the created of this IdentifierBriefDto. # noqa: E501 + def doi(self): + """Gets the doi of this IdentifierBriefDto. # noqa: E501 - :return: The created of this IdentifierBriefDto. # noqa: E501 - :rtype: datetime + :return: The doi of this IdentifierBriefDto. # noqa: E501 + :rtype: str + """ + return self._doi + + @doi.setter + def doi(self, doi): + """Sets the doi of this IdentifierBriefDto. + + + :param doi: The doi of this IdentifierBriefDto. # noqa: E501 + :type: str + """ + + self._doi = doi + + @property + def publisher(self): + """Gets the publisher of this IdentifierBriefDto. # noqa: E501 + + + :return: The publisher of this IdentifierBriefDto. # noqa: E501 + :rtype: str """ - return self._created + return self._publisher - @created.setter - def created(self, created): - """Sets the created of this IdentifierBriefDto. + @publisher.setter + def publisher(self, publisher): + """Sets the publisher of this IdentifierBriefDto. - :param created: The created of this IdentifierBriefDto. # noqa: E501 - :type: datetime + :param publisher: The publisher of this IdentifierBriefDto. # noqa: E501 + :type: str """ - self._created = created + self._publisher = publisher @property - def last_modified(self): - """Gets the last_modified of this IdentifierBriefDto. # noqa: E501 + def creators(self): + """Gets the creators of this IdentifierBriefDto. # noqa: E501 - :return: The last_modified of this IdentifierBriefDto. # noqa: E501 - :rtype: datetime + :return: The creators of this IdentifierBriefDto. # noqa: E501 + :rtype: list[CreatorBriefDto] """ - return self._last_modified + return self._creators - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierBriefDto. + @creators.setter + def creators(self, creators): + """Sets the creators of this IdentifierBriefDto. - :param last_modified: The last_modified of this IdentifierBriefDto. # noqa: E501 - :type: datetime + :param creators: The creators of this IdentifierBriefDto. # noqa: E501 + :type: list[CreatorBriefDto] """ + if creators is None: + raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - self._last_modified = last_modified + self._creators = creators @property def container_id(self): @@ -256,6 +287,29 @@ class IdentifierBriefDto(object): self._query_id = query_id + @property + def publication_year(self): + """Gets the publication_year of this IdentifierBriefDto. # noqa: E501 + + + :return: The publication_year of this IdentifierBriefDto. # noqa: E501 + :rtype: int + """ + return self._publication_year + + @publication_year.setter + def publication_year(self, publication_year): + """Sets the publication_year of this IdentifierBriefDto. + + + :param publication_year: The publication_year of this IdentifierBriefDto. # noqa: E501 + :type: int + """ + if publication_year is None: + raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 + + self._publication_year = publication_year + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_query/models/identifier_dto.py b/swagger/api/api_query/models/identifier_dto.py index d8467c6d106f95e669f4dd4d1c24c2bac893d007..d7b31a9b2ff8894896ef54f52ac0f93f1ca3e220 100644 --- a/swagger/api/api_query/models/identifier_dto.py +++ b/swagger/api/api_query/models/identifier_dto.py @@ -309,7 +309,7 @@ class IdentifierDto(object): """ if visibility is None: raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_query/models/image_brief_dto.py b/swagger/api/api_query/models/image_brief_dto.py index 92f7bc72a1a89cbf4a75a6deae35407d07c5b7b7..7ad406d6e858ac3ae0fdef7f3e735c501ebf5660 100644 --- a/swagger/api/api_query/models/image_brief_dto.py +++ b/swagger/api/api_query/models/image_brief_dto.py @@ -29,23 +29,27 @@ class ImageBriefDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str' } attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag' } - def __init__(self, id=None, repository=None, tag=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 """ImageBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag @@ -72,6 +76,29 @@ class ImageBriefDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageBriefDto. # noqa: E501 + + + :return: The registry of this ImageBriefDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageBriefDto. + + + :param registry: The registry of this ImageBriefDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageBriefDto. # noqa: E501 diff --git a/swagger/api/api_query/models/image_dto.py b/swagger/api/api_query/models/image_dto.py index 34675e1b8de68db8a0dc16960ee2710697395a0a..096b9c11cf7ef0ff268b0142fa3b990885be89f1 100644 --- a/swagger/api/api_query/models/image_dto.py +++ b/swagger/api/api_query/models/image_dto.py @@ -29,6 +29,7 @@ class ImageDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str', 'dialect': 'str', @@ -43,6 +44,7 @@ class ImageDto(object): attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag', 'dialect': 'dialect', @@ -55,9 +57,10 @@ class ImageDto(object): 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self._dialect = None @@ -70,6 +73,7 @@ class ImageDto(object): self._default_port = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag self.dialect = dialect @@ -108,6 +112,29 @@ class ImageDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageDto. # noqa: E501 + + + :return: The registry of this ImageDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageDto. + + + :param registry: The registry of this ImageDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_query/models/query_brief_dto.py b/swagger/api/api_query/models/query_brief_dto.py index 059107af6d6708e2b178292bbd23ebaeedd2270d..3bdb95a1a11139671829f928b0f00582128c6300 100644 --- a/swagger/api/api_query/models/query_brief_dto.py +++ b/swagger/api/api_query/models/query_brief_dto.py @@ -5,7 +5,7 @@ Service that manages the queries # noqa: E501 - OpenAPI spec version: 1.1.0-alpha + OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger/api/api_query/models/table_brief_dto.py b/swagger/api/api_query/models/table_brief_dto.py index e55f3441a8d7137ec94a0d75d699305c8b82b685..a719d849392db17ba6ed9a8e3f870421e1e8d871 100644 --- a/swagger/api/api_query/models/table_brief_dto.py +++ b/swagger/api/api_query/models/table_brief_dto.py @@ -31,7 +31,7 @@ class TableBriefDto(object): 'id': 'int', 'name': 'str', 'description': 'str', - 'creator': 'UserBriefDto', + 'owner': 'UserBriefDto', 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,24 +40,24 @@ class TableBriefDto(object): 'id': 'id', 'name': 'name', 'description': 'description', - 'creator': 'creator', + 'owner': 'owner', 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, columns=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 """TableBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._description = None - self._creator = None + self._owner = None self._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description - self.creator = creator + self.owner = owner self.columns = columns self.internal_name = internal_name @@ -131,27 +131,27 @@ class TableBriefDto(object): self._description = description @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 + def owner(self): + """Gets the owner of this TableBriefDto. # noqa: E501 - :return: The creator of this TableBriefDto. # noqa: E501 + :return: The owner of this TableBriefDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._owner - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. + @owner.setter + def owner(self, owner): + """Sets the owner of this TableBriefDto. - :param creator: The creator of this TableBriefDto. # noqa: E501 + :param owner: The owner of this TableBriefDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - self._creator = creator + self._owner = owner @property def columns(self): diff --git a/swagger/api/api_query/models/table_history_dto.py b/swagger/api/api_query/models/table_history_dto.py index b79219069f8c2c1bfa1ab248fb85fdd5642d816c..c1445489fe9590f8f731aa7cd9bf0b635911473f 100644 --- a/swagger/api/api_query/models/table_history_dto.py +++ b/swagger/api/api_query/models/table_history_dto.py @@ -5,7 +5,7 @@ Service that manages the queries # noqa: E501 - OpenAPI spec version: 1.1.0-alpha + OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/swagger/api/api_semantics/__init__.py b/swagger/api/api_semantics/__init__.py index 55bda9de00c0ecd27bd17774123e26e216b81a44..6f9594aff98ff4fb662b47432b371af66b755448 100644 --- a/swagger/api/api_semantics/__init__.py +++ b/swagger/api/api_semantics/__init__.py @@ -3,9 +3,9 @@ # flake8: noqa """ - Database Repository Unit / Ontology Service API + Database Repository Semantic Service API - Service for assigning concepts to database tables and columns. # noqa: E501 + Service that manages the tables # noqa: E501 OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at @@ -15,14 +15,23 @@ from __future__ import absolute_import # import apis into sdk package -from api_semantics.api.concepts_endpoint_api import ConceptsEndpointApi -from api_semantics.api.ontologies_endpoint_api import OntologiesEndpointApi -from api_semantics.api.units_endpoint_api import UnitsEndpointApi +from api_semantics.api.ontology_endpoint_api import OntologyEndpointApi +from api_semantics.api.query_endpoint_api import QueryEndpointApi +from api_semantics.api.semantics_endpoint_api import SemanticsEndpointApi +from api_semantics.api.table_endpoint_api import TableEndpointApi # import ApiClient from api_semantics.api_client import ApiClient from api_semantics.configuration import Configuration # import models into sdk package -from api_semantics.models.semantics_concept_body import SemanticsConceptBody -from api_semantics.models.semantics_concept_body1 import SemanticsConceptBody1 -from api_semantics.models.semantics_unit_body import SemanticsUnitBody -from api_semantics.models.semantics_unit_body1 import SemanticsUnitBody1 +from api_semantics.models.api_error_dto import ApiErrorDto +from api_semantics.models.column_brief_dto import ColumnBriefDto +from api_semantics.models.concept_dto import ConceptDto +from api_semantics.models.concept_save_dto import ConceptSaveDto +from api_semantics.models.entity_dto import EntityDto +from api_semantics.models.ontology_create_dto import OntologyCreateDto +from api_semantics.models.ontology_dto import OntologyDto +from api_semantics.models.ontology_modify_dto import OntologyModifyDto +from api_semantics.models.table_column_entity_dto import TableColumnEntityDto +from api_semantics.models.unit_dto import UnitDto +from api_semantics.models.unit_save_dto import UnitSaveDto +from api_semantics.models.user_brief_dto import UserBriefDto diff --git a/swagger/api/api_semantics/api/__init__.py b/swagger/api/api_semantics/api/__init__.py index ac02c2709eec9d1c38feb888c0bb3ef2d8af7e3d..3c29f9091930b3e3a770db87e0aaf89bf2040ae1 100644 --- a/swagger/api/api_semantics/api/__init__.py +++ b/swagger/api/api_semantics/api/__init__.py @@ -3,6 +3,7 @@ from __future__ import absolute_import # flake8: noqa # import apis into api package -from api_semantics.api.concepts_endpoint_api import ConceptsEndpointApi -from api_semantics.api.ontologies_endpoint_api import OntologiesEndpointApi -from api_semantics.api.units_endpoint_api import UnitsEndpointApi +from api_semantics.api.ontology_endpoint_api import OntologyEndpointApi +from api_semantics.api.query_endpoint_api import QueryEndpointApi +from api_semantics.api.semantics_endpoint_api import SemanticsEndpointApi +from api_semantics.api.table_endpoint_api import TableEndpointApi diff --git a/swagger/api/api_semantics/api/ontology_endpoint_api.py b/swagger/api/api_semantics/api/ontology_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..815b92254fc5cb9cdfaef3e50182ca457b1debe9 --- /dev/null +++ b/swagger/api/api_semantics/api/ontology_endpoint_api.py @@ -0,0 +1,506 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from api_semantics.api_client import ApiClient + + +class OntologyEndpointApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create(self, body, **kwargs): # noqa: E501 + """Register a new ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OntologyCreateDto body: (required) + :return: OntologyDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.create_with_http_info(body, **kwargs) # noqa: E501 + return data + + def create_with_http_info(self, body, **kwargs): # noqa: E501 + """Register a new ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OntologyCreateDto body: (required) + :return: OntologyDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/ontology', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OntologyDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete(self, id, **kwargs): # noqa: E501 + """Delete an ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete an ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/ontology/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def find(self, id, **kwargs): # noqa: E501 + """Find one ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: OntologyDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.find_with_http_info(id, **kwargs) # noqa: E501 + return data + + def find_with_http_info(self, id, **kwargs): # noqa: E501 + """Find one ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: OntologyDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `find`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/ontology/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OntologyDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def find_all(self, **kwargs): # noqa: E501 + """List all ontologies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_all(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[OntologyDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_all_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.find_all_with_http_info(**kwargs) # noqa: E501 + return data + + def find_all_with_http_info(self, **kwargs): # noqa: E501 + """List all ontologies # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_all_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[OntologyDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find_all" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/ontology', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OntologyDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update(self, body, id, **kwargs): # noqa: E501 + """Update an ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OntologyModifyDto body: (required) + :param int id: (required) + :return: OntologyDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def update_with_http_info(self, body, id, **kwargs): # noqa: E501 + """Update an ontology # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param OntologyModifyDto body: (required) + :param int id: (required) + :return: OntologyDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/ontology/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OntologyDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/query_endpoint_api.py b/swagger/api/api_semantics/api/query_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..9f301dfd18d13db7582e1c687977923f8344bf30 --- /dev/null +++ b/swagger/api/api_semantics/api/query_endpoint_api.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from api_semantics.api_client import ApiClient + + +class QueryEndpointApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def find1(self, id, **kwargs): # noqa: E501 + """Find entities # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find1(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param str label: + :param str uri: + :return: list[EntityDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find1_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.find1_with_http_info(id, **kwargs) # noqa: E501 + return data + + def find1_with_http_info(self, id, **kwargs): # noqa: E501 + """Find entities # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find1_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :param str label: + :param str uri: + :return: list[EntityDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'label', 'uri'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `find1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'label' in params: + query_params.append(('label', params['label'])) # noqa: E501 + if 'uri' in params: + query_params.append(('uri', params['uri'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/ontology/{id}/entity', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EntityDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/semantics_endpoint_api.py b/swagger/api/api_semantics/api/semantics_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..90b05834173757668f4378f86ee10e9e6e30b518 --- /dev/null +++ b/swagger/api/api_semantics/api/semantics_endpoint_api.py @@ -0,0 +1,397 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from api_semantics.api_client import ApiClient + + +class SemanticsEndpointApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def find_all_concepts(self, **kwargs): # noqa: E501 + """List semantic concepts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_all_concepts(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[ConceptDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_all_concepts_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.find_all_concepts_with_http_info(**kwargs) # noqa: E501 + return data + + def find_all_concepts_with_http_info(self, **kwargs): # noqa: E501 + """List semantic concepts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_all_concepts_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[ConceptDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find_all_concepts" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/concept', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ConceptDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def find_all_units(self, **kwargs): # noqa: E501 + """List semantic units # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_all_units(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[UnitDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find_all_units_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.find_all_units_with_http_info(**kwargs) # noqa: E501 + return data + + def find_all_units_with_http_info(self, **kwargs): # noqa: E501 + """List semantic units # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find_all_units_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[UnitDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find_all_units" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/unit', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[UnitDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_unit(self, body, **kwargs): # noqa: E501 + """Save a semantic unit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_unit(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UnitSaveDto body: (required) + :return: UnitDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_unit_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_unit_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_unit_with_http_info(self, body, **kwargs): # noqa: E501 + """Save a semantic unit # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_unit_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param UnitSaveDto body: (required) + :return: UnitDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_unit" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_unit`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/unit', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnitDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def save_unit1(self, body, **kwargs): # noqa: E501 + """Create or update a semantic concept # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_unit1(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ConceptSaveDto body: (required) + :return: ConceptDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.save_unit1_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.save_unit1_with_http_info(body, **kwargs) # noqa: E501 + return data + + def save_unit1_with_http_info(self, body, **kwargs): # noqa: E501 + """Create or update a semantic concept # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.save_unit1_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param ConceptSaveDto body: (required) + :return: ConceptDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method save_unit1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `save_unit1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/concept', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ConceptDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/table_endpoint_api.py b/swagger/api/api_semantics/api/table_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..09777ca4de535f1ee7f673409b6abed62d64fc90 --- /dev/null +++ b/swagger/api/api_semantics/api/table_endpoint_api.py @@ -0,0 +1,243 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from api_semantics.api_client import ApiClient + + +class TableEndpointApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def analyse_table(self, database_id, table_id, **kwargs): # noqa: E501 + """Suggest table semantics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.analyse_table(database_id, table_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int database_id: (required) + :param int table_id: (required) + :return: list[TableColumnEntityDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.analyse_table_with_http_info(database_id, table_id, **kwargs) # noqa: E501 + else: + (data) = self.analyse_table_with_http_info(database_id, table_id, **kwargs) # noqa: E501 + return data + + def analyse_table_with_http_info(self, database_id, table_id, **kwargs): # noqa: E501 + """Suggest table semantics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.analyse_table_with_http_info(database_id, table_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int database_id: (required) + :param int table_id: (required) + :return: list[TableColumnEntityDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['database_id', 'table_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method analyse_table" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'database_id' is set + if ('database_id' not in params or + params['database_id'] is None): + raise ValueError("Missing the required parameter `database_id` when calling `analyse_table`") # noqa: E501 + # verify the required parameter 'table_id' is set + if ('table_id' not in params or + params['table_id'] is None): + raise ValueError("Missing the required parameter `table_id` when calling `analyse_table`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'database_id' in params: + path_params['databaseId'] = params['database_id'] # noqa: E501 + if 'table_id' in params: + path_params['tableId'] = params['table_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/database/{databaseId}/table/{tableId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TableColumnEntityDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def analyse_table_column(self, database_id, table_id, column_id, **kwargs): # noqa: E501 + """Suggest table column semantics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.analyse_table_column(database_id, table_id, column_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int database_id: (required) + :param int table_id: (required) + :param int column_id: (required) + :return: list[TableColumnEntityDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.analyse_table_column_with_http_info(database_id, table_id, column_id, **kwargs) # noqa: E501 + else: + (data) = self.analyse_table_column_with_http_info(database_id, table_id, column_id, **kwargs) # noqa: E501 + return data + + def analyse_table_column_with_http_info(self, database_id, table_id, column_id, **kwargs): # noqa: E501 + """Suggest table column semantics # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.analyse_table_column_with_http_info(database_id, table_id, column_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int database_id: (required) + :param int table_id: (required) + :param int column_id: (required) + :return: list[TableColumnEntityDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['database_id', 'table_id', 'column_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method analyse_table_column" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'database_id' is set + if ('database_id' not in params or + params['database_id'] is None): + raise ValueError("Missing the required parameter `database_id` when calling `analyse_table_column`") # noqa: E501 + # verify the required parameter 'table_id' is set + if ('table_id' not in params or + params['table_id'] is None): + raise ValueError("Missing the required parameter `table_id` when calling `analyse_table_column`") # noqa: E501 + # verify the required parameter 'column_id' is set + if ('column_id' not in params or + params['column_id'] is None): + raise ValueError("Missing the required parameter `column_id` when calling `analyse_table_column`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'database_id' in params: + path_params['databaseId'] = params['database_id'] # noqa: E501 + if 'table_id' in params: + path_params['tableId'] = params['table_id'] # noqa: E501 + if 'column_id' in params: + path_params['columnId'] = params['column_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearerAuth'] # noqa: E501 + + return self.api_client.call_api( + '/api/semantic/database/{databaseId}/table/{tableId}/column/{columnId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TableColumnEntityDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api_client.py b/swagger/api/api_semantics/api_client.py index 4f23132876230521cc2adb0f5c0fb5af47dd642e..646d0f6ce1e2c792416130cb3c8c5ea62428f1ca 100644 --- a/swagger/api/api_semantics/api_client.py +++ b/swagger/api/api_semantics/api_client.py @@ -1,8 +1,8 @@ # coding: utf-8 """ - Database Repository Unit / Ontology Service API + Database Repository Semantic Service API - Service for assigning concepts to database tables and columns. # noqa: E501 + Service that manages the tables # noqa: E501 OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at diff --git a/swagger/api/api_semantics/configuration.py b/swagger/api/api_semantics/configuration.py index a700f08c069ff64e01672e9482032dceebcece66..df6f84b385bea881c5d1ce884d51d5e2aa900b7c 100644 --- a/swagger/api/api_semantics/configuration.py +++ b/swagger/api/api_semantics/configuration.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Database Repository Unit / Ontology Service API + Database Repository Semantic Service API - Service for assigning concepts to database tables and columns. # noqa: E501 + Service that manages the tables # noqa: E501 OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at diff --git a/swagger/api/api_semantics/models/__init__.py b/swagger/api/api_semantics/models/__init__.py index ffeabe9c49ef59db0bdd67e0aa6dc03b74b1550c..b2b4d6b12fb186573c60cb1446d0d48e4b89c81b 100644 --- a/swagger/api/api_semantics/models/__init__.py +++ b/swagger/api/api_semantics/models/__init__.py @@ -2,9 +2,9 @@ # flake8: noqa """ - Database Repository Unit / Ontology Service API + Database Repository Semantic Service API - Service for assigning concepts to database tables and columns. # noqa: E501 + Service that manages the tables # noqa: E501 OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at @@ -14,7 +14,15 @@ from __future__ import absolute_import # import models into model package -from api_semantics.models.semantics_concept_body import SemanticsConceptBody -from api_semantics.models.semantics_concept_body1 import SemanticsConceptBody1 -from api_semantics.models.semantics_unit_body import SemanticsUnitBody -from api_semantics.models.semantics_unit_body1 import SemanticsUnitBody1 +from api_semantics.models.api_error_dto import ApiErrorDto +from api_semantics.models.column_brief_dto import ColumnBriefDto +from api_semantics.models.concept_dto import ConceptDto +from api_semantics.models.concept_save_dto import ConceptSaveDto +from api_semantics.models.entity_dto import EntityDto +from api_semantics.models.ontology_create_dto import OntologyCreateDto +from api_semantics.models.ontology_dto import OntologyDto +from api_semantics.models.ontology_modify_dto import OntologyModifyDto +from api_semantics.models.table_column_entity_dto import TableColumnEntityDto +from api_semantics.models.unit_dto import UnitDto +from api_semantics.models.unit_save_dto import UnitSaveDto +from api_semantics.models.user_brief_dto import UserBriefDto diff --git a/swagger/api/api_semantics/models/api_error_dto.py b/swagger/api/api_semantics/models/api_error_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..64089fcbe002c455ac7ac810a447883932afdf5e --- /dev/null +++ b/swagger/api/api_semantics/models/api_error_dto.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ApiErrorDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'status': 'str', + 'message': 'str', + 'code': 'str' + } + + attribute_map = { + 'status': 'status', + 'message': 'message', + 'code': 'code' + } + + def __init__(self, status=None, message=None, code=None): # noqa: E501 + """ApiErrorDto - a model defined in Swagger""" # noqa: E501 + self._status = None + self._message = None + self._code = None + self.discriminator = None + self.status = status + self.message = message + self.code = code + + @property + def status(self): + """Gets the status of this ApiErrorDto. # noqa: E501 + + + :return: The status of this ApiErrorDto. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ApiErrorDto. + + + :param status: The status of this ApiErrorDto. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + if status not in allowed_values: + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def message(self): + """Gets the message of this ApiErrorDto. # noqa: E501 + + + :return: The message of this ApiErrorDto. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ApiErrorDto. + + + :param message: The message of this ApiErrorDto. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def code(self): + """Gets the code of this ApiErrorDto. # noqa: E501 + + + :return: The code of this ApiErrorDto. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ApiErrorDto. + + + :param code: The code of this ApiErrorDto. # noqa: E501 + :type: str + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiErrorDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiErrorDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/column_brief_dto.py b/swagger/api/api_semantics/models/column_brief_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..72fc19028605f0098c22380715080bab037e8b2f --- /dev/null +++ b/swagger/api/api_semantics/models/column_brief_dto.py @@ -0,0 +1,252 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ColumnBriefDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'name': 'str', + 'database_id': 'int', + 'table_id': 'int', + 'internal_name': 'str', + 'column_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'database_id': 'database_id', + 'table_id': 'table_id', + 'internal_name': 'internal_name', + 'column_type': 'column_type' + } + + def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 + """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._database_id = None + self._table_id = None + self._internal_name = None + self._column_type = None + self.discriminator = None + self.id = id + self.name = name + self.database_id = database_id + self.table_id = table_id + self.internal_name = internal_name + self.column_type = column_type + + @property + def id(self): + """Gets the id of this ColumnBriefDto. # noqa: E501 + + + :return: The id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ColumnBriefDto. + + + :param id: The id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this ColumnBriefDto. # noqa: E501 + + + :return: The name of this ColumnBriefDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ColumnBriefDto. + + + :param name: The name of this ColumnBriefDto. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def database_id(self): + """Gets the database_id of this ColumnBriefDto. # noqa: E501 + + + :return: The database_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this ColumnBriefDto. + + + :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this ColumnBriefDto. # noqa: E501 + + + :return: The table_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this ColumnBriefDto. + + + :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + + @property + def internal_name(self): + """Gets the internal_name of this ColumnBriefDto. # noqa: E501 + + + :return: The internal_name of this ColumnBriefDto. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ColumnBriefDto. + + + :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 + :type: str + """ + if internal_name is None: + raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 + + self._internal_name = internal_name + + @property + def column_type(self): + """Gets the column_type of this ColumnBriefDto. # noqa: E501 + + + :return: The column_type of this ColumnBriefDto. # noqa: E501 + :rtype: str + """ + return self._column_type + + @column_type.setter + def column_type(self, column_type): + """Sets the column_type of this ColumnBriefDto. + + + :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 + :type: str + """ + if column_type is None: + raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 + allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 + if column_type not in allowed_values: + raise ValueError( + "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 + .format(column_type, allowed_values) + ) + + self._column_type = column_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ColumnBriefDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ColumnBriefDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/concept_dto.py b/swagger/api/api_semantics/models/concept_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..205d6cf984cd74c7b52f8c2b0c1e1b5a6643eeac --- /dev/null +++ b/swagger/api/api_semantics/models/concept_dto.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ConceptDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'name': 'str', + 'description': 'str', + 'created': 'datetime', + 'columns': 'list[ColumnBriefDto]' + } + + attribute_map = { + 'uri': 'uri', + 'name': 'name', + 'description': 'description', + 'created': 'created', + 'columns': 'columns' + } + + def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 + """ConceptDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._name = None + self._description = None + self._created = None + self._columns = None + self.discriminator = None + self.uri = uri + if name is not None: + self.name = name + if description is not None: + self.description = description + self.created = created + self.columns = columns + + @property + def uri(self): + """Gets the uri of this ConceptDto. # noqa: E501 + + + :return: The uri of this ConceptDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this ConceptDto. + + + :param uri: The uri of this ConceptDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def name(self): + """Gets the name of this ConceptDto. # noqa: E501 + + + :return: The name of this ConceptDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ConceptDto. + + + :param name: The name of this ConceptDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this ConceptDto. # noqa: E501 + + + :return: The description of this ConceptDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ConceptDto. + + + :param description: The description of this ConceptDto. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created(self): + """Gets the created of this ConceptDto. # noqa: E501 + + + :return: The created of this ConceptDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ConceptDto. + + + :param created: The created of this ConceptDto. # noqa: E501 + :type: datetime + """ + if created is None: + raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 + + self._created = created + + @property + def columns(self): + """Gets the columns of this ConceptDto. # noqa: E501 + + + :return: The columns of this ConceptDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this ConceptDto. + + + :param columns: The columns of this ConceptDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ConceptDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConceptDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/concept_save_dto.py b/swagger/api/api_semantics/models/concept_save_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..68ce0d74eefedb5151d27e9d5e2481c1ec92a7b0 --- /dev/null +++ b/swagger/api/api_semantics/models/concept_save_dto.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ConceptSaveDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'name': 'str', + 'description': 'str' + } + + attribute_map = { + 'uri': 'uri', + 'name': 'name', + 'description': 'description' + } + + def __init__(self, uri=None, name=None, description=None): # noqa: E501 + """ConceptSaveDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._name = None + self._description = None + self.discriminator = None + self.uri = uri + self.name = name + self.description = description + + @property + def uri(self): + """Gets the uri of this ConceptSaveDto. # noqa: E501 + + + :return: The uri of this ConceptSaveDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this ConceptSaveDto. + + + :param uri: The uri of this ConceptSaveDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def name(self): + """Gets the name of this ConceptSaveDto. # noqa: E501 + + + :return: The name of this ConceptSaveDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ConceptSaveDto. + + + :param name: The name of this ConceptSaveDto. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this ConceptSaveDto. # noqa: E501 + + + :return: The description of this ConceptSaveDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ConceptSaveDto. + + + :param description: The description of this ConceptSaveDto. # noqa: E501 + :type: str + """ + if description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ConceptSaveDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConceptSaveDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/entity_dto.py b/swagger/api/api_semantics/models/entity_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..01394943b0e81465b206895e267ac95044fe5064 --- /dev/null +++ b/swagger/api/api_semantics/models/entity_dto.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class EntityDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'label': 'str', + 'description': 'str' + } + + attribute_map = { + 'uri': 'uri', + 'label': 'label', + 'description': 'description' + } + + def __init__(self, uri=None, label=None, description=None): # noqa: E501 + """EntityDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._label = None + self._description = None + self.discriminator = None + self.uri = uri + self.label = label + if description is not None: + self.description = description + + @property + def uri(self): + """Gets the uri of this EntityDto. # noqa: E501 + + + :return: The uri of this EntityDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this EntityDto. + + + :param uri: The uri of this EntityDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def label(self): + """Gets the label of this EntityDto. # noqa: E501 + + + :return: The label of this EntityDto. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this EntityDto. + + + :param label: The label of this EntityDto. # noqa: E501 + :type: str + """ + if label is None: + raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 + + self._label = label + + @property + def description(self): + """Gets the description of this EntityDto. # noqa: E501 + + + :return: The description of this EntityDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this EntityDto. + + + :param description: The description of this EntityDto. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EntityDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EntityDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/ontology_create_dto.py b/swagger/api/api_semantics/models/ontology_create_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..5114c2ebf12159881dbb46432fadf0b665cc7a9b --- /dev/null +++ b/swagger/api/api_semantics/models/ontology_create_dto.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class OntologyCreateDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'prefix': 'str', + 'sparql_endpoint': 'str' + } + + attribute_map = { + 'uri': 'uri', + 'prefix': 'prefix', + 'sparql_endpoint': 'sparql_endpoint' + } + + def __init__(self, uri=None, prefix=None, sparql_endpoint=None): # noqa: E501 + """OntologyCreateDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._prefix = None + self._sparql_endpoint = None + self.discriminator = None + self.uri = uri + self.prefix = prefix + if sparql_endpoint is not None: + self.sparql_endpoint = sparql_endpoint + + @property + def uri(self): + """Gets the uri of this OntologyCreateDto. # noqa: E501 + + + :return: The uri of this OntologyCreateDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this OntologyCreateDto. + + + :param uri: The uri of this OntologyCreateDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def prefix(self): + """Gets the prefix of this OntologyCreateDto. # noqa: E501 + + + :return: The prefix of this OntologyCreateDto. # noqa: E501 + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """Sets the prefix of this OntologyCreateDto. + + + :param prefix: The prefix of this OntologyCreateDto. # noqa: E501 + :type: str + """ + if prefix is None: + raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 + + self._prefix = prefix + + @property + def sparql_endpoint(self): + """Gets the sparql_endpoint of this OntologyCreateDto. # noqa: E501 + + + :return: The sparql_endpoint of this OntologyCreateDto. # noqa: E501 + :rtype: str + """ + return self._sparql_endpoint + + @sparql_endpoint.setter + def sparql_endpoint(self, sparql_endpoint): + """Sets the sparql_endpoint of this OntologyCreateDto. + + + :param sparql_endpoint: The sparql_endpoint of this OntologyCreateDto. # noqa: E501 + :type: str + """ + + self._sparql_endpoint = sparql_endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OntologyCreateDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OntologyCreateDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/ontology_dto.py b/swagger/api/api_semantics/models/ontology_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..a4abd18a15cb4a227904505df68ba063b36922fb --- /dev/null +++ b/swagger/api/api_semantics/models/ontology_dto.py @@ -0,0 +1,298 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class OntologyDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'uri': 'str', + 'prefix': 'str', + 'sparql': 'bool', + 'rdf': 'bool', + 'creator': 'UserBriefDto', + 'created': 'datetime', + 'sparql_endpoint': 'str' + } + + attribute_map = { + 'id': 'id', + 'uri': 'uri', + 'prefix': 'prefix', + 'sparql': 'sparql', + 'rdf': 'rdf', + 'creator': 'creator', + 'created': 'created', + 'sparql_endpoint': 'sparql_endpoint' + } + + def __init__(self, id=None, uri=None, prefix=None, sparql=None, rdf=None, creator=None, created=None, sparql_endpoint=None): # noqa: E501 + """OntologyDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._uri = None + self._prefix = None + self._sparql = None + self._rdf = None + self._creator = None + self._created = None + self._sparql_endpoint = None + self.discriminator = None + self.id = id + self.uri = uri + self.prefix = prefix + self.sparql = sparql + self.rdf = rdf + if creator is not None: + self.creator = creator + self.created = created + if sparql_endpoint is not None: + self.sparql_endpoint = sparql_endpoint + + @property + def id(self): + """Gets the id of this OntologyDto. # noqa: E501 + + + :return: The id of this OntologyDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OntologyDto. + + + :param id: The id of this OntologyDto. # noqa: E501 + :type: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def uri(self): + """Gets the uri of this OntologyDto. # noqa: E501 + + + :return: The uri of this OntologyDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this OntologyDto. + + + :param uri: The uri of this OntologyDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def prefix(self): + """Gets the prefix of this OntologyDto. # noqa: E501 + + + :return: The prefix of this OntologyDto. # noqa: E501 + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """Sets the prefix of this OntologyDto. + + + :param prefix: The prefix of this OntologyDto. # noqa: E501 + :type: str + """ + if prefix is None: + raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 + + self._prefix = prefix + + @property + def sparql(self): + """Gets the sparql of this OntologyDto. # noqa: E501 + + + :return: The sparql of this OntologyDto. # noqa: E501 + :rtype: bool + """ + return self._sparql + + @sparql.setter + def sparql(self, sparql): + """Sets the sparql of this OntologyDto. + + + :param sparql: The sparql of this OntologyDto. # noqa: E501 + :type: bool + """ + if sparql is None: + raise ValueError("Invalid value for `sparql`, must not be `None`") # noqa: E501 + + self._sparql = sparql + + @property + def rdf(self): + """Gets the rdf of this OntologyDto. # noqa: E501 + + + :return: The rdf of this OntologyDto. # noqa: E501 + :rtype: bool + """ + return self._rdf + + @rdf.setter + def rdf(self, rdf): + """Sets the rdf of this OntologyDto. + + + :param rdf: The rdf of this OntologyDto. # noqa: E501 + :type: bool + """ + if rdf is None: + raise ValueError("Invalid value for `rdf`, must not be `None`") # noqa: E501 + + self._rdf = rdf + + @property + def creator(self): + """Gets the creator of this OntologyDto. # noqa: E501 + + + :return: The creator of this OntologyDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this OntologyDto. + + + :param creator: The creator of this OntologyDto. # noqa: E501 + :type: UserBriefDto + """ + + self._creator = creator + + @property + def created(self): + """Gets the created of this OntologyDto. # noqa: E501 + + + :return: The created of this OntologyDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this OntologyDto. + + + :param created: The created of this OntologyDto. # noqa: E501 + :type: datetime + """ + if created is None: + raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 + + self._created = created + + @property + def sparql_endpoint(self): + """Gets the sparql_endpoint of this OntologyDto. # noqa: E501 + + + :return: The sparql_endpoint of this OntologyDto. # noqa: E501 + :rtype: str + """ + return self._sparql_endpoint + + @sparql_endpoint.setter + def sparql_endpoint(self, sparql_endpoint): + """Sets the sparql_endpoint of this OntologyDto. + + + :param sparql_endpoint: The sparql_endpoint of this OntologyDto. # noqa: E501 + :type: str + """ + + self._sparql_endpoint = sparql_endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OntologyDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OntologyDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/ontology_modify_dto.py b/swagger/api/api_semantics/models/ontology_modify_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..69bdb87a5094f0fd80dfe0084f03b5bd75c68d7e --- /dev/null +++ b/swagger/api/api_semantics/models/ontology_modify_dto.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class OntologyModifyDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'prefix': 'str', + 'sparql_endpoint': 'str' + } + + attribute_map = { + 'uri': 'uri', + 'prefix': 'prefix', + 'sparql_endpoint': 'sparql_endpoint' + } + + def __init__(self, uri=None, prefix=None, sparql_endpoint=None): # noqa: E501 + """OntologyModifyDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._prefix = None + self._sparql_endpoint = None + self.discriminator = None + self.uri = uri + self.prefix = prefix + if sparql_endpoint is not None: + self.sparql_endpoint = sparql_endpoint + + @property + def uri(self): + """Gets the uri of this OntologyModifyDto. # noqa: E501 + + + :return: The uri of this OntologyModifyDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this OntologyModifyDto. + + + :param uri: The uri of this OntologyModifyDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def prefix(self): + """Gets the prefix of this OntologyModifyDto. # noqa: E501 + + + :return: The prefix of this OntologyModifyDto. # noqa: E501 + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """Sets the prefix of this OntologyModifyDto. + + + :param prefix: The prefix of this OntologyModifyDto. # noqa: E501 + :type: str + """ + if prefix is None: + raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 + + self._prefix = prefix + + @property + def sparql_endpoint(self): + """Gets the sparql_endpoint of this OntologyModifyDto. # noqa: E501 + + + :return: The sparql_endpoint of this OntologyModifyDto. # noqa: E501 + :rtype: str + """ + return self._sparql_endpoint + + @sparql_endpoint.setter + def sparql_endpoint(self, sparql_endpoint): + """Sets the sparql_endpoint of this OntologyModifyDto. + + + :param sparql_endpoint: The sparql_endpoint of this OntologyModifyDto. # noqa: E501 + :type: str + """ + + self._sparql_endpoint = sparql_endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OntologyModifyDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OntologyModifyDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/table_column_entity_dto.py b/swagger/api/api_semantics/models/table_column_entity_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..e063aa09f2c48370bf4ec45d1f120bda3f9eb61c --- /dev/null +++ b/swagger/api/api_semantics/models/table_column_entity_dto.py @@ -0,0 +1,244 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class TableColumnEntityDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'database_id': 'int', + 'table_id': 'int', + 'column_id': 'int', + 'uri': 'str', + 'label': 'str', + 'description': 'str' + } + + attribute_map = { + 'database_id': 'databaseId', + 'table_id': 'tableId', + 'column_id': 'columnId', + 'uri': 'uri', + 'label': 'label', + 'description': 'description' + } + + def __init__(self, database_id=None, table_id=None, column_id=None, uri=None, label=None, description=None): # noqa: E501 + """TableColumnEntityDto - a model defined in Swagger""" # noqa: E501 + self._database_id = None + self._table_id = None + self._column_id = None + self._uri = None + self._label = None + self._description = None + self.discriminator = None + self.database_id = database_id + self.table_id = table_id + self.column_id = column_id + self.uri = uri + if label is not None: + self.label = label + if description is not None: + self.description = description + + @property + def database_id(self): + """Gets the database_id of this TableColumnEntityDto. # noqa: E501 + + + :return: The database_id of this TableColumnEntityDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this TableColumnEntityDto. + + + :param database_id: The database_id of this TableColumnEntityDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this TableColumnEntityDto. # noqa: E501 + + + :return: The table_id of this TableColumnEntityDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this TableColumnEntityDto. + + + :param table_id: The table_id of this TableColumnEntityDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + + @property + def column_id(self): + """Gets the column_id of this TableColumnEntityDto. # noqa: E501 + + + :return: The column_id of this TableColumnEntityDto. # noqa: E501 + :rtype: int + """ + return self._column_id + + @column_id.setter + def column_id(self, column_id): + """Sets the column_id of this TableColumnEntityDto. + + + :param column_id: The column_id of this TableColumnEntityDto. # noqa: E501 + :type: int + """ + if column_id is None: + raise ValueError("Invalid value for `column_id`, must not be `None`") # noqa: E501 + + self._column_id = column_id + + @property + def uri(self): + """Gets the uri of this TableColumnEntityDto. # noqa: E501 + + + :return: The uri of this TableColumnEntityDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this TableColumnEntityDto. + + + :param uri: The uri of this TableColumnEntityDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def label(self): + """Gets the label of this TableColumnEntityDto. # noqa: E501 + + + :return: The label of this TableColumnEntityDto. # noqa: E501 + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this TableColumnEntityDto. + + + :param label: The label of this TableColumnEntityDto. # noqa: E501 + :type: str + """ + + self._label = label + + @property + def description(self): + """Gets the description of this TableColumnEntityDto. # noqa: E501 + + + :return: The description of this TableColumnEntityDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this TableColumnEntityDto. + + + :param description: The description of this TableColumnEntityDto. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TableColumnEntityDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TableColumnEntityDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/unit_dto.py b/swagger/api/api_semantics/models/unit_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..1d45a31b5423a191906f2afe0015184451c1a0b7 --- /dev/null +++ b/swagger/api/api_semantics/models/unit_dto.py @@ -0,0 +1,217 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UnitDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'name': 'str', + 'description': 'str', + 'created': 'datetime', + 'columns': 'list[ColumnBriefDto]' + } + + attribute_map = { + 'uri': 'uri', + 'name': 'name', + 'description': 'description', + 'created': 'created', + 'columns': 'columns' + } + + def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 + """UnitDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._name = None + self._description = None + self._created = None + self._columns = None + self.discriminator = None + self.uri = uri + if name is not None: + self.name = name + if description is not None: + self.description = description + self.created = created + self.columns = columns + + @property + def uri(self): + """Gets the uri of this UnitDto. # noqa: E501 + + + :return: The uri of this UnitDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this UnitDto. + + + :param uri: The uri of this UnitDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def name(self): + """Gets the name of this UnitDto. # noqa: E501 + + + :return: The name of this UnitDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UnitDto. + + + :param name: The name of this UnitDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this UnitDto. # noqa: E501 + + + :return: The description of this UnitDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UnitDto. + + + :param description: The description of this UnitDto. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created(self): + """Gets the created of this UnitDto. # noqa: E501 + + + :return: The created of this UnitDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this UnitDto. + + + :param created: The created of this UnitDto. # noqa: E501 + :type: datetime + """ + if created is None: + raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 + + self._created = created + + @property + def columns(self): + """Gets the columns of this UnitDto. # noqa: E501 + + + :return: The columns of this UnitDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this UnitDto. + + + :param columns: The columns of this UnitDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UnitDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnitDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/unit_save_dto.py b/swagger/api/api_semantics/models/unit_save_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..1aa0a46505749ec040f911bc79e819c6fcd5dd26 --- /dev/null +++ b/swagger/api/api_semantics/models/unit_save_dto.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UnitSaveDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uri': 'str', + 'name': 'str', + 'description': 'str' + } + + attribute_map = { + 'uri': 'uri', + 'name': 'name', + 'description': 'description' + } + + def __init__(self, uri=None, name=None, description=None): # noqa: E501 + """UnitSaveDto - a model defined in Swagger""" # noqa: E501 + self._uri = None + self._name = None + self._description = None + self.discriminator = None + self.uri = uri + self.name = name + self.description = description + + @property + def uri(self): + """Gets the uri of this UnitSaveDto. # noqa: E501 + + + :return: The uri of this UnitSaveDto. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this UnitSaveDto. + + + :param uri: The uri of this UnitSaveDto. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + self._uri = uri + + @property + def name(self): + """Gets the name of this UnitSaveDto. # noqa: E501 + + + :return: The name of this UnitSaveDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UnitSaveDto. + + + :param name: The name of this UnitSaveDto. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this UnitSaveDto. # noqa: E501 + + + :return: The description of this UnitSaveDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UnitSaveDto. + + + :param description: The description of this UnitSaveDto. # noqa: E501 + :type: str + """ + if description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UnitSaveDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnitSaveDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/models/user_brief_dto.py b/swagger/api/api_semantics/models/user_brief_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..41e66f31dbecdceffb64af1a47b590659228bca7 --- /dev/null +++ b/swagger/api/api_semantics/models/user_brief_dto.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + Database Repository Semantic Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class UserBriefDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'username': 'str', + 'name': 'str', + 'orcid': 'str', + 'given_name': 'str', + 'family_name': 'str', + 'email_verified': 'bool' + } + + attribute_map = { + 'id': 'id', + 'username': 'username', + 'name': 'name', + 'orcid': 'orcid', + 'given_name': 'given_name', + 'family_name': 'family_name', + 'email_verified': 'email_verified' + } + + def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 + """UserBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._username = None + self._name = None + self._orcid = None + self._given_name = None + self._family_name = None + self._email_verified = None + self.discriminator = None + self.id = id + self.username = username + if name is not None: + self.name = name + if orcid is not None: + self.orcid = orcid + if given_name is not None: + self.given_name = given_name + if family_name is not None: + self.family_name = family_name + if email_verified is not None: + self.email_verified = email_verified + + @property + def id(self): + """Gets the id of this UserBriefDto. # noqa: E501 + + + :return: The id of this UserBriefDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserBriefDto. + + + :param id: The id of this UserBriefDto. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def username(self): + """Gets the username of this UserBriefDto. # noqa: E501 + + Only contains lowercase characters # noqa: E501 + + :return: The username of this UserBriefDto. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this UserBriefDto. + + Only contains lowercase characters # noqa: E501 + + :param username: The username of this UserBriefDto. # noqa: E501 + :type: str + """ + if username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def name(self): + """Gets the name of this UserBriefDto. # noqa: E501 + + + :return: The name of this UserBriefDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UserBriefDto. + + + :param name: The name of this UserBriefDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def orcid(self): + """Gets the orcid of this UserBriefDto. # noqa: E501 + + + :return: The orcid of this UserBriefDto. # noqa: E501 + :rtype: str + """ + return self._orcid + + @orcid.setter + def orcid(self, orcid): + """Sets the orcid of this UserBriefDto. + + + :param orcid: The orcid of this UserBriefDto. # noqa: E501 + :type: str + """ + + self._orcid = orcid + + @property + def given_name(self): + """Gets the given_name of this UserBriefDto. # noqa: E501 + + + :return: The given_name of this UserBriefDto. # noqa: E501 + :rtype: str + """ + return self._given_name + + @given_name.setter + def given_name(self, given_name): + """Sets the given_name of this UserBriefDto. + + + :param given_name: The given_name of this UserBriefDto. # noqa: E501 + :type: str + """ + + self._given_name = given_name + + @property + def family_name(self): + """Gets the family_name of this UserBriefDto. # noqa: E501 + + + :return: The family_name of this UserBriefDto. # noqa: E501 + :rtype: str + """ + return self._family_name + + @family_name.setter + def family_name(self, family_name): + """Sets the family_name of this UserBriefDto. + + + :param family_name: The family_name of this UserBriefDto. # noqa: E501 + :type: str + """ + + self._family_name = family_name + + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + + self._email_verified = email_verified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserBriefDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserBriefDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_semantics/rest.py b/swagger/api/api_semantics/rest.py index a954c50b3f801e0e8812e824f229646c2c87ef97..0a8073cb98a32dbdf6ca3e28dd4d8ebef7508f3d 100644 --- a/swagger/api/api_semantics/rest.py +++ b/swagger/api/api_semantics/rest.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Database Repository Unit / Ontology Service API + Database Repository Semantic Service API - Service for assigning concepts to database tables and columns. # noqa: E501 + Service that manages the tables # noqa: E501 OpenAPI spec version: 1.2.0 Contact: andreas.rauber@tuwien.ac.at diff --git a/swagger/api/api_table/api/table_column_endpoint_api.py b/swagger/api/api_table/api/table_column_endpoint_api.py index 1b045e30d39a45e29b7ceaeb099ea7c86c5f5f65..1ca8644da6e1060533cd6d5cd3d5ba7019724c91 100644 --- a/swagger/api/api_table/api/table_column_endpoint_api.py +++ b/swagger/api/api_table/api/table_column_endpoint_api.py @@ -32,16 +32,17 @@ class TableColumnEndpointApi(object): api_client = ApiClient() self.api_client = api_client - def update(self, body, id, database_id, table_id, column_id, **kwargs): # noqa: E501 + def update(self, body, authorization, id, database_id, table_id, column_id, **kwargs): # noqa: E501 """Update a table column semantic mapping # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, database_id, table_id, column_id, async_req=True) + >>> thread = api.update(body, authorization, id, database_id, table_id, column_id, async_req=True) >>> result = thread.get() :param async_req bool :param ColumnSemanticsUpdateDto body: (required) + :param str authorization: (required) :param int id: (required) :param int database_id: (required) :param int table_id: (required) @@ -52,21 +53,22 @@ class TableColumnEndpointApi(object): """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_with_http_info(body, id, database_id, table_id, column_id, **kwargs) # noqa: E501 + return self.update_with_http_info(body, authorization, id, database_id, table_id, column_id, **kwargs) # noqa: E501 else: - (data) = self.update_with_http_info(body, id, database_id, table_id, column_id, **kwargs) # noqa: E501 + (data) = self.update_with_http_info(body, authorization, id, database_id, table_id, column_id, **kwargs) # noqa: E501 return data - def update_with_http_info(self, body, id, database_id, table_id, column_id, **kwargs): # noqa: E501 + def update_with_http_info(self, body, authorization, id, database_id, table_id, column_id, **kwargs): # noqa: E501 """Update a table column semantic mapping # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, database_id, table_id, column_id, async_req=True) + >>> thread = api.update_with_http_info(body, authorization, id, database_id, table_id, column_id, async_req=True) >>> result = thread.get() :param async_req bool :param ColumnSemanticsUpdateDto body: (required) + :param str authorization: (required) :param int id: (required) :param int database_id: (required) :param int table_id: (required) @@ -76,7 +78,7 @@ class TableColumnEndpointApi(object): returns the request thread. """ - all_params = ['body', 'id', 'database_id', 'table_id', 'column_id'] # noqa: E501 + all_params = ['body', 'authorization', 'id', 'database_id', 'table_id', 'column_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -95,6 +97,10 @@ class TableColumnEndpointApi(object): if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 + # verify the required parameter 'authorization' is set + if ('authorization' not in params or + params['authorization'] is None): + raise ValueError("Missing the required parameter `authorization` when calling `update`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): @@ -127,6 +133,8 @@ class TableColumnEndpointApi(object): query_params = [] header_params = {} + if 'authorization' in params: + header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} diff --git a/swagger/api/api_table/api/table_endpoint_api.py b/swagger/api/api_table/api/table_endpoint_api.py index d5e6988fd36d8c2edd68e43cddc0f6ab801b0d11..751023af8ce3673a14e6c1a03f937b8fb190a3ee 100644 --- a/swagger/api/api_table/api/table_endpoint_api.py +++ b/swagger/api/api_table/api/table_endpoint_api.py @@ -374,7 +374,7 @@ class TableEndpointApi(object): :param async_req bool :param int id: (required) :param int database_id: (required) - :return: str + :return: list[TableBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -396,7 +396,7 @@ class TableEndpointApi(object): :param async_req bool :param int id: (required) :param int database_id: (required) - :return: str + :return: list[TableBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -456,7 +456,7 @@ class TableEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='list[TableBriefDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api/api_table/models/api_error_dto.py b/swagger/api/api_table/models/api_error_dto.py index 827e161c20364479da9c8451c691fdf95f1feb28..cbcdab811ef17e3d07aa06840ef661eceb0deefc 100644 --- a/swagger/api/api_table/models/api_error_dto.py +++ b/swagger/api/api_table/models/api_error_dto.py @@ -69,7 +69,7 @@ class ApiErrorDto(object): """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_table/models/column_brief_dto.py b/swagger/api/api_table/models/column_brief_dto.py index 3aa752b27c8c313cf49a8e64724e1b9702481a60..1913967d82d871f1370694c26c10fda810d42507 100644 --- a/swagger/api/api_table/models/column_brief_dto.py +++ b/swagger/api/api_table/models/column_brief_dto.py @@ -30,6 +30,8 @@ class ColumnBriefDto(object): swagger_types = { 'id': 'int', 'name': 'str', + 'database_id': 'int', + 'table_id': 'int', 'internal_name': 'str', 'column_type': 'str' } @@ -37,19 +39,25 @@ class ColumnBriefDto(object): attribute_map = { 'id': 'id', 'name': 'name', + 'database_id': 'database_id', + 'table_id': 'table_id', 'internal_name': 'internal_name', 'column_type': 'column_type' } - def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None + self._database_id = None + self._table_id = None self._internal_name = None self._column_type = None self.discriminator = None self.id = id self.name = name + self.database_id = database_id + self.table_id = table_id self.internal_name = internal_name self.column_type = column_type @@ -99,6 +107,52 @@ class ColumnBriefDto(object): self._name = name + @property + def database_id(self): + """Gets the database_id of this ColumnBriefDto. # noqa: E501 + + + :return: The database_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this ColumnBriefDto. + + + :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this ColumnBriefDto. # noqa: E501 + + + :return: The table_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this ColumnBriefDto. + + + :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + @property def internal_name(self): """Gets the internal_name of this ColumnBriefDto. # noqa: E501 diff --git a/swagger/api/api_table/models/concept_dto.py b/swagger/api/api_table/models/concept_dto.py index dd7c9b159cab224807997d42170f3a2dffef0b7b..0231b37ade07ece3d2a039aba265cccc9aaafaca 100644 --- a/swagger/api/api_table/models/concept_dto.py +++ b/swagger/api/api_table/models/concept_dto.py @@ -30,24 +30,34 @@ class ConceptDto(object): swagger_types = { 'uri': 'str', 'name': 'str', - 'created': 'datetime' + 'description': 'str', + 'created': 'datetime', + 'columns': 'list[ColumnBriefDto]' } attribute_map = { 'uri': 'uri', 'name': 'name', - 'created': 'created' + 'description': 'description', + 'created': 'created', + 'columns': 'columns' } - def __init__(self, uri=None, name=None, created=None): # noqa: E501 + def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 """ConceptDto - a model defined in Swagger""" # noqa: E501 self._uri = None self._name = None + self._description = None self._created = None + self._columns = None self.discriminator = None self.uri = uri - self.name = name + if name is not None: + self.name = name + if description is not None: + self.description = description self.created = created + self.columns = columns @property def uri(self): @@ -90,11 +100,30 @@ class ConceptDto(object): :param name: The name of this ConceptDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name + @property + def description(self): + """Gets the description of this ConceptDto. # noqa: E501 + + + :return: The description of this ConceptDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this ConceptDto. + + + :param description: The description of this ConceptDto. # noqa: E501 + :type: str + """ + + self._description = description + @property def created(self): """Gets the created of this ConceptDto. # noqa: E501 @@ -118,6 +147,29 @@ class ConceptDto(object): self._created = created + @property + def columns(self): + """Gets the columns of this ConceptDto. # noqa: E501 + + + :return: The columns of this ConceptDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this ConceptDto. + + + :param columns: The columns of this ConceptDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_table/models/table_brief_dto.py b/swagger/api/api_table/models/table_brief_dto.py index 5a211638441be779666e6e7d2313ba7d846ec0a8..1bd6d77e04839e35d751fe547433b0c93affccb9 100644 --- a/swagger/api/api_table/models/table_brief_dto.py +++ b/swagger/api/api_table/models/table_brief_dto.py @@ -31,7 +31,7 @@ class TableBriefDto(object): 'id': 'int', 'name': 'str', 'description': 'str', - 'creator': 'UserBriefDto', + 'owner': 'UserBriefDto', 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,24 +40,24 @@ class TableBriefDto(object): 'id': 'id', 'name': 'name', 'description': 'description', - 'creator': 'creator', + 'owner': 'owner', 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, columns=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 """TableBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._description = None - self._creator = None + self._owner = None self._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description - self.creator = creator + self.owner = owner self.columns = columns self.internal_name = internal_name @@ -131,27 +131,27 @@ class TableBriefDto(object): self._description = description @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 + def owner(self): + """Gets the owner of this TableBriefDto. # noqa: E501 - :return: The creator of this TableBriefDto. # noqa: E501 + :return: The owner of this TableBriefDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._owner - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. + @owner.setter + def owner(self, owner): + """Sets the owner of this TableBriefDto. - :param creator: The creator of this TableBriefDto. # noqa: E501 + :param owner: The owner of this TableBriefDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - self._creator = creator + self._owner = owner @property def columns(self): diff --git a/swagger/api/api_table/models/table_dto.py b/swagger/api/api_table/models/table_dto.py index 355dfd6761abad285d79377e04ed50d58d011842..ba08ec69411f236408bbbacdc20321bf15fe5c6b 100644 --- a/swagger/api/api_table/models/table_dto.py +++ b/swagger/api/api_table/models/table_dto.py @@ -31,6 +31,7 @@ class TableDto(object): 'id': 'int', 'name': 'str', 'creator': 'UserBriefDto', + 'owner': 'UserBriefDto', 'description': 'str', 'created': 'datetime', 'columns': 'list[ColumnDto]', @@ -45,6 +46,7 @@ class TableDto(object): 'id': 'id', 'name': 'name', 'creator': 'creator', + 'owner': 'owner', 'description': 'description', 'created': 'created', 'columns': 'columns', @@ -55,11 +57,12 @@ class TableDto(object): 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, description=None, created=None, columns=None, constraints=None, internal_name=None, queue_name=None, routing_key=None, is_public=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, owner=None, description=None, created=None, columns=None, constraints=None, internal_name=None, queue_name=None, routing_key=None, is_public=None): # noqa: E501 """TableDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._creator = None + self._owner = None self._description = None self._created = None self._columns = None @@ -72,6 +75,7 @@ class TableDto(object): self.id = id self.name = name self.creator = creator + self.owner = owner self.description = description if created is not None: self.created = created @@ -152,6 +156,29 @@ class TableDto(object): self._creator = creator + @property + def owner(self): + """Gets the owner of this TableDto. # noqa: E501 + + + :return: The owner of this TableDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this TableDto. + + + :param owner: The owner of this TableDto. # noqa: E501 + :type: UserBriefDto + """ + if owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 + + self._owner = owner + @property def description(self): """Gets the description of this TableDto. # noqa: E501 diff --git a/swagger/api/api_table/models/unit_dto.py b/swagger/api/api_table/models/unit_dto.py index 3bab178a7930006d3ee14392bef7fda6f9bac6f9..64df3baac4001bd53e79ecd9b99427a6f5d2918f 100644 --- a/swagger/api/api_table/models/unit_dto.py +++ b/swagger/api/api_table/models/unit_dto.py @@ -30,24 +30,34 @@ class UnitDto(object): swagger_types = { 'uri': 'str', 'name': 'str', - 'created': 'datetime' + 'description': 'str', + 'created': 'datetime', + 'columns': 'list[ColumnBriefDto]' } attribute_map = { 'uri': 'uri', 'name': 'name', - 'created': 'created' + 'description': 'description', + 'created': 'created', + 'columns': 'columns' } - def __init__(self, uri=None, name=None, created=None): # noqa: E501 + def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 """UnitDto - a model defined in Swagger""" # noqa: E501 self._uri = None self._name = None + self._description = None self._created = None + self._columns = None self.discriminator = None self.uri = uri - self.name = name + if name is not None: + self.name = name + if description is not None: + self.description = description self.created = created + self.columns = columns @property def uri(self): @@ -90,11 +100,30 @@ class UnitDto(object): :param name: The name of this UnitDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name + @property + def description(self): + """Gets the description of this UnitDto. # noqa: E501 + + + :return: The description of this UnitDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UnitDto. + + + :param description: The description of this UnitDto. # noqa: E501 + :type: str + """ + + self._description = description + @property def created(self): """Gets the created of this UnitDto. # noqa: E501 @@ -118,6 +147,29 @@ class UnitDto(object): self._created = created + @property + def columns(self): + """Gets the columns of this UnitDto. # noqa: E501 + + + :return: The columns of this UnitDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this UnitDto. + + + :param columns: The columns of this UnitDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_user/__init__.py b/swagger/api/api_user/__init__.py index 1f3469a2c351c8ea6678216dfa653bb2c2c8fa75..78cbb9a1d493bdcccec72f4c42ff4fa8102b9b79 100644 --- a/swagger/api/api_user/__init__.py +++ b/swagger/api/api_user/__init__.py @@ -15,12 +15,21 @@ from __future__ import absolute_import # import apis into sdk package +from api_user.api.maintenance_endpoint_api import MaintenanceEndpointApi from api_user.api.user_endpoint_api import UserEndpointApi # import ApiClient from api_user.api_client import ApiClient from api_user.configuration import Configuration # import models into sdk package from api_user.models.api_error_dto import ApiErrorDto +from api_user.models.banner_message_brief_dto import BannerMessageBriefDto +from api_user.models.banner_message_create_dto import BannerMessageCreateDto +from api_user.models.banner_message_dto import BannerMessageDto +from api_user.models.banner_message_not_found_exception import BannerMessageNotFoundException +from api_user.models.banner_message_not_found_exception_cause import BannerMessageNotFoundExceptionCause +from api_user.models.banner_message_not_found_exception_cause_stack_trace import BannerMessageNotFoundExceptionCauseStackTrace +from api_user.models.banner_message_not_found_exception_cause_suppressed import BannerMessageNotFoundExceptionCauseSuppressed +from api_user.models.banner_message_update_dto import BannerMessageUpdateDto from api_user.models.column_brief_dto import ColumnBriefDto from api_user.models.container_dto import ContainerDto from api_user.models.creator_dto import CreatorDto diff --git a/swagger/api/api_user/api/__init__.py b/swagger/api/api_user/api/__init__.py index 37c8c034c88c1a1956dffb87df4caf67789af43a..a5f47db2a514b2b43675450d3b96d99f212ed5ee 100644 --- a/swagger/api/api_user/api/__init__.py +++ b/swagger/api/api_user/api/__init__.py @@ -3,4 +3,5 @@ from __future__ import absolute_import # flake8: noqa # import apis into api package +from api_user.api.maintenance_endpoint_api import MaintenanceEndpointApi from api_user.api.user_endpoint_api import UserEndpointApi diff --git a/swagger/api/api_user/api/maintenance_endpoint_api.py b/swagger/api/api_user/api/maintenance_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..a2541950bdade740a2de2e700e222e79cc4c7ac8 --- /dev/null +++ b/swagger/api/api_user/api/maintenance_endpoint_api.py @@ -0,0 +1,591 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from api_user.api_client import ApiClient + + +class MaintenanceEndpointApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def active(self, **kwargs): # noqa: E501 + """Find active maintenance messages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.active(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[BannerMessageBriefDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.active_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.active_with_http_info(**kwargs) # noqa: E501 + return data + + def active_with_http_info(self, **kwargs): # noqa: E501 + """Find active maintenance messages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.active_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[BannerMessageBriefDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method active" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/maintenance/message/active', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BannerMessageBriefDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create1(self, body, **kwargs): # noqa: E501 + """Create maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create1(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param BannerMessageCreateDto body: (required) + :return: BannerMessageBriefDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create1_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.create1_with_http_info(body, **kwargs) # noqa: E501 + return data + + def create1_with_http_info(self, body, **kwargs): # noqa: E501 + """Create maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create1_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param BannerMessageCreateDto body: (required) + :return: BannerMessageBriefDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/maintenance/message', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BannerMessageBriefDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete(self, id, **kwargs): # noqa: E501 + """Delete maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/maintenance/message/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def find1(self, id, **kwargs): # noqa: E501 + """Find one maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find1(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: BannerMessageDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.find1_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.find1_with_http_info(id, **kwargs) # noqa: E501 + return data + + def find1_with_http_info(self, id, **kwargs): # noqa: E501 + """Find one maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.find1_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: (required) + :return: BannerMessageDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method find1" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `find1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/maintenance/message/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BannerMessageDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list(self, **kwargs): # noqa: E501 + """Find maintenance messages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[BannerMessageDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_with_http_info(**kwargs) # noqa: E501 + return data + + def list_with_http_info(self, **kwargs): # noqa: E501 + """Find maintenance messages # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: list[BannerMessageDto] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/maintenance/message', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[BannerMessageDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update(self, body, id, **kwargs): # noqa: E501 + """Update maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param BannerMessageUpdateDto body: (required) + :param int id: (required) + :return: BannerMessageBriefDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_with_http_info(body, id, **kwargs) # noqa: E501 + else: + (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 + return data + + def update_with_http_info(self, body, id, **kwargs): # noqa: E501 + """Update maintenance message # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_with_http_info(body, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param BannerMessageUpdateDto body: (required) + :param int id: (required) + :return: BannerMessageBriefDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/maintenance/message/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BannerMessageBriefDto', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/swagger/api/api_user/api/user_endpoint_api.py b/swagger/api/api_user/api/user_endpoint_api.py index 8bb16593061328515beea7f55ddf9c85aa4c53d4..00c0293e8b1a76f08a9c732c34be972e511b7a3b 100644 --- a/swagger/api/api_user/api/user_endpoint_api.py +++ b/swagger/api/api_user/api/user_endpoint_api.py @@ -104,7 +104,7 @@ class UserEndpointApi(object): body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -201,7 +201,7 @@ class UserEndpointApi(object): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['bearerAuth'] # noqa: E501 @@ -286,7 +286,7 @@ class UserEndpointApi(object): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 @@ -387,7 +387,7 @@ class UserEndpointApi(object): body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -492,7 +492,7 @@ class UserEndpointApi(object): body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -597,7 +597,7 @@ class UserEndpointApi(object): body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 diff --git a/swagger/api/api_user/models/__init__.py b/swagger/api/api_user/models/__init__.py index 233fa306b0ddf931a3b04a17dab6975cb84f62f8..983301c900577632dcf7561caa9e5b16e3c11c60 100644 --- a/swagger/api/api_user/models/__init__.py +++ b/swagger/api/api_user/models/__init__.py @@ -15,6 +15,14 @@ from __future__ import absolute_import # import models into model package from api_user.models.api_error_dto import ApiErrorDto +from api_user.models.banner_message_brief_dto import BannerMessageBriefDto +from api_user.models.banner_message_create_dto import BannerMessageCreateDto +from api_user.models.banner_message_dto import BannerMessageDto +from api_user.models.banner_message_not_found_exception import BannerMessageNotFoundException +from api_user.models.banner_message_not_found_exception_cause import BannerMessageNotFoundExceptionCause +from api_user.models.banner_message_not_found_exception_cause_stack_trace import BannerMessageNotFoundExceptionCauseStackTrace +from api_user.models.banner_message_not_found_exception_cause_suppressed import BannerMessageNotFoundExceptionCauseSuppressed +from api_user.models.banner_message_update_dto import BannerMessageUpdateDto from api_user.models.column_brief_dto import ColumnBriefDto from api_user.models.container_dto import ContainerDto from api_user.models.creator_dto import CreatorDto diff --git a/swagger/api/api_user/models/api_error_dto.py b/swagger/api/api_user/models/api_error_dto.py index 9ecd4fbdc03382e467db96821794ff2ce86fb055..af0ee1858bf45c77756d6cfd383eb8e1f5ec5221 100644 --- a/swagger/api/api_user/models/api_error_dto.py +++ b/swagger/api/api_user/models/api_error_dto.py @@ -69,7 +69,7 @@ class ApiErrorDto(object): """ if status is None: raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 + allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_user/models/banner_message_brief_dto.py b/swagger/api/api_user/models/banner_message_brief_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..222bd0cc9d4ca19fb79944d32d930d64009058bf --- /dev/null +++ b/swagger/api/api_user/models/banner_message_brief_dto.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageBriefDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'type': 'str', + 'message': 'str', + 'link': 'str', + 'link_text': 'str' + } + + attribute_map = { + 'type': 'type', + 'message': 'message', + 'link': 'link', + 'link_text': 'link_text' + } + + def __init__(self, type=None, message=None, link=None, link_text=None): # noqa: E501 + """BannerMessageBriefDto - a model defined in Swagger""" # noqa: E501 + self._type = None + self._message = None + self._link = None + self._link_text = None + self.discriminator = None + self.type = type + self.message = message + if link is not None: + self.link = link + if link_text is not None: + self.link_text = link_text + + @property + def type(self): + """Gets the type of this BannerMessageBriefDto. # noqa: E501 + + + :return: The type of this BannerMessageBriefDto. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this BannerMessageBriefDto. + + + :param type: The type of this BannerMessageBriefDto. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["error", "warning", "info"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def message(self): + """Gets the message of this BannerMessageBriefDto. # noqa: E501 + + + :return: The message of this BannerMessageBriefDto. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageBriefDto. + + + :param message: The message of this BannerMessageBriefDto. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def link(self): + """Gets the link of this BannerMessageBriefDto. # noqa: E501 + + + :return: The link of this BannerMessageBriefDto. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this BannerMessageBriefDto. + + + :param link: The link of this BannerMessageBriefDto. # noqa: E501 + :type: str + """ + + self._link = link + + @property + def link_text(self): + """Gets the link_text of this BannerMessageBriefDto. # noqa: E501 + + + :return: The link_text of this BannerMessageBriefDto. # noqa: E501 + :rtype: str + """ + return self._link_text + + @link_text.setter + def link_text(self, link_text): + """Sets the link_text of this BannerMessageBriefDto. + + + :param link_text: The link_text of this BannerMessageBriefDto. # noqa: E501 + :type: str + """ + + self._link_text = link_text + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageBriefDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageBriefDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_create_dto.py b/swagger/api/api_user/models/banner_message_create_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..ed5102bfe14101e8557d88d1f858c822e942cf06 --- /dev/null +++ b/swagger/api/api_user/models/banner_message_create_dto.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageCreateDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'type': 'str', + 'message': 'str', + 'link': 'str', + 'link_text': 'str', + 'display_start': 'datetime', + 'display_end': 'datetime' + } + + attribute_map = { + 'type': 'type', + 'message': 'message', + 'link': 'link', + 'link_text': 'link_text', + 'display_start': 'display_start', + 'display_end': 'display_end' + } + + def __init__(self, type=None, message=None, link=None, link_text=None, display_start=None, display_end=None): # noqa: E501 + """BannerMessageCreateDto - a model defined in Swagger""" # noqa: E501 + self._type = None + self._message = None + self._link = None + self._link_text = None + self._display_start = None + self._display_end = None + self.discriminator = None + self.type = type + self.message = message + if link is not None: + self.link = link + if link_text is not None: + self.link_text = link_text + if display_start is not None: + self.display_start = display_start + if display_end is not None: + self.display_end = display_end + + @property + def type(self): + """Gets the type of this BannerMessageCreateDto. # noqa: E501 + + + :return: The type of this BannerMessageCreateDto. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this BannerMessageCreateDto. + + + :param type: The type of this BannerMessageCreateDto. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["error", "warning", "info"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def message(self): + """Gets the message of this BannerMessageCreateDto. # noqa: E501 + + + :return: The message of this BannerMessageCreateDto. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageCreateDto. + + + :param message: The message of this BannerMessageCreateDto. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def link(self): + """Gets the link of this BannerMessageCreateDto. # noqa: E501 + + + :return: The link of this BannerMessageCreateDto. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this BannerMessageCreateDto. + + + :param link: The link of this BannerMessageCreateDto. # noqa: E501 + :type: str + """ + + self._link = link + + @property + def link_text(self): + """Gets the link_text of this BannerMessageCreateDto. # noqa: E501 + + + :return: The link_text of this BannerMessageCreateDto. # noqa: E501 + :rtype: str + """ + return self._link_text + + @link_text.setter + def link_text(self, link_text): + """Sets the link_text of this BannerMessageCreateDto. + + + :param link_text: The link_text of this BannerMessageCreateDto. # noqa: E501 + :type: str + """ + + self._link_text = link_text + + @property + def display_start(self): + """Gets the display_start of this BannerMessageCreateDto. # noqa: E501 + + + :return: The display_start of this BannerMessageCreateDto. # noqa: E501 + :rtype: datetime + """ + return self._display_start + + @display_start.setter + def display_start(self, display_start): + """Sets the display_start of this BannerMessageCreateDto. + + + :param display_start: The display_start of this BannerMessageCreateDto. # noqa: E501 + :type: datetime + """ + + self._display_start = display_start + + @property + def display_end(self): + """Gets the display_end of this BannerMessageCreateDto. # noqa: E501 + + + :return: The display_end of this BannerMessageCreateDto. # noqa: E501 + :rtype: datetime + """ + return self._display_end + + @display_end.setter + def display_end(self, display_end): + """Sets the display_end of this BannerMessageCreateDto. + + + :param display_end: The display_end of this BannerMessageCreateDto. # noqa: E501 + :type: datetime + """ + + self._display_end = display_end + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageCreateDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageCreateDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_dto.py b/swagger/api/api_user/models/banner_message_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..b155e551a479643ac4def166d3d62d2e4a462d97 --- /dev/null +++ b/swagger/api/api_user/models/banner_message_dto.py @@ -0,0 +1,275 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'type': 'str', + 'message': 'str', + 'link': 'str', + 'link_text': 'str', + 'display_start': 'datetime', + 'display_end': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'message': 'message', + 'link': 'link', + 'link_text': 'link_text', + 'display_start': 'display_start', + 'display_end': 'display_end' + } + + def __init__(self, id=None, type=None, message=None, link=None, link_text=None, display_start=None, display_end=None): # noqa: E501 + """BannerMessageDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._type = None + self._message = None + self._link = None + self._link_text = None + self._display_start = None + self._display_end = None + self.discriminator = None + self.id = id + self.type = type + self.message = message + if link is not None: + self.link = link + if link_text is not None: + self.link_text = link_text + if display_start is not None: + self.display_start = display_start + if display_end is not None: + self.display_end = display_end + + @property + def id(self): + """Gets the id of this BannerMessageDto. # noqa: E501 + + + :return: The id of this BannerMessageDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BannerMessageDto. + + + :param id: The id of this BannerMessageDto. # noqa: E501 + :type: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def type(self): + """Gets the type of this BannerMessageDto. # noqa: E501 + + + :return: The type of this BannerMessageDto. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this BannerMessageDto. + + + :param type: The type of this BannerMessageDto. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["error", "warning", "info"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def message(self): + """Gets the message of this BannerMessageDto. # noqa: E501 + + + :return: The message of this BannerMessageDto. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageDto. + + + :param message: The message of this BannerMessageDto. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def link(self): + """Gets the link of this BannerMessageDto. # noqa: E501 + + + :return: The link of this BannerMessageDto. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this BannerMessageDto. + + + :param link: The link of this BannerMessageDto. # noqa: E501 + :type: str + """ + + self._link = link + + @property + def link_text(self): + """Gets the link_text of this BannerMessageDto. # noqa: E501 + + + :return: The link_text of this BannerMessageDto. # noqa: E501 + :rtype: str + """ + return self._link_text + + @link_text.setter + def link_text(self, link_text): + """Sets the link_text of this BannerMessageDto. + + + :param link_text: The link_text of this BannerMessageDto. # noqa: E501 + :type: str + """ + + self._link_text = link_text + + @property + def display_start(self): + """Gets the display_start of this BannerMessageDto. # noqa: E501 + + + :return: The display_start of this BannerMessageDto. # noqa: E501 + :rtype: datetime + """ + return self._display_start + + @display_start.setter + def display_start(self, display_start): + """Sets the display_start of this BannerMessageDto. + + + :param display_start: The display_start of this BannerMessageDto. # noqa: E501 + :type: datetime + """ + + self._display_start = display_start + + @property + def display_end(self): + """Gets the display_end of this BannerMessageDto. # noqa: E501 + + + :return: The display_end of this BannerMessageDto. # noqa: E501 + :rtype: datetime + """ + return self._display_end + + @display_end.setter + def display_end(self, display_end): + """Sets the display_end of this BannerMessageDto. + + + :param display_end: The display_end of this BannerMessageDto. # noqa: E501 + :type: datetime + """ + + self._display_end = display_end + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception.py b/swagger/api/api_user/models/banner_message_not_found_exception.py new file mode 100644 index 0000000000000000000000000000000000000000..952f747b6b829302bbb70d7523bd3ed2e57fd46c --- /dev/null +++ b/swagger/api/api_user/models/banner_message_not_found_exception.py @@ -0,0 +1,214 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageNotFoundException(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'cause': 'BannerMessageNotFoundExceptionCause', + 'stack_trace': 'list[BannerMessageNotFoundExceptionCauseStackTrace]', + 'message': 'str', + 'suppressed': 'list[BannerMessageNotFoundExceptionCauseSuppressed]', + 'localized_message': 'str' + } + + attribute_map = { + 'cause': 'cause', + 'stack_trace': 'stackTrace', + 'message': 'message', + 'suppressed': 'suppressed', + 'localized_message': 'localizedMessage' + } + + def __init__(self, cause=None, stack_trace=None, message=None, suppressed=None, localized_message=None): # noqa: E501 + """BannerMessageNotFoundException - a model defined in Swagger""" # noqa: E501 + self._cause = None + self._stack_trace = None + self._message = None + self._suppressed = None + self._localized_message = None + self.discriminator = None + if cause is not None: + self.cause = cause + if stack_trace is not None: + self.stack_trace = stack_trace + if message is not None: + self.message = message + if suppressed is not None: + self.suppressed = suppressed + if localized_message is not None: + self.localized_message = localized_message + + @property + def cause(self): + """Gets the cause of this BannerMessageNotFoundException. # noqa: E501 + + + :return: The cause of this BannerMessageNotFoundException. # noqa: E501 + :rtype: BannerMessageNotFoundExceptionCause + """ + return self._cause + + @cause.setter + def cause(self, cause): + """Sets the cause of this BannerMessageNotFoundException. + + + :param cause: The cause of this BannerMessageNotFoundException. # noqa: E501 + :type: BannerMessageNotFoundExceptionCause + """ + + self._cause = cause + + @property + def stack_trace(self): + """Gets the stack_trace of this BannerMessageNotFoundException. # noqa: E501 + + + :return: The stack_trace of this BannerMessageNotFoundException. # noqa: E501 + :rtype: list[BannerMessageNotFoundExceptionCauseStackTrace] + """ + return self._stack_trace + + @stack_trace.setter + def stack_trace(self, stack_trace): + """Sets the stack_trace of this BannerMessageNotFoundException. + + + :param stack_trace: The stack_trace of this BannerMessageNotFoundException. # noqa: E501 + :type: list[BannerMessageNotFoundExceptionCauseStackTrace] + """ + + self._stack_trace = stack_trace + + @property + def message(self): + """Gets the message of this BannerMessageNotFoundException. # noqa: E501 + + + :return: The message of this BannerMessageNotFoundException. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageNotFoundException. + + + :param message: The message of this BannerMessageNotFoundException. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def suppressed(self): + """Gets the suppressed of this BannerMessageNotFoundException. # noqa: E501 + + + :return: The suppressed of this BannerMessageNotFoundException. # noqa: E501 + :rtype: list[BannerMessageNotFoundExceptionCauseSuppressed] + """ + return self._suppressed + + @suppressed.setter + def suppressed(self, suppressed): + """Sets the suppressed of this BannerMessageNotFoundException. + + + :param suppressed: The suppressed of this BannerMessageNotFoundException. # noqa: E501 + :type: list[BannerMessageNotFoundExceptionCauseSuppressed] + """ + + self._suppressed = suppressed + + @property + def localized_message(self): + """Gets the localized_message of this BannerMessageNotFoundException. # noqa: E501 + + + :return: The localized_message of this BannerMessageNotFoundException. # noqa: E501 + :rtype: str + """ + return self._localized_message + + @localized_message.setter + def localized_message(self, localized_message): + """Sets the localized_message of this BannerMessageNotFoundException. + + + :param localized_message: The localized_message of this BannerMessageNotFoundException. # noqa: E501 + :type: str + """ + + self._localized_message = localized_message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageNotFoundException, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageNotFoundException): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception_cause.py b/swagger/api/api_user/models/banner_message_not_found_exception_cause.py new file mode 100644 index 0000000000000000000000000000000000000000..9684ec9b571701c629ad1f3ebc12d788a084b7fa --- /dev/null +++ b/swagger/api/api_user/models/banner_message_not_found_exception_cause.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageNotFoundExceptionCause(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'stack_trace': 'list[BannerMessageNotFoundExceptionCauseStackTrace]', + 'message': 'str', + 'suppressed': 'list[BannerMessageNotFoundExceptionCauseSuppressed]', + 'localized_message': 'str' + } + + attribute_map = { + 'stack_trace': 'stackTrace', + 'message': 'message', + 'suppressed': 'suppressed', + 'localized_message': 'localizedMessage' + } + + def __init__(self, stack_trace=None, message=None, suppressed=None, localized_message=None): # noqa: E501 + """BannerMessageNotFoundExceptionCause - a model defined in Swagger""" # noqa: E501 + self._stack_trace = None + self._message = None + self._suppressed = None + self._localized_message = None + self.discriminator = None + if stack_trace is not None: + self.stack_trace = stack_trace + if message is not None: + self.message = message + if suppressed is not None: + self.suppressed = suppressed + if localized_message is not None: + self.localized_message = localized_message + + @property + def stack_trace(self): + """Gets the stack_trace of this BannerMessageNotFoundExceptionCause. # noqa: E501 + + + :return: The stack_trace of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :rtype: list[BannerMessageNotFoundExceptionCauseStackTrace] + """ + return self._stack_trace + + @stack_trace.setter + def stack_trace(self, stack_trace): + """Sets the stack_trace of this BannerMessageNotFoundExceptionCause. + + + :param stack_trace: The stack_trace of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :type: list[BannerMessageNotFoundExceptionCauseStackTrace] + """ + + self._stack_trace = stack_trace + + @property + def message(self): + """Gets the message of this BannerMessageNotFoundExceptionCause. # noqa: E501 + + + :return: The message of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageNotFoundExceptionCause. + + + :param message: The message of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def suppressed(self): + """Gets the suppressed of this BannerMessageNotFoundExceptionCause. # noqa: E501 + + + :return: The suppressed of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :rtype: list[BannerMessageNotFoundExceptionCauseSuppressed] + """ + return self._suppressed + + @suppressed.setter + def suppressed(self, suppressed): + """Sets the suppressed of this BannerMessageNotFoundExceptionCause. + + + :param suppressed: The suppressed of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :type: list[BannerMessageNotFoundExceptionCauseSuppressed] + """ + + self._suppressed = suppressed + + @property + def localized_message(self): + """Gets the localized_message of this BannerMessageNotFoundExceptionCause. # noqa: E501 + + + :return: The localized_message of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :rtype: str + """ + return self._localized_message + + @localized_message.setter + def localized_message(self, localized_message): + """Sets the localized_message of this BannerMessageNotFoundExceptionCause. + + + :param localized_message: The localized_message of this BannerMessageNotFoundExceptionCause. # noqa: E501 + :type: str + """ + + self._localized_message = localized_message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageNotFoundExceptionCause, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageNotFoundExceptionCause): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception_cause_stack_trace.py b/swagger/api/api_user/models/banner_message_not_found_exception_cause_stack_trace.py new file mode 100644 index 0000000000000000000000000000000000000000..8013cd308a6fe0296826b66d36853cb47c043330 --- /dev/null +++ b/swagger/api/api_user/models/banner_message_not_found_exception_cause_stack_trace.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageNotFoundExceptionCauseStackTrace(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'class_loader_name': 'str', + 'module_name': 'str', + 'module_version': 'str', + 'method_name': 'str', + 'file_name': 'str', + 'line_number': 'int', + 'native_method': 'bool', + 'class_name': 'str' + } + + attribute_map = { + 'class_loader_name': 'classLoaderName', + 'module_name': 'moduleName', + 'module_version': 'moduleVersion', + 'method_name': 'methodName', + 'file_name': 'fileName', + 'line_number': 'lineNumber', + 'native_method': 'nativeMethod', + 'class_name': 'className' + } + + def __init__(self, class_loader_name=None, module_name=None, module_version=None, method_name=None, file_name=None, line_number=None, native_method=None, class_name=None): # noqa: E501 + """BannerMessageNotFoundExceptionCauseStackTrace - a model defined in Swagger""" # noqa: E501 + self._class_loader_name = None + self._module_name = None + self._module_version = None + self._method_name = None + self._file_name = None + self._line_number = None + self._native_method = None + self._class_name = None + self.discriminator = None + if class_loader_name is not None: + self.class_loader_name = class_loader_name + if module_name is not None: + self.module_name = module_name + if module_version is not None: + self.module_version = module_version + if method_name is not None: + self.method_name = method_name + if file_name is not None: + self.file_name = file_name + if line_number is not None: + self.line_number = line_number + if native_method is not None: + self.native_method = native_method + if class_name is not None: + self.class_name = class_name + + @property + def class_loader_name(self): + """Gets the class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: str + """ + return self._class_loader_name + + @class_loader_name.setter + def class_loader_name(self, class_loader_name): + """Sets the class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param class_loader_name: The class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: str + """ + + self._class_loader_name = class_loader_name + + @property + def module_name(self): + """Gets the module_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The module_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: str + """ + return self._module_name + + @module_name.setter + def module_name(self, module_name): + """Sets the module_name of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param module_name: The module_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: str + """ + + self._module_name = module_name + + @property + def module_version(self): + """Gets the module_version of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The module_version of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: str + """ + return self._module_version + + @module_version.setter + def module_version(self, module_version): + """Sets the module_version of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param module_version: The module_version of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: str + """ + + self._module_version = module_version + + @property + def method_name(self): + """Gets the method_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The method_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: str + """ + return self._method_name + + @method_name.setter + def method_name(self, method_name): + """Sets the method_name of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param method_name: The method_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: str + """ + + self._method_name = method_name + + @property + def file_name(self): + """Gets the file_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The file_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: str + """ + return self._file_name + + @file_name.setter + def file_name(self, file_name): + """Sets the file_name of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param file_name: The file_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: str + """ + + self._file_name = file_name + + @property + def line_number(self): + """Gets the line_number of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The line_number of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: int + """ + return self._line_number + + @line_number.setter + def line_number(self, line_number): + """Sets the line_number of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param line_number: The line_number of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: int + """ + + self._line_number = line_number + + @property + def native_method(self): + """Gets the native_method of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The native_method of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: bool + """ + return self._native_method + + @native_method.setter + def native_method(self, native_method): + """Sets the native_method of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param native_method: The native_method of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: bool + """ + + self._native_method = native_method + + @property + def class_name(self): + """Gets the class_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + + + :return: The class_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :rtype: str + """ + return self._class_name + + @class_name.setter + def class_name(self, class_name): + """Sets the class_name of this BannerMessageNotFoundExceptionCauseStackTrace. + + + :param class_name: The class_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 + :type: str + """ + + self._class_name = class_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageNotFoundExceptionCauseStackTrace, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageNotFoundExceptionCauseStackTrace): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception_cause_suppressed.py b/swagger/api/api_user/models/banner_message_not_found_exception_cause_suppressed.py new file mode 100644 index 0000000000000000000000000000000000000000..88913aa80c3056e20977f368f2f826e6a49b09e0 --- /dev/null +++ b/swagger/api/api_user/models/banner_message_not_found_exception_cause_suppressed.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageNotFoundExceptionCauseSuppressed(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'stack_trace': 'list[BannerMessageNotFoundExceptionCauseStackTrace]', + 'message': 'str', + 'localized_message': 'str' + } + + attribute_map = { + 'stack_trace': 'stackTrace', + 'message': 'message', + 'localized_message': 'localizedMessage' + } + + def __init__(self, stack_trace=None, message=None, localized_message=None): # noqa: E501 + """BannerMessageNotFoundExceptionCauseSuppressed - a model defined in Swagger""" # noqa: E501 + self._stack_trace = None + self._message = None + self._localized_message = None + self.discriminator = None + if stack_trace is not None: + self.stack_trace = stack_trace + if message is not None: + self.message = message + if localized_message is not None: + self.localized_message = localized_message + + @property + def stack_trace(self): + """Gets the stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + + + :return: The stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + :rtype: list[BannerMessageNotFoundExceptionCauseStackTrace] + """ + return self._stack_trace + + @stack_trace.setter + def stack_trace(self, stack_trace): + """Sets the stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. + + + :param stack_trace: The stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + :type: list[BannerMessageNotFoundExceptionCauseStackTrace] + """ + + self._stack_trace = stack_trace + + @property + def message(self): + """Gets the message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + + + :return: The message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageNotFoundExceptionCauseSuppressed. + + + :param message: The message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def localized_message(self): + """Gets the localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + + + :return: The localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + :rtype: str + """ + return self._localized_message + + @localized_message.setter + def localized_message(self, localized_message): + """Sets the localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. + + + :param localized_message: The localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 + :type: str + """ + + self._localized_message = localized_message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageNotFoundExceptionCauseSuppressed, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageNotFoundExceptionCauseSuppressed): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/banner_message_update_dto.py b/swagger/api/api_user/models/banner_message_update_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..54d78650da4d9eb34fb24e046dfb4c4251ba2a2c --- /dev/null +++ b/swagger/api/api_user/models/banner_message_update_dto.py @@ -0,0 +1,248 @@ +# coding: utf-8 + +""" + Database Repository User Service API + + Service that manages the users # noqa: E501 + + OpenAPI spec version: 1.2.0 + Contact: andreas.rauber@tuwien.ac.at + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class BannerMessageUpdateDto(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'type': 'str', + 'message': 'str', + 'link': 'str', + 'link_text': 'str', + 'display_start': 'datetime', + 'display_end': 'datetime' + } + + attribute_map = { + 'type': 'type', + 'message': 'message', + 'link': 'link', + 'link_text': 'link_text', + 'display_start': 'display_start', + 'display_end': 'display_end' + } + + def __init__(self, type=None, message=None, link=None, link_text=None, display_start=None, display_end=None): # noqa: E501 + """BannerMessageUpdateDto - a model defined in Swagger""" # noqa: E501 + self._type = None + self._message = None + self._link = None + self._link_text = None + self._display_start = None + self._display_end = None + self.discriminator = None + self.type = type + self.message = message + if link is not None: + self.link = link + if link_text is not None: + self.link_text = link_text + if display_start is not None: + self.display_start = display_start + if display_end is not None: + self.display_end = display_end + + @property + def type(self): + """Gets the type of this BannerMessageUpdateDto. # noqa: E501 + + + :return: The type of this BannerMessageUpdateDto. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this BannerMessageUpdateDto. + + + :param type: The type of this BannerMessageUpdateDto. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["error", "warning", "info"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def message(self): + """Gets the message of this BannerMessageUpdateDto. # noqa: E501 + + + :return: The message of this BannerMessageUpdateDto. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this BannerMessageUpdateDto. + + + :param message: The message of this BannerMessageUpdateDto. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def link(self): + """Gets the link of this BannerMessageUpdateDto. # noqa: E501 + + + :return: The link of this BannerMessageUpdateDto. # noqa: E501 + :rtype: str + """ + return self._link + + @link.setter + def link(self, link): + """Sets the link of this BannerMessageUpdateDto. + + + :param link: The link of this BannerMessageUpdateDto. # noqa: E501 + :type: str + """ + + self._link = link + + @property + def link_text(self): + """Gets the link_text of this BannerMessageUpdateDto. # noqa: E501 + + + :return: The link_text of this BannerMessageUpdateDto. # noqa: E501 + :rtype: str + """ + return self._link_text + + @link_text.setter + def link_text(self, link_text): + """Sets the link_text of this BannerMessageUpdateDto. + + + :param link_text: The link_text of this BannerMessageUpdateDto. # noqa: E501 + :type: str + """ + + self._link_text = link_text + + @property + def display_start(self): + """Gets the display_start of this BannerMessageUpdateDto. # noqa: E501 + + + :return: The display_start of this BannerMessageUpdateDto. # noqa: E501 + :rtype: datetime + """ + return self._display_start + + @display_start.setter + def display_start(self, display_start): + """Sets the display_start of this BannerMessageUpdateDto. + + + :param display_start: The display_start of this BannerMessageUpdateDto. # noqa: E501 + :type: datetime + """ + + self._display_start = display_start + + @property + def display_end(self): + """Gets the display_end of this BannerMessageUpdateDto. # noqa: E501 + + + :return: The display_end of this BannerMessageUpdateDto. # noqa: E501 + :rtype: datetime + """ + return self._display_end + + @display_end.setter + def display_end(self, display_end): + """Sets the display_end of this BannerMessageUpdateDto. + + + :param display_end: The display_end of this BannerMessageUpdateDto. # noqa: E501 + :type: datetime + """ + + self._display_end = display_end + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BannerMessageUpdateDto, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BannerMessageUpdateDto): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/swagger/api/api_user/models/column_brief_dto.py b/swagger/api/api_user/models/column_brief_dto.py index 8a705635ecdde220d612866ddd9a22be849de6c4..2abec82518e769f93fdbabf35e77db97b9dd4d97 100644 --- a/swagger/api/api_user/models/column_brief_dto.py +++ b/swagger/api/api_user/models/column_brief_dto.py @@ -30,6 +30,8 @@ class ColumnBriefDto(object): swagger_types = { 'id': 'int', 'name': 'str', + 'database_id': 'int', + 'table_id': 'int', 'internal_name': 'str', 'column_type': 'str' } @@ -37,19 +39,25 @@ class ColumnBriefDto(object): attribute_map = { 'id': 'id', 'name': 'name', + 'database_id': 'database_id', + 'table_id': 'table_id', 'internal_name': 'internal_name', 'column_type': 'column_type' } - def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None + self._database_id = None + self._table_id = None self._internal_name = None self._column_type = None self.discriminator = None self.id = id self.name = name + self.database_id = database_id + self.table_id = table_id self.internal_name = internal_name self.column_type = column_type @@ -99,6 +107,52 @@ class ColumnBriefDto(object): self._name = name + @property + def database_id(self): + """Gets the database_id of this ColumnBriefDto. # noqa: E501 + + + :return: The database_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._database_id + + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this ColumnBriefDto. + + + :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 + + self._database_id = database_id + + @property + def table_id(self): + """Gets the table_id of this ColumnBriefDto. # noqa: E501 + + + :return: The table_id of this ColumnBriefDto. # noqa: E501 + :rtype: int + """ + return self._table_id + + @table_id.setter + def table_id(self, table_id): + """Sets the table_id of this ColumnBriefDto. + + + :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 + :type: int + """ + if table_id is None: + raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 + + self._table_id = table_id + @property def internal_name(self): """Gets the internal_name of this ColumnBriefDto. # noqa: E501 diff --git a/swagger/api/api_user/models/creator_dto.py b/swagger/api/api_user/models/creator_dto.py index c73997b4ca6d2fbe153946c4d3e381a014ff037e..1e2c22d786d3f580c2f159b84029c65e0e6b1a3a 100644 --- a/swagger/api/api_user/models/creator_dto.py +++ b/swagger/api/api_user/models/creator_dto.py @@ -32,9 +32,7 @@ class CreatorDto(object): 'firstname': 'str', 'lastname': 'str', 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' + 'orcid': 'str' } attribute_map = { @@ -42,20 +40,16 @@ class CreatorDto(object): 'firstname': 'firstname', 'lastname': 'lastname', 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' + 'orcid': 'orcid' } - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 """CreatorDto - a model defined in Swagger""" # noqa: E501 self._id = None self._firstname = None self._lastname = None self._affiliation = None self._orcid = None - self._created = None - self._last_modified = None self.discriminator = None self.id = id self.firstname = firstname @@ -64,10 +58,6 @@ class CreatorDto(object): self.affiliation = affiliation if orcid is not None: self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified @property def id(self): @@ -180,48 +170,6 @@ class CreatorDto(object): self._orcid = orcid - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_user/models/identifier_dto.py b/swagger/api/api_user/models/identifier_dto.py index 0bde2bc0373a9fd98c5b2537c750f503e74c0182..fef15d9c4eec45fddbe5d9723dbd1fe263b5b310 100644 --- a/swagger/api/api_user/models/identifier_dto.py +++ b/swagger/api/api_user/models/identifier_dto.py @@ -309,7 +309,7 @@ class IdentifierDto(object): """ if visibility is None: raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 + allowed_values = ["everyone", "self"] # noqa: E501 if visibility not in allowed_values: raise ValueError( "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 diff --git a/swagger/api/api_user/models/image_brief_dto.py b/swagger/api/api_user/models/image_brief_dto.py index 38f8afc9138b465bb25d8d13d29a57882ad65294..ad702ef6e10e1253688f9cb6482991408e5a53b6 100644 --- a/swagger/api/api_user/models/image_brief_dto.py +++ b/swagger/api/api_user/models/image_brief_dto.py @@ -29,23 +29,27 @@ class ImageBriefDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str' } attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag' } - def __init__(self, id=None, repository=None, tag=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 """ImageBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag @@ -72,6 +76,29 @@ class ImageBriefDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageBriefDto. # noqa: E501 + + + :return: The registry of this ImageBriefDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageBriefDto. + + + :param registry: The registry of this ImageBriefDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageBriefDto. # noqa: E501 diff --git a/swagger/api/api_user/models/image_dto.py b/swagger/api/api_user/models/image_dto.py index d22578cd5da22092c63427b91c2c9cc37b27d5c3..3e0d8092179773cdf2cf2af0c8ac422bcfbc6235 100644 --- a/swagger/api/api_user/models/image_dto.py +++ b/swagger/api/api_user/models/image_dto.py @@ -29,6 +29,7 @@ class ImageDto(object): """ swagger_types = { 'id': 'int', + 'registry': 'str', 'repository': 'str', 'tag': 'str', 'dialect': 'str', @@ -43,6 +44,7 @@ class ImageDto(object): attribute_map = { 'id': 'id', + 'registry': 'registry', 'repository': 'repository', 'tag': 'tag', 'dialect': 'dialect', @@ -55,9 +57,10 @@ class ImageDto(object): 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None + self._registry = None self._repository = None self._tag = None self._dialect = None @@ -70,6 +73,7 @@ class ImageDto(object): self._default_port = None self.discriminator = None self.id = id + self.registry = registry self.repository = repository self.tag = tag self.dialect = dialect @@ -108,6 +112,29 @@ class ImageDto(object): self._id = id + @property + def registry(self): + """Gets the registry of this ImageDto. # noqa: E501 + + + :return: The registry of this ImageDto. # noqa: E501 + :rtype: str + """ + return self._registry + + @registry.setter + def registry(self, registry): + """Sets the registry of this ImageDto. + + + :param registry: The registry of this ImageDto. # noqa: E501 + :type: str + """ + if registry is None: + raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 + + self._registry = registry + @property def repository(self): """Gets the repository of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_user/models/table_brief_dto.py b/swagger/api/api_user/models/table_brief_dto.py index 2f9438d9c5ea088fc7f8e8c25556d81e1f0eb0b7..04ad24fd5220ea3c7850f714edc68fe16f055de5 100644 --- a/swagger/api/api_user/models/table_brief_dto.py +++ b/swagger/api/api_user/models/table_brief_dto.py @@ -31,7 +31,7 @@ class TableBriefDto(object): 'id': 'int', 'name': 'str', 'description': 'str', - 'creator': 'UserBriefDto', + 'owner': 'UserBriefDto', 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,24 +40,24 @@ class TableBriefDto(object): 'id': 'id', 'name': 'name', 'description': 'description', - 'creator': 'creator', + 'owner': 'owner', 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, columns=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 """TableBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._description = None - self._creator = None + self._owner = None self._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description - self.creator = creator + self.owner = owner self.columns = columns self.internal_name = internal_name @@ -131,27 +131,27 @@ class TableBriefDto(object): self._description = description @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 + def owner(self): + """Gets the owner of this TableBriefDto. # noqa: E501 - :return: The creator of this TableBriefDto. # noqa: E501 + :return: The owner of this TableBriefDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._owner - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. + @owner.setter + def owner(self, owner): + """Sets the owner of this TableBriefDto. - :param creator: The creator of this TableBriefDto. # noqa: E501 + :param owner: The owner of this TableBriefDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if owner is None: + raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - self._creator = creator + self._owner = owner @property def columns(self): diff --git a/swagger/api/api_user/models/user_update_dto.py b/swagger/api/api_user/models/user_update_dto.py index 1c7360891d675db2d764d815dc8d5948e812891c..13f81268bc84c1c1260f24b531713affccdb0c4b 100644 --- a/swagger/api/api_user/models/user_update_dto.py +++ b/swagger/api/api_user/models/user_update_dto.py @@ -31,28 +31,22 @@ class UserUpdateDto(object): 'firstname': 'str', 'lastname': 'str', 'affiliation': 'str', - 'orcid': 'str', - 'titles_before': 'str', - 'titles_after': 'str' + 'orcid': 'str' } attribute_map = { 'firstname': 'firstname', 'lastname': 'lastname', 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'titles_before': 'titles_before', - 'titles_after': 'titles_after' + 'orcid': 'orcid' } - def __init__(self, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None): # noqa: E501 + def __init__(self, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 """UserUpdateDto - a model defined in Swagger""" # noqa: E501 self._firstname = None self._lastname = None self._affiliation = None self._orcid = None - self._titles_before = None - self._titles_after = None self.discriminator = None if firstname is not None: self.firstname = firstname @@ -62,10 +56,6 @@ class UserUpdateDto(object): self.affiliation = affiliation if orcid is not None: self.orcid = orcid - if titles_before is not None: - self.titles_before = titles_before - if titles_after is not None: - self.titles_after = titles_after @property def firstname(self): @@ -151,48 +141,6 @@ class UserUpdateDto(object): self._orcid = orcid - @property - def titles_before(self): - """Gets the titles_before of this UserUpdateDto. # noqa: E501 - - - :return: The titles_before of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._titles_before - - @titles_before.setter - def titles_before(self, titles_before): - """Sets the titles_before of this UserUpdateDto. - - - :param titles_before: The titles_before of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._titles_before = titles_before - - @property - def titles_after(self): - """Gets the titles_after of this UserUpdateDto. # noqa: E501 - - - :return: The titles_after of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._titles_after - - @titles_after.setter - def titles_after(self, titles_after): - """Sets the titles_after of this UserUpdateDto. - - - :param titles_after: The titles_after of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._titles_after = titles_after - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/container/api.yaml b/swagger/container/api.yaml index bd8f5e74d4bbc1ad62e1c601504e3b1132c17f0f..2102e2f63cab2048d1c546149d233b3c141faf6d 100644 --- a/swagger/container/api.yaml +++ b/swagger/container/api.yaml @@ -32,18 +32,18 @@ paths: type: integer format: int64 responses: - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "200": description: Found image content: application/json: schema: $ref: '#/components/schemas/ImageDto' + "404": + description: Image could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' put: tags: - image-endpoint @@ -63,18 +63,18 @@ paths: $ref: '#/components/schemas/ImageChangeDto' required: true responses: - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "202": description: Updated image successfully content: application/json: schema: $ref: '#/components/schemas/ImageDto' + "404": + description: Image could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] delete: @@ -83,21 +83,21 @@ paths: summary: Delete some image operationId: delete parameters: - - name: imageId + - name: id in: path required: true schema: type: integer format: int64 responses: + "202": + description: Deleted image successfully "404": description: Image could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "202": - description: Deleted image successfully security: - bearerAuth: [] /api/container/{id}: @@ -114,18 +114,18 @@ paths: type: integer format: int64 responses: - "200": - description: Found container + "502": + description: Docker client failed to connect content: application/json: schema: - $ref: '#/components/schemas/ContainerDto' - "502": - description: Connection to the container failed + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Found container content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/ContainerDto' "404": description: Container image could not be found content: @@ -151,20 +151,20 @@ paths: $ref: '#/components/schemas/ContainerChangeDto' required: true responses: - "404": - description: Container or user could not be found + "409": + description: Container is already started/stopped content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Modification of container state is not permitted + "404": + description: Container or user could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Container is already started/stopped + "405": + description: Modification of container state is not permitted content: application/json: schema: @@ -196,14 +196,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "202": - description: Deleted container successfully "409": description: Container is still running content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Deleted container successfully security: - bearerAuth: [] /api/image: @@ -218,7 +218,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/ContainerImage' post: tags: - image-endpoint @@ -231,6 +233,12 @@ paths: $ref: '#/components/schemas/ImageCreateDto' required: true responses: + "201": + description: Created image + content: + application/json: + schema: + $ref: '#/components/schemas/ImageDto' "404": description: User could not be found content: @@ -255,12 +263,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "201": - description: Created image - content: - application/json: - schema: - $ref: '#/components/schemas/ImageDto' security: - bearerAuth: [] /api/container: @@ -282,7 +284,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/ContainerBriefDto' post: tags: - container-endpoint @@ -295,12 +299,6 @@ paths: $ref: '#/components/schemas/ContainerCreateRequestDto' required: true responses: - "502": - description: Docker client failed to connect - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "201": description: Created a new container content: @@ -319,6 +317,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Docker client failed to connect + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] components: @@ -328,8 +332,12 @@ components: - dialect - driver_class - jdbc_method + - registry type: object properties: + registry: + type: string + example: docker.io/library defaultPort: maximum: 65535 minimum: 1024 @@ -370,6 +378,84 @@ components: - password - privileged_username - privileged_password + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - id + - jdbc_method + - registry + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + registry: + type: string + example: docker.io/library + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 ApiErrorDto: required: - code @@ -384,6 +470,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -455,80 +542,6 @@ components: code: type: string example: error.service.code - ImageDateDto: - required: - - database_format - - example - - has_time - - id - - unix_format - type: object - properties: - id: - type: integer - format: int64 - example: - type: string - example: 30.01.2022 - database_format: - type: string - example: '%d.%c.%Y' - unix_format: - type: string - example: dd.MM.YYYY - has_time: - type: boolean - example: false - created_at: - type: string - format: date-time - ImageDto: - required: - - default_port - - dialect - - driver_class - - id - - jdbc_method - - repository - - tag - type: object - properties: - id: - type: integer - format: int64 - repository: - type: string - example: mariadb - tag: - type: string - example: "10.5" - dialect: - type: string - example: org.hibernate.dialect.MariaDBDialect - hash: - type: string - example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e - compiled: - type: string - format: date-time - example: 2021-03-12T15:26:21.678396092Z - size: - type: integer - example: 314295447 - driver_class: - type: string - example: org.mariadb.jdbc.Driver - date_formats: - type: array - items: - $ref: '#/components/schemas/ImageDateDto' - jdbc_method: - type: string - example: mariadb - default_port: - type: integer - format: int32 - example: 3306 ContainerChangeDto: required: - action @@ -570,188 +583,1125 @@ components: format: date-time internal_name: type: string - example: air-quality - CreatorBriefDto: - required: - - firstname - - lastname + example: air-quality + CreatorBriefDto: + required: + - firstname + - lastname + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Wesleyan University + DatabaseBriefDto: + required: + - id + - name + - owner + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + description: + type: string + example: Air Quality in Austria + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' + engine: + type: string + example: mariadb:10.5 + owner: + $ref: '#/components/schemas/UserBriefDto' + container: + $ref: '#/components/schemas/ContainerBriefDto' + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + is_public: + type: boolean + example: true + IdentifierBriefDto: + required: + - container id + - creators + - database id + - id + - publication_year + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creators: + type: array + items: + $ref: '#/components/schemas/CreatorBriefDto' + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + publication_year: + type: integer + format: int32 + example: 2022 + UserBriefDto: + required: + - id + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + username: + type: string + description: Only contains lowercase characters + example: jcarberry + name: + type: string + example: Josiah Carberry + orcid: + type: string + example: 0000-0002-1825-0097 + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + email_verified: + type: boolean + example: true + ImageCreateDto: + required: + - default_port + - dialect + - driver_class + - jdbc_method + - registry + - repository + - tag + type: object + properties: + registry: + type: string + example: docker.io/library + repository: + type: string + example: mariadb + tag: + type: string + dialect: + type: string + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + jdbc_method: + type: string + default_port: + maximum: 65535 + minimum: 1024 + type: integer + format: int32 + ContainerCreateRequestDto: + required: + - name + - repository + - tag + type: object + properties: + name: + type: string + example: Air Quality + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + Constraints: + type: object + properties: + uniques: + type: array + items: + $ref: '#/components/schemas/Unique' + foreignKeys: + type: array + items: + $ref: '#/components/schemas/ForeignKey' + checks: + uniqueItems: true + type: array + items: + type: string + Container: + type: object + properties: + id: + type: integer + format: int64 + createdBy: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + ownedBy: + type: string + format: uuid + owner: + $ref: '#/components/schemas/User' + name: + type: string + internalName: + type: string + hash: + type: string + imageId: + type: integer + format: int64 + port: + type: integer + format: int32 + database: + $ref: '#/components/schemas/Database' + image: + $ref: '#/components/schemas/ContainerImage' + ipAddress: + type: string + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + ContainerImage: + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + registry: + type: string + tag: + type: string + driverClass: + type: string + dialect: + type: string + jdbcMethod: + type: string + hash: + type: string + compiled: + type: string + format: date-time + size: + type: integer + format: int64 + defaultPort: + type: integer + format: int32 + environment: + type: array + items: + $ref: '#/components/schemas/ContainerImageEnvironmentItem' + dateFormats: + type: array + items: + $ref: '#/components/schemas/ContainerImageDate' + containers: + type: array + items: + $ref: '#/components/schemas/Container' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + ContainerImageDate: + type: object + properties: + id: + type: integer + format: int64 + iid: + type: integer + format: int64 + image: + $ref: '#/components/schemas/ContainerImage' + example: + type: string + hasTime: + type: boolean + databaseFormat: + type: string + unixFormat: + type: string + createdAt: + type: string + format: date-time + ContainerImageEnvironmentItem: + type: object + properties: + id: + type: integer + format: int64 + iid: + type: integer + format: int64 + key: + type: string + value: + type: string + type: + type: string + enum: + - USERNAME + - PASSWORD + - PRIVILEGED_USERNAME + - PRIVILEGED_PASSWORD + image: + $ref: '#/components/schemas/ContainerImage' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + Creator: + type: object + properties: + id: + type: integer + format: int64 + pid: + type: integer + format: int64 + firstname: + type: string + lastname: + type: string + affiliation: + type: string + orcid: + type: string + identifier: + $ref: '#/components/schemas/Identifier' + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/User' + lastModified: + type: string + format: date-time + Credential: + type: object + properties: + id: + type: string + format: uuid + type: + type: string + userId: + type: string + format: uuid + createdDate: + type: integer + format: int64 + secretData: + type: string + credentialData: + type: string + priority: + type: integer + format: int32 + user: + $ref: '#/components/schemas/User' + Database: + type: object + properties: + id: + type: integer + format: int64 + createdBy: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + ownedBy: + type: string + format: uuid + owner: + $ref: '#/components/schemas/User' + container: + $ref: '#/components/schemas/Container' + name: + type: string + internalName: + type: string + exchangeName: + type: string + description: + type: string + contactPerson: + type: string + format: uuid + contact: + $ref: '#/components/schemas/User' + identifier: + $ref: '#/components/schemas/Identifier' + tables: + type: array + items: + $ref: '#/components/schemas/Table' + views: + type: array + items: + $ref: '#/components/schemas/View' + isPublic: + type: boolean + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + ForeignKey: + type: object + properties: + fkid: + type: integer + format: int64 + tid: + type: integer + format: int64 + tdbid: + type: integer + format: int64 + table: + $ref: '#/components/schemas/Table' + rtid: + type: integer + format: int64 + rtdbid: + type: integer + format: int64 + referencedTable: + $ref: '#/components/schemas/Table' + references: + type: array + items: + $ref: '#/components/schemas/ForeignKeyReference' + onUpdate: + type: string + enum: + - ReferenceType.RESTRICT + - ReferenceType.CASCADE + - ReferenceType.SET_NULL + - ReferenceType.NO_ACTION + - ReferenceType.SET_DEFAULT + onDelete: + type: string + enum: + - ReferenceType.RESTRICT + - ReferenceType.CASCADE + - ReferenceType.SET_NULL + - ReferenceType.NO_ACTION + - ReferenceType.SET_DEFAULT + ForeignKeyReference: + type: object + properties: + id: + type: integer + format: int64 + foreignKey: + $ref: '#/components/schemas/ForeignKey' + column: + $ref: '#/components/schemas/TableColumn' + referencedColumn: + $ref: '#/components/schemas/TableColumn' + Identifier: + required: + - publisher + type: object + properties: + id: + type: integer + format: int64 + containerId: + type: integer + format: int64 + databaseId: + type: integer + format: int64 + queryId: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/User' + title: + type: string + description: + type: string + publisher: + type: string + language: + type: string + enum: + - LanguageType.AB + - LanguageType.AA + - LanguageType.AF + - LanguageType.AK + - LanguageType.SQ + - LanguageType.AM + - LanguageType.AR + - LanguageType.AN + - LanguageType.HY + - LanguageType.AS + - LanguageType.AV + - LanguageType.AE + - LanguageType.AY + - LanguageType.AZ + - LanguageType.BM + - LanguageType.BA + - LanguageType.EU + - LanguageType.BE + - LanguageType.BN + - LanguageType.BH + - LanguageType.BI + - LanguageType.BS + - LanguageType.BR + - LanguageType.BG + - LanguageType.MY + - LanguageType.CA + - LanguageType.KM + - LanguageType.CH + - LanguageType.CE + - LanguageType.NY + - LanguageType.ZH + - LanguageType.CU + - LanguageType.CV + - LanguageType.KW + - LanguageType.CO + - LanguageType.CR + - LanguageType.HR + - LanguageType.CS + - LanguageType.DA + - LanguageType.DV + - LanguageType.NL + - LanguageType.DZ + - LanguageType.EN + - LanguageType.EO + - LanguageType.ET + - LanguageType.EE + - LanguageType.FO + - LanguageType.FJ + - LanguageType.FI + - LanguageType.FR + - LanguageType.FF + - LanguageType.GD + - LanguageType.GL + - LanguageType.LG + - LanguageType.KA + - LanguageType.DE + - LanguageType.KI + - LanguageType.EL + - LanguageType.KL + - LanguageType.GN + - LanguageType.GU + - LanguageType.HT + - LanguageType.HA + - LanguageType.HE + - LanguageType.HZ + - LanguageType.HI + - LanguageType.HO + - LanguageType.HU + - LanguageType.IS + - LanguageType.IO + - LanguageType.IG + - LanguageType.ID + - LanguageType.IA + - LanguageType.IE + - LanguageType.IU + - LanguageType.IK + - LanguageType.GA + - LanguageType.IT + - LanguageType.JA + - LanguageType.JV + - LanguageType.KN + - LanguageType.KR + - LanguageType.KS + - LanguageType.KK + - LanguageType.RW + - LanguageType.KV + - LanguageType.KG + - LanguageType.KO + - LanguageType.KJ + - LanguageType.KU + - LanguageType.KY + - LanguageType.LO + - LanguageType.LA + - LanguageType.LV + - LanguageType.LB + - LanguageType.LI + - LanguageType.LN + - LanguageType.LT + - LanguageType.LU + - LanguageType.MK + - LanguageType.MG + - LanguageType.MS + - LanguageType.ML + - LanguageType.MT + - LanguageType.GV + - LanguageType.MI + - LanguageType.MR + - LanguageType.MH + - LanguageType.RO + - LanguageType.MN + - LanguageType.NA + - LanguageType.NV + - LanguageType.ND + - LanguageType.NG + - LanguageType.NE + - LanguageType.SE + - LanguageType.NO + - LanguageType.NB + - LanguageType.NN + - LanguageType.II + - LanguageType.OC + - LanguageType.OJ + - LanguageType.OR + - LanguageType.OM + - LanguageType.OS + - LanguageType.PI + - LanguageType.PA + - LanguageType.PS + - LanguageType.FA + - LanguageType.PL + - LanguageType.PT + - LanguageType.QU + - LanguageType.RM + - LanguageType.RN + - LanguageType.RU + - LanguageType.SM + - LanguageType.SG + - LanguageType.SA + - LanguageType.SC + - LanguageType.SR + - LanguageType.SN + - LanguageType.SD + - LanguageType.SI + - LanguageType.SK + - LanguageType.SL + - LanguageType.SO + - LanguageType.ST + - LanguageType.NR + - LanguageType.ES + - LanguageType.SU + - LanguageType.SW + - LanguageType.SS + - LanguageType.SV + - LanguageType.TL + - LanguageType.TY + - LanguageType.TG + - LanguageType.TA + - LanguageType.TT + - LanguageType.TE + - LanguageType.TH + - LanguageType.BO + - LanguageType.TI + - LanguageType.TO + - LanguageType.TS + - LanguageType.TN + - LanguageType.TR + - LanguageType.TK + - LanguageType.TW + - LanguageType.UG + - LanguageType.UK + - LanguageType.UR + - LanguageType.UZ + - LanguageType.VE + - LanguageType.VI + - LanguageType.VO + - LanguageType.WA + - LanguageType.CY + - LanguageType.FY + - LanguageType.WO + - LanguageType.XH + - LanguageType.YI + - LanguageType.YO + - LanguageType.ZA + - LanguageType.ZU + license: + $ref: '#/components/schemas/License' + type: + type: string + enum: + - DATABASE + - SUBSET + query: + type: string + queryNormalized: + type: string + queryHash: + type: string + resultHash: + type: string + execution: + type: string + format: date-time + resultNumber: + type: integer + format: int64 + publicationYear: + type: integer + format: int32 + publicationMonth: + type: integer + format: int32 + publicationDay: + type: integer + format: int32 + visibility: + type: string + enum: + - VisibilityType.EVERYONE + - VisibilityType.SELF + database: + $ref: '#/components/schemas/Database' + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifier' + doi: + type: string + creators: + type: array + items: + $ref: '#/components/schemas/Creator' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + License: + type: object + properties: + identifier: + type: string + uri: + type: string + RelatedIdentifier: + type: object + properties: + id: + type: integer + format: int64 + iid: + type: integer + format: int64 + value: + type: string + type: + type: string + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + creator: + $ref: '#/components/schemas/User' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time + Role: type: object properties: - firstname: + id: type: string - example: Josiah - lastname: + format: uuid + name: type: string - example: Carberry - affiliation: + realmId: type: string - example: Wesleyan University - DatabaseBriefDto: - required: - - id - - name - - owner + format: uuid + users: + type: array + items: + $ref: '#/components/schemas/User' + Table: type: object properties: id: type: integer format: int64 + tdbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/User' + owner: + $ref: '#/components/schemas/User' name: type: string - example: Air Quality - description: + internalName: type: string - example: Air Quality in Austria - identifier: - $ref: '#/components/schemas/IdentifierBriefDto' - engine: + queueName: type: string - example: mariadb:10.5 - owner: - $ref: '#/components/schemas/UserBriefDto' - container: - $ref: '#/components/schemas/ContainerBriefDto' - creator: - $ref: '#/components/schemas/UserBriefDto' + routingKey: + type: string + description: + type: string + database: + $ref: '#/components/schemas/Database' + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + constraints: + $ref: '#/components/schemas/Constraints' created: type: string format: date-time - is_public: - type: boolean - example: true - IdentifierBriefDto: - required: - - container id - - creators - - database id - - id - - publication_year - - title - - type + lastModified: + type: string + format: date-time + TableColumn: type: object properties: id: type: integer format: int64 - title: + tid: + type: integer + format: int64 + cdbid: + type: integer + format: int64 + dfid: + type: integer + format: int64 + dateFormat: + $ref: '#/components/schemas/ContainerImageDate' + table: + $ref: '#/components/schemas/Table' + view: + $ref: '#/components/schemas/View' + creator: + $ref: '#/components/schemas/User' + name: type: string - example: "Airquality Stephansplatz, Vienna, Austria" - type: + autoGenerated: + type: boolean + internalName: type: string - enum: - - database - - subset - doi: + isPrimaryKey: + type: boolean + indexLength: + type: integer + format: int32 + alias: type: string - example: 10.1038/nphys1170 - publisher: + columnType: type: string - example: TU Wien - creators: + enum: + - TableColumnType.ENUM + - TableColumnType.NUMBER + - TableColumnType.DECIMAL + - TableColumnType.STRING + - TableColumnType.TEXT + - TableColumnType.BOOLEAN + - TableColumnType.DATE + - TableColumnType.TIMESTAMP + - TableColumnType.BLOB + length: + type: integer + format: int32 + isNullAllowed: + type: boolean + enumValues: type: array items: - $ref: '#/components/schemas/CreatorBriefDto' + type: string + ordinalPosition: + type: integer + format: int32 created: type: string format: date-time + concept: + $ref: '#/components/schemas/TableColumnConcept' + unit: + $ref: '#/components/schemas/TableColumnUnit' lastModified: type: string format: date-time - container id: + TableColumnConcept: + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + TableColumnUnit: + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + Unique: + type: object + properties: + uid: type: integer format: int64 - example: 1 - database id: + tid: type: integer format: int64 - example: 1 - query id: + tdbid: type: integer format: int64 - example: 1 - publication_year: - type: integer - format: int32 - example: 2022 - UserBriefDto: - required: - - id - - username + table: + $ref: '#/components/schemas/Table' + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + User: type: object properties: id: type: string format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 username: type: string - description: Only contains lowercase characters - example: jcarberry - name: + firstname: type: string - example: Josiah Carberry - orcid: + lastname: type: string - example: 0000-0002-1825-0097 - given_name: + realmId: type: string - example: Josiah - family_name: + format: uuid + email: type: string - example: Carberry - email_verified: + emailVerified: type: boolean - example: true - ImageCreateDto: - required: - - default_port - - dialect - - driver_class - - jdbc_method - - repository - - tag + enabled: + type: boolean + createdTimestamp: + type: integer + format: int64 + databasePassword: + type: string + attributes: + type: array + items: + $ref: '#/components/schemas/UserAttribute' + credentials: + type: array + items: + $ref: '#/components/schemas/Credential' + containers: + type: array + items: + $ref: '#/components/schemas/Container' + databases: + type: array + items: + $ref: '#/components/schemas/Database' + identifiers: + type: array + items: + $ref: '#/components/schemas/Identifier' + roles: + type: array + items: + $ref: '#/components/schemas/Role' + tables: + type: array + items: + $ref: '#/components/schemas/Table' + UserAttribute: type: object properties: - repository: - type: string - example: mariadb - tag: + id: type: string - dialect: + format: uuid + userId: type: string - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' - driver_class: + format: uuid + name: type: string - jdbc_method: + value: type: string - default_port: - type: integer - format: int32 - ContainerCreateRequestDto: - required: - - name - - repository - - tag + user: + $ref: '#/components/schemas/User' + View: type: object properties: + id: + type: integer + format: int64 + vcid: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + createdBy: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + database: + $ref: '#/components/schemas/Database' name: type: string - example: Air Quality - repository: + internalName: type: string - example: mariadb - tag: + isPublic: + type: boolean + isInitialView: + type: boolean + query: type: string - example: "10.5" + columns: + type: array + items: + $ref: '#/components/schemas/TableColumn' + created: + type: string + format: date-time + lastModified: + type: string + format: date-time ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -760,6 +1710,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -848,12 +1804,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -967,7 +1917,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1218,6 +2167,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1225,6 +2175,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1325,11 +2278,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -1341,7 +2294,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array diff --git a/swagger/database/api.yaml b/swagger/database/api.yaml index a9f5bff74e5ea70fdfdecbcb8cc0c7ae5bd1941a..40b76995cc7f1fb0776ba1cd9e7dabb012ca377f 100644 --- a/swagger/database/api.yaml +++ b/swagger/database/api.yaml @@ -50,18 +50,18 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Visibility modification is not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "202": description: Visibility modified successfully content: application/json: schema: $ref: '#/components/schemas/DatabaseDto' + "405": + description: Visibility modification is not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/transfer: @@ -90,18 +90,18 @@ paths: $ref: '#/components/schemas/DatabaseTransferDto' required: true responses: - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "202": description: Transfer of ownership was successful content: application/json: schema: $ref: '#/components/schemas/DatabaseDto' + "404": + description: Database or user could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Transfer of ownership is not permitted content: @@ -141,20 +141,20 @@ paths: $ref: '#/components/schemas/DatabaseModifyAccessDto' required: true responses: - "202": - description: Modify access succeeded - "400": - description: Modify access query or database connection is malformed + "404": + description: Database or user not found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Database or user not found + "400": + description: Modify access query or database connection is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Modify access succeeded "403": description: Modify access not permitted when no access is granted in the first place @@ -188,32 +188,32 @@ paths: schema: type: string responses: - "202": - description: Revoked access successfully - "400": - description: Modify access query or database connection is malformed + "404": + description: User with access was not found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "403": - description: Revoke of access not permitted as no access was found + "400": + description: Modify access query or database connection is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: User with access was not found + "405": + description: Revoke of access not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Revoke of access not permitted + "403": + description: Revoke of access not permitted as no access was found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Revoked access successfully security: - bearerAuth: [] /api/container/{id}/database: @@ -235,7 +235,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/DatabaseBriefDto' post: tags: - database-endpoint @@ -255,26 +257,21 @@ paths: $ref: '#/components/schemas/DatabaseCreateDto' required: true responses: - "501": - description: Container image is not supported - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "201": description: Created a new database content: application/json: schema: $ref: '#/components/schemas/DatabaseBriefDto' - "502": - description: Connection to the container failed + "404": + description: "Container, user or database could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Database create query is malformed + "406": + description: Failed to create user at broker service or virtual host could + not be reached at broker service content: application/json: schema: @@ -286,27 +283,32 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Container, user or database could not be found" + "501": + description: Container image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Failed to create user at broker service or virtual host could - not be reached at broker service + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Database name already exist or query store could not be created + "502": + description: Connection to the container failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "400": + description: Database create query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Database name already exist or query store could not be created content: application/json: schema: @@ -333,18 +335,18 @@ paths: type: integer format: int64 responses: - "200": - description: Found database access - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseAccessDto' "403": description: No access to this database content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Found database access + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseAccessDto' "405": description: Check access is not permitted content: @@ -380,14 +382,14 @@ paths: responses: "202": description: Granting access succeeded - "400": - description: Granting access query or database connection is malformed + "405": + description: Granting access not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Granting access not permitted + "400": + description: Granting access query or database connection is malformed content: application/json: schema: @@ -420,12 +422,6 @@ paths: type: integer format: int64 responses: - "200": - description: Database found successfully - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseDto' "405": description: Database information is not permitted content: @@ -433,11 +429,17 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Database could not be found + description: Database or container could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Database found successfully + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseDto' security: - bearerAuth: [] delete: @@ -459,39 +461,33 @@ paths: type: integer format: int64 responses: - "201": - description: Deleted a database - content: - application/json: - schema: - $ref: '#/components/schemas/DatabaseBriefDto' - "405": - description: Database delete permission is missing or revoke permissions - at broker service failed + "400": + description: Database delete query is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Container image is not supported + "404": + description: Container or database could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "502": - description: Connection to the container failed + "405": + description: Database delete permission is missing or revoke permissions + at broker service failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Database delete query is malformed + "501": + description: Container image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Container or database could not be found + "503": + description: Connection to the database failed content: application/json: schema: @@ -503,12 +499,18 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "502": + description: Connection to the container failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "201": + description: Deleted a database + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseBriefDto' security: - bearerAuth: [] /api/container/{id}/database/license: @@ -530,7 +532,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DatabaseBriefDto' + type: array + items: + $ref: '#/components/schemas/LicenseDto' components: schemas: DatabaseModifyVisibilityDto: @@ -555,6 +559,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -629,9 +634,11 @@ components: ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -640,6 +647,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -728,12 +741,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -847,7 +854,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1098,6 +1104,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1105,6 +1112,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1145,6 +1155,7 @@ components: - driver_class - id - jdbc_method + - registry - repository - tag type: object @@ -1152,6 +1163,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1279,11 +1293,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -1295,7 +1309,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -1575,12 +1589,6 @@ components: type: array items: $ref: '#/components/schemas/CreatorBriefDto' - created: - type: string - format: date-time - lastModified: - type: string - format: date-time container id: type: integer format: int64 diff --git a/swagger/generate.sh b/swagger/generate.sh index 0b713904a6602768a58826ad600ac9779d14422a..a5ca8017a498d330ad46681648897aae8c6fc371 100755 --- a/swagger/generate.sh +++ b/swagger/generate.sh @@ -2,20 +2,21 @@ declare -A services services[5000]=analyse -services[5010]=semantics services[9091]=container services[9092]=database services[9093]=query services[9094]=table services[9096]=identifier +services[9097]=semantics services[9098]=user services[9099]=metadata function retrieve () { - echo "... retrieve api" - if [[ "$2" == semantics ]] || [[ "$2" == analyse ]]; then + if [[ "$2" == analyse ]]; then + echo "... retrieve json api from localhost:$1" wget "http://localhost:$1/api-$2.json" -O "./api-$2.yaml" -q else + echo "... retrieve yaml api from localhost:$1" wget "http://localhost:$1/v3/api-docs.yaml" -O "./api-$2.yaml" -q fi } diff --git a/swagger/identifier/api.yaml b/swagger/identifier/api.yaml index a3326c73910181df0c1e310c680b1ad1fd802b1f..002b392bb6df32db0e8153596b5d397297ffb6af 100644 --- a/swagger/identifier/api.yaml +++ b/swagger/identifier/api.yaml @@ -18,10 +18,10 @@ servers: - url: https://dbrepo2.tuwien.ac.at description: Sandbox paths: - /api/identifier/{id}: + /api/pid/{id}: put: tags: - - identifier-endpoint + - persistence-endpoint summary: Update some identifier operationId: update parameters: @@ -35,11 +35,11 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IdentifierDto' + $ref: '#/components/schemas/IdentifierUpdateDto' required: true responses: - "404": - description: Identifier could not be found + "405": + description: Updating identifier not permitted content: application/json: schema: @@ -50,6 +50,18 @@ paths: application/json: schema: $ref: '#/components/schemas/IdentifierDto' + "404": + description: Identifier or user could not be found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Identifier data is not valid to the form + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "406": description: Updating identifier not allowed content: @@ -60,7 +72,7 @@ paths: - bearerAuth: [] delete: tags: - - identifier-endpoint + - persistence-endpoint summary: Delete some identifier operationId: delete parameters: @@ -77,6 +89,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Deleting identifier not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "202": description: Deleted identifier security: @@ -114,7 +132,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/IdentifierDto' post: tags: - identifier-endpoint @@ -133,20 +153,14 @@ paths: $ref: '#/components/schemas/IdentifierCreateDto' required: true responses: - "201": - description: Created identifier - content: - application/json: - schema: - $ref: '#/components/schemas/IdentifierDto' - "404": - description: "Query, database or user could not be found" + "406": + description: Creating identifier not allowed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Identifier for this resource already exists + "400": + description: Identifier form contains invalid request data content: application/json: schema: @@ -157,14 +171,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Creating identifier not allowed + "201": + description: Created identifier content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Identifier form contains invalid request data + $ref: '#/components/schemas/IdentifierDto' + "403": + description: Insufficient access rights or authorities content: application/json: schema: @@ -175,6 +189,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Identifier for this resource already exists + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/pid/{pid}: @@ -208,6 +228,13 @@ paths: text/bibliography; style=apa: {} text/bibliography; style=ieee: {} text/bibliography; style=bibtex: {} + "404": + description: Identifier could not be exported from database as the resource + was not found + content: + text/csv: + schema: + $ref: '#/components/schemas/ApiErrorDto' "400": description: "Identifier could not be exported, the requested style is not\ \ known" @@ -221,13 +248,6 @@ paths: text/csv: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Identifier could not be exported from database as the resource - was not found - content: - text/csv: - schema: - $ref: '#/components/schemas/ApiErrorDto' components: schemas: CreatorDto: @@ -252,32 +272,29 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time - IdentifierDto: + IdentifierUpdateDto: required: - - container id + - cid - creators - - database id - - execution + - dbid - publication_year - - query - - query_hash - - query_normalized - - result_hash - - result_number - title - type - visibility type: object properties: - id: + cid: + type: integer + format: int64 + dbid: type: integer format: int64 + qid: + type: integer + format: int64 + doi: + type: string + example: 10.1038/nphys1170 type: type: string enum: @@ -289,23 +306,12 @@ components: description: type: string example: "Air quality reports at Stephansplatz, Vienna" - query: - type: string - example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ - \ = \"09:STEF\"" - execution: - type: string - format: date-time visibility: type: string example: everyone enum: - everyone - - trusted - self - doi: - type: string - example: 10.1038/nphys1170 publisher: type: string example: TU Wien @@ -502,38 +508,6 @@ components: type: array items: $ref: '#/components/schemas/CreatorDto' - created: - type: string - format: date-time - container id: - type: integer - format: int64 - example: 1 - database id: - type: integer - format: int64 - example: 1 - query id: - type: integer - format: int64 - example: 1 - query_normalized: - type: string - example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ - \ = \"09:STEF\"" - related: - type: array - items: - $ref: '#/components/schemas/RelatedIdentifierDto' - query_hash: - type: string - description: query hash in sha512 - result_hash: - type: string - result_number: - type: integer - format: int64 - example: 1 publication_day: type: integer format: int32 @@ -546,9 +520,10 @@ components: type: integer format: int32 example: 2022 - last_modified: - type: string - format: date-time + related_identifiers: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierCreateDto' LicenseDto: required: - identifier @@ -561,16 +536,11 @@ components: uri: type: string example: https://opensource.org/licenses/MIT - RelatedIdentifierDto: + RelatedIdentifierCreateDto: required: - - created - - id - value type: object properties: - id: - type: integer - format: int64 value: type: string example: 10.70124/dc4zh-9ce78 @@ -634,12 +604,6 @@ components: - Requires - IsObsoletedBy - Obsoletes - created: - type: string - format: date-time - last_modified: - type: string - format: date-time ApiErrorDto: required: - code @@ -654,6 +618,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -725,41 +690,24 @@ components: code: type: string example: error.service.code - CreatorCreateDto: - required: - - firstname - - lastname - type: object - properties: - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Wesleyan University - orcid: - type: string - example: 0000-0002-1825-0097 - IdentifierCreateDto: + IdentifierDto: required: - - cid + - container id - creators - - dbid + - database id + - execution - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number - title - type + - visibility type: object properties: - cid: - type: integer - format: int64 - dbid: - type: integer - format: int64 - qid: + id: type: integer format: int64 type: @@ -773,6 +721,22 @@ components: description: type: string example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - self + doi: + type: string + example: 10.1038/nphys1170 publisher: type: string example: TU Wien @@ -968,7 +932,39 @@ components: creators: type: array items: - $ref: '#/components/schemas/CreatorCreateDto' + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 publication_day: type: integer format: int32 @@ -981,15 +977,19 @@ components: type: integer format: int32 example: 2022 - related_identifiers: - type: array - items: - $ref: '#/components/schemas/RelatedIdentifierCreateDto' - RelatedIdentifierCreateDto: + last_modified: + type: string + format: date-time + RelatedIdentifierDto: required: + - created + - id - value type: object properties: + id: + type: integer + format: int64 value: type: string example: 10.70124/dc4zh-9ce78 @@ -1053,6 +1053,279 @@ components: - Requires - IsObsoletedBy - Obsoletes + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + CreatorCreateDto: + required: + - firstname + - lastname + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + IdentifierCreateDto: + required: + - cid + - creators + - dbid + - publication_year + - title + - type + - visibility + type: object + properties: + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + qid: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + visibility: + type: string + example: everyone + enum: + - everyone + - self + publisher: + type: string + example: TU Wien + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorCreateDto' + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + related_identifiers: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierCreateDto' securitySchemes: bearerAuth: type: http diff --git a/swagger/metadata/api.yaml b/swagger/metadata/api.yaml index 6ce01267d1c7b283d3ee94006c7b26fb0ce4389e..bc1c717b5b0b8c20060728b7f1ec377f764cdbe9 100644 --- a/swagger/metadata/api.yaml +++ b/swagger/metadata/api.yaml @@ -52,11 +52,11 @@ components: type: string resumptionToken: type: string - parametersString: - type: string fromDate: type: string format: date-time untilDate: type: string format: date-time + parametersString: + type: string diff --git a/swagger/query/api.yaml b/swagger/query/api.yaml index a40d3d70f0437a011147ac7719a9dba32677c208..16168d93b08fc5f2d3b79131526ad2c8a027b0eb 100644 --- a/swagger/query/api.yaml +++ b/swagger/query/api.yaml @@ -23,7 +23,7 @@ paths: tags: - table-history-endpoint summary: Find all history - operationId: getAll_1 + operationId: getAll parameters: - name: id in: path @@ -44,38 +44,40 @@ paths: type: integer format: int64 responses: - "504": - description: Query store failed to query table history + "405": + description: Find table history is not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Table history query is malformed + "200": + description: Find table history successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + type: array + items: + $ref: '#/components/schemas/TableHistoryDto' + "404": + description: "Table, database or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: Find table history successfully + "504": + description: Query store failed to query table history content: application/json: schema: - type: string - "404": - description: "Table, database or user could not be found" + $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find table history is not permitted + "400": + description: Table history query is malformed content: application/json: schema: @@ -86,7 +88,7 @@ paths: tags: - table-history-endpoint summary: Find all history - operationId: getAll + operationId: getAll_1 parameters: - name: id in: path @@ -107,38 +109,40 @@ paths: type: integer format: int64 responses: - "504": - description: Query store failed to query table history + "405": + description: Find table history is not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Table history query is malformed + "200": + description: Find table history successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + type: array + items: + $ref: '#/components/schemas/TableHistoryDto' + "404": + description: "Table, database or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: Find table history successfully + "504": + description: Query store failed to query table history content: application/json: schema: - type: string - "404": - description: "Table, database or user could not be found" + $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find table history is not permitted + "400": + description: Table history query is malformed content: application/json: schema: @@ -150,7 +154,7 @@ paths: tags: - table-data-endpoint summary: Find data - operationId: getAll_3 + operationId: getAll_2 parameters: - name: id in: path @@ -320,7 +324,7 @@ paths: tags: - table-data-endpoint summary: Find data - operationId: getAll_2 + operationId: getAll_3 parameters: - name: id in: path @@ -406,26 +410,20 @@ paths: type: integer format: int64 responses: - "405": - description: Find query is not permitted + "200": + description: List queries content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/QueryDto' "404": description: "Database, query or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: List queries - content: - application/json: - schema: - $ref: '#/components/schemas/QueryDto' - "503": - description: Connection to the database failed + "405": + description: Find query is not permitted content: application/json: schema: @@ -442,6 +440,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] put: @@ -475,6 +479,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "501": + description: Image is not supported + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' "200": description: Persist query successful content: @@ -487,8 +497,8 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "504": + description: Query store failed to persist query content: application/json: schema: @@ -499,12 +509,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Query store failed to persist query - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/view: @@ -544,7 +548,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' security: - bearerAuth: [] post: @@ -578,20 +584,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Create view is not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "404": + description: Database or user could not be found content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Create view query is malformed + "405": + description: Create view is not permitted content: application/json: schema: @@ -602,24 +602,30 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Database or user could not be found + "201": + description: Create view successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/ViewBriefDto' "423": description: Create view resulted in an invalid query statement content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "201": - description: Create view successfully + "400": + description: Create view query is malformed content: application/json: schema: - $ref: '#/components/schemas/ViewBriefDto' + $ref: '#/components/schemas/ApiErrorDto' + "503": + description: Connection to the database failed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/table/{tableId}/data/import: @@ -683,49 +689,51 @@ paths: schema: type: boolean responses: - "200": - description: List queries + "405": + description: Find all queries is not permitted content: application/json: schema: - type: string - "503": - description: Connection to the database failed + $ref: '#/components/schemas/ApiErrorDto' + "501": + description: Image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find all queries is not permitted + "504": + description: Query store failed to select query content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Selection of time-versioned query resulted in an invalid query - statement + "404": + description: "Database, container or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "423": + description: Selection of time-versioned query resulted in an invalid query + statement content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Database, container or user could not be found" + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Query store failed to select query + "200": + description: List queries content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + type: array + items: + $ref: '#/components/schemas/QueryBriefDto' security: - bearerAuth: [] post: @@ -812,12 +820,6 @@ paths: type: integer format: int64 responses: - "405": - description: Find view is not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "200": description: Find view successfully content: @@ -830,6 +832,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Find view is not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] delete: @@ -863,40 +871,40 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "403": + description: Credentials missing content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "403": - description: Credentials missing + "404": + description: "Database, view or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Delete view is not permitted + "400": + description: Delete view query is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "200": description: Delete view successfully - "404": - description: "Database, view or user could not be found" + "423": + description: Delete view resulted in an invalid query statement content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Delete view query is malformed + "503": + description: Connection to the database failed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Delete view resulted in an invalid query statement + "405": + description: Delete view is not permitted content: application/json: schema: @@ -941,14 +949,14 @@ paths: type: integer format: int64 responses: - "401": - description: Credentials missing + "200": + description: Find data successfully content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Query store failed to query view data + $ref: '#/components/schemas/QueryResultDto' + "401": + description: Credentials missing content: application/json: schema: @@ -959,26 +967,26 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "503": - description: Connection to the database failed + "403": + description: Credentials missing content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: Find data successfully + "417": + description: Parsing of resulting columns failed content: application/json: schema: - $ref: '#/components/schemas/QueryResultDto' - "403": - description: Credentials missing + $ref: '#/components/schemas/ApiErrorDto' + "504": + description: Query store failed to query view data content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "404": + description: "Database, view, container or user could not be found" content: application/json: schema: @@ -989,20 +997,20 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Database, view, container or user could not be found" + "501": + description: Image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Parsing of resulting columns failed + "405": + description: Find data is not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Find data is not permitted + "503": + description: Connection to the database failed content: application/json: schema: @@ -1275,6 +1283,7 @@ components: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING + - 103 EARLY_HINTS - 103 CHECKPOINT - 200 OK - 201 CREATED @@ -1346,6 +1355,22 @@ components: code: type: string example: error.service.code + TableHistoryDto: + required: + - event + - timestamp + - total + type: object + properties: + timestamp: + type: string + format: date-time + event: + type: string + total: + type: integer + format: int64 + example: 1 QueryResultDto: required: - id @@ -1382,9 +1407,11 @@ components: ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -1393,6 +1420,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -1481,12 +1514,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -1600,7 +1627,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1851,6 +1877,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1858,6 +1885,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1898,6 +1928,7 @@ components: - driver_class - id - jdbc_method + - registry - repository - tag type: object @@ -1905,6 +1936,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -2091,11 +2125,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -2107,7 +2141,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -2352,6 +2386,124 @@ components: last_modified: type: string format: date-time + CreatorBriefDto: + required: + - firstname + - lastname + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Wesleyan University + IdentifierBriefDto: + required: + - container id + - creators + - database id + - id + - publication_year + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creators: + type: array + items: + $ref: '#/components/schemas/CreatorBriefDto' + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + publication_year: + type: integer + format: int32 + example: 2022 + QueryBriefDto: + required: + - cid + - created + - creator + - dbid + - id + - query + - query_hash + type: object + properties: + id: + type: integer + format: int64 + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/UserDto' + execution: + type: string + format: date-time + query: + type: string + example: SELECT `id` FROM `air_quality` + type: + type: string + example: query + enum: + - query + - view + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' + created: + type: string + format: date-time + query_normalized: + type: string + example: SELECT `id` FROM `air_quality` + query_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_number: + type: integer + format: int64 + example: 1 + last_modified: + type: string + format: date-time TableCsvDeleteDto: required: - keys diff --git a/swagger/semantics/api.yaml b/swagger/semantics/api.yaml index 20727fde93075baaf0279685df81e7f9320c5f80..c001c6d7bb3539f64f83b76b093d90ac679ce30b 100644 --- a/swagger/semantics/api.yaml +++ b/swagger/semantics/api.yaml @@ -1 +1,685 @@ -{"definitions":{},"externalDocs":{"description":"Sourcecode Documentation","url":"https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services"},"info":{"contact":{"email":"andreas.rauber@tuwien.ac.at","name":"Prof. Andreas Rauber"},"description":"Service for assigning concepts to database tables and columns.","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"title":"Database Repository Unit / Ontology Service API","version":"1.2.0"},"openapi":"3.0.0","paths":{"/api/semantics/concept":{"get":{"consumes":["application/json"],"description":"This is a simple API which returns a list of suggested concepts.","parameters":[{"description":"The query to retrieve a fitting concept","in":"query","name":"q","schema":{"type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Suggest a concept","tags":["concepts-endpoint"]},"post":{"consumes":["application/json"],"description":"This is a simple API for saving concept","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"example":"metre","type":"string"},"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/metre","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"405":{"description":"Invalid input"},"409":{"description":"Concept already present"}},"summary":"Save concept to MDB","tags":["concepts-endpoint"]},"put":{"consumes":["application/json"],"description":"This is a simple API for retrieving label from concepts","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"uri":{"example":"http://www.wikidata.org/entity/Q35120","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid URI"},"500":{"description":"Server error"}},"summary":"Retrieve label from URI","tags":["concepts-endpoint"]}},"/api/semantics/concept/{concept}/validate":{"get":{"consumes":["application/json"],"description":"This is a simple API for validating concepts.","parameters":[{"description":"Validates concepts against om-2.","in":"path","name":"unit","required":true,"schema":{"example":"distance","type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Validate concepts","tags":["concepts-endpoint"]}},"/api/semantics/ontology":{"get":{"consumes":["application/json"],"description":"This is a simple API for listing all ontologies (.nt, .ttl files) used in DB-Repo.","produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"List ontologies","tags":["ontologies-endpoint"]}},"/api/semantics/ontology/{name}":{"get":{"consumes":["application/json"],"description":"This is a simple API for getting a certain ontologies (.nt, .ttl files) stored in DB-Repo.","parameters":[{"in":"path","name":"o_name","required":true,"schema":{"example":"VOCAB_QUDT-UNITS-ALL-v2.1","type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"404":{"description":"Not found"},"405":{"description":"Invalid input"}},"summary":"Get ontology","tags":["ontologies-endpoint"]}},"/api/semantics/unit":{"get":{"consumes":["application/json"],"description":"This is a simple API which returns a list of suggested units.","parameters":[{"description":"The query to retrieve a fitting unit","in":"query","name":"q","schema":{"type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Suggest a unit","tags":["units-endpoint"]},"post":{"consumes":["application/json"],"description":"This is a simple API for saving units","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"example":"second","type":"string"},"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/second-Time","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"405":{"description":"Invalid input"},"409":{"description":"Concept already present"}},"summary":"Save unit to MDB","tags":["units-endpoint"]},"put":{"consumes":["application/json"],"description":"This is a simple API for retrieving label from units","produces":["application/json"],"requestBody":{"content":{"application/json":{"schema":{"properties":{"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/second-Time","type":"string"}},"required":["uri","name"],"type":"object"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid URI"},"404":{"description":"Unit not found"},"500":{"description":"Server error"}},"summary":"Retrieve label from URI","tags":["units-endpoint"]}},"/api/semantics/unit/{unit}/validate":{"get":{"consumes":["application/json"],"description":"This is a simple API for validating units.","parameters":[{"description":"Validates unit against om-2.","in":"path","name":"unit","required":true,"schema":{"example":"metre","type":"string"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Validate units","tags":["units-endpoint"]}}},"servers":[{"description":"Generated server url","url":"http://localhost:5010"},{"description":"Sandbox","url":"https://dbrepo2.ec.tuwien.ac.at"}]} +openapi: 3.0.1 +info: + title: Database Repository Semantic Service API + description: Service that manages the tables + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.2.0 +externalDocs: + description: Sourcecode Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services +servers: +- url: http://localhost:9097 + description: Generated server url +- url: https://dbrepo2.tuwien.ac.at + description: Sandbox +paths: + /api/semantic/ontology/{id}: + get: + tags: + - ontology-endpoint + summary: Find one ontology + operationId: find + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Find one ontology + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyDto' + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + put: + tags: + - ontology-endpoint + summary: Update an ontology + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyModifyDto' + required: true + responses: + "202": + description: Updated ontology successfully + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyDto' + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + delete: + tags: + - ontology-endpoint + summary: Delete an ontology + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "202": + description: Deleted ontology successfully + content: + application/json: {} + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + /api/semantic/unit: + get: + tags: + - semantics-endpoint + summary: List semantic units + operationId: findAllUnits + responses: + "200": + description: Find all semantic units + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UnitDto' + post: + tags: + - semantics-endpoint + summary: Save a semantic unit + operationId: saveUnit + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnitSaveDto' + required: true + responses: + "202": + description: Saved a semantic unit + content: + application/json: + schema: + $ref: '#/components/schemas/UnitDto' + security: + - bearerAuth: [] + /api/semantic/ontology: + get: + tags: + - ontology-endpoint + summary: List all ontologies + operationId: findAll + responses: + "200": + description: List all ontologies + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OntologyDto' + post: + tags: + - ontology-endpoint + summary: Register a new ontology + operationId: create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyCreateDto' + required: true + responses: + "201": + description: Registered ontology successfully + content: + application/json: + schema: + $ref: '#/components/schemas/OntologyDto' + security: + - bearerAuth: [] + /api/semantic/concept: + get: + tags: + - semantics-endpoint + summary: List semantic concepts + operationId: findAllConcepts + responses: + "200": + description: Find all semantic concepts + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ConceptDto' + post: + tags: + - semantics-endpoint + summary: Create or update a semantic concept + operationId: saveUnit_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ConceptSaveDto' + required: true + responses: + "202": + description: Saved a semantic concept + content: + application/json: + schema: + $ref: '#/components/schemas/ConceptDto' + security: + - bearerAuth: [] + /api/semantic/ontology/{id}/entity: + get: + tags: + - query-endpoint + summary: Find entities + operationId: find_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: label + in: query + required: false + schema: + type: string + - name: uri + in: query + required: false + schema: + type: string + responses: + "200": + description: Found entities + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/EntityDto' + "417": + description: Generated query or uri is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Could not find ontology + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Filter params are invalid + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + /api/semantic/database/{databaseId}/table/{tableId}: + get: + tags: + - table-endpoint + summary: Suggest table semantics + operationId: analyseTable + parameters: + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "417": + description: Generated query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Could not find the table + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Suggested table semantics successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TableColumnEntityDto' + security: + - bearerAuth: [] + /api/semantic/database/{databaseId}/table/{tableId}/column/{columnId}: + get: + tags: + - table-endpoint + summary: Suggest table column semantics + operationId: analyseTableColumn + parameters: + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + - name: columnId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "417": + description: Generated query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Suggested table column semantics successfully + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TableColumnEntityDto' + "404": + description: Could not find the table column + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] +components: + schemas: + OntologyModifyDto: + required: + - prefix + - uri + type: object + properties: + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + OntologyDto: + required: + - created + - id + - prefix + - rdf + - sparql + - uri + type: object + properties: + id: + type: integer + format: int64 + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql: + type: boolean + example: true + rdf: + type: boolean + example: true + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + UserBriefDto: + required: + - id + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + username: + type: string + description: Only contains lowercase characters + example: jcarberry + name: + type: string + example: Josiah Carberry + orcid: + type: string + example: 0000-0002-1825-0097 + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + email_verified: + type: boolean + example: true + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: STATUS + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code + UnitSaveDto: + required: + - description + - name + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + ColumnBriefDto: + required: + - column_type + - database_id + - id + - internal_name + - name + - table_id + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 + internal_name: + type: string + example: mdb_date + column_type: + type: string + example: date + enum: + - enum + - number + - decimal + - string + - text + - boolean + - date + - timestamp + - blob + UnitDto: + required: + - columns + - created + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' + OntologyCreateDto: + required: + - prefix + - uri + type: object + properties: + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + ConceptSaveDto: + required: + - description + - name + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + ConceptDto: + required: + - columns + - created + - uri + type: object + properties: + uri: + type: string + name: + type: string + description: + type: string + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' + EntityDto: + required: + - label + - uri + type: object + properties: + uri: + type: string + example: https://www.wikidata.org/entity/Q1686799 + label: + type: string + example: Apache Jena + description: + type: string + example: open source semantic web framework for Java + TableColumnEntityDto: + required: + - columnId + - databaseId + - tableId + - uri + type: object + properties: + databaseId: + type: integer + format: int64 + example: 1 + tableId: + type: integer + format: int64 + example: 1 + columnId: + type: integer + format: int64 + example: 1 + uri: + type: string + example: https://www.wikidata.org/entity/Q1686799 + label: + type: string + example: Apache Jena + description: + type: string + example: open source semantic web framework for Java + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/table/api.yaml b/swagger/table/api.yaml index f0807a9139f19ea684004759464e985aa6b81cbd..9639c5fc4e24d730136b88d16a7b5a526dc469d4 100644 --- a/swagger/table/api.yaml +++ b/swagger/table/api.yaml @@ -49,6 +49,11 @@ paths: schema: type: integer format: int64 + - name: Authorization + in: header + required: true + schema: + type: string requestBody: content: application/json: @@ -56,19 +61,6 @@ paths: $ref: '#/components/schemas/ColumnSemanticsUpdateDto' required: true responses: - "405": - description: Update column semantics not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ColumnDto' - "400": - description: Update semantic concept query is malformed or update unit of - measurement query is malformed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' "404": description: "Table, database, semantic concept, unit of measurement or\ \ container could not be found" @@ -88,6 +80,19 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Update semantic concept query is malformed or update unit of + measurement query is malformed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Update column semantics not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ColumnDto' security: - bearerAuth: [] /api/container/{id}/database/{databaseId}/table: @@ -127,7 +132,9 @@ paths: content: application/json: schema: - type: string + type: array + items: + $ref: '#/components/schemas/TableBriefDto' security: - bearerAuth: [] post: @@ -155,32 +162,26 @@ paths: $ref: '#/components/schemas/TableCreateDto' required: true responses: - "409": - description: Create table conflicts with existing table name + "501": + description: Image is not supported content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Database, container or user could not be found" + "504": + description: Broker service failed to create queue content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "404": + description: "Database, container or user could not be found" content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "201": - description: Created a new table - content: - application/json: - schema: - $ref: '#/components/schemas/TableBriefDto' - "400": - description: Create table query is malformed + "409": + description: Create table conflicts with existing table name content: application/json: schema: @@ -191,8 +192,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "504": - description: Broker service failed to create queue + "201": + description: Created a new table + content: + application/json: + schema: + $ref: '#/components/schemas/TableBriefDto' + "400": + description: Create table query is malformed content: application/json: schema: @@ -237,14 +244,14 @@ paths: application/json: schema: $ref: '#/components/schemas/TableDto' - "404": - description: "Table, database or container could not be found" + "403": + description: Access to the database is forbidden content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "403": - description: Access to the database is forbidden + "404": + description: "Table, database or container could not be found" content: application/json: schema: @@ -276,14 +283,8 @@ paths: type: integer format: int64 responses: - "405": - description: Delete table not permitted - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Delete table resulted in an invalid state + "501": + description: Image is not supported content: application/json: schema: @@ -294,20 +295,20 @@ paths: application/json: schema: $ref: '#/components/schemas/TableDto' - "400": - description: Delete table query resulted in an invalid query statement + "405": + description: Delete table not permitted content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "501": - description: Image is not supported + "423": + description: Delete table resulted in an invalid state content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "404": - description: "Table, database or container could not be found" + "400": + description: Delete table query resulted in an invalid query statement content: application/json: schema: @@ -318,6 +319,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + "404": + description: "Table, database or container could not be found" + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] components: @@ -329,6 +336,130 @@ components: type: string unit_uri: type: string + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: STATUS + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code + ColumnBriefDto: + required: + - column_type + - database_id + - id + - internal_name + - name + - table_id + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 + internal_name: + type: string + example: mdb_date + column_type: + type: string + example: date + enum: + - enum + - number + - decimal + - string + - text + - boolean + - date + - timestamp + - blob ColumnDto: required: - auto_generated @@ -394,8 +525,8 @@ components: type: string ConceptDto: required: + - columns - created - - name - uri type: object properties: @@ -403,9 +534,15 @@ components: type: string name: type: string + description: + type: string created: type: string format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' ImageDateDto: required: - database_format @@ -435,8 +572,8 @@ components: format: date-time UnitDto: required: + - columns - created - - name - uri type: object properties: @@ -444,94 +581,15 @@ components: type: string name: type: string + description: + type: string created: type: string format: date-time - ApiErrorDto: - required: - - code - - message - - status - type: object - properties: - status: - type: string - example: STATUS - enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED - message: - type: string - example: Error message - code: - type: string - example: error.service.code + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' ColumnCreateDto: required: - name @@ -644,44 +702,14 @@ components: $ref: '#/components/schemas/ColumnCreateDto' constraints: $ref: '#/components/schemas/ConstraintsCreateDto' - ColumnBriefDto: - required: - - column_type - - id - - internal_name - - name - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: date - internal_name: - type: string - example: mdb_date - column_type: - type: string - example: date - enum: - - enum - - number - - decimal - - string - - text - - boolean - - date - - timestamp - - blob TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -693,7 +721,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -786,6 +814,7 @@ components: - internal_name - is_public - name + - owner - queue_name - routing_key type: object @@ -798,6 +827,8 @@ components: example: Air Quality creator: $ref: '#/components/schemas/UserBriefDto' + owner: + $ref: '#/components/schemas/UserBriefDto' description: type: string example: Air Quality in Austria diff --git a/swagger/user/api.yaml b/swagger/user/api.yaml index eb32257e2743c2fce889b136218bb2e38559a347..56bd25f5380528b7f08b44b29c83363103d9bd93 100644 --- a/swagger/user/api.yaml +++ b/swagger/user/api.yaml @@ -29,58 +29,22 @@ paths: schema: type: string responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: User was not found content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + description: Find user is not permitted content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "200": - description: OK + description: Found user content: - '*/*': + application/json: schema: $ref: '#/components/schemas/UserDto' security: @@ -103,60 +67,24 @@ paths: $ref: '#/components/schemas/UserUpdateDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Not Found + "202": + description: Modified user information content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/UserDto' "405": - description: Method Not Allowed + description: Modify user is not permitted content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "404": + description: User attribute was not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK - content: - '*/*': - schema: - $ref: '#/components/schemas/UserDto' security: - bearerAuth: [] /api/user/{id}/theme: @@ -178,58 +106,22 @@ paths: $ref: '#/components/schemas/UserThemeSetDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + description: Modify user is not permitted content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "404": + description: User or user attribute was not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK + "202": + description: Modified user theme content: - '*/*': + application/json: schema: $ref: '#/components/schemas/UserDto' security: @@ -253,121 +145,111 @@ paths: $ref: '#/components/schemas/UserPasswordDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: User was not found content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + description: Modify user is not permitted content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "202": + description: Modified user password content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK - content: - '*/*': + application/json: schema: $ref: '#/components/schemas/UserDto' security: - bearerAuth: [] - /api/user: + /api/maintenance/message/{id}: get: tags: - - user-endpoint - summary: Find all users - operationId: findAll + - maintenance-endpoint + summary: Find one maintenance message + operationId: find_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked + "200": + description: Get messages content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/BannerMessageDto' + put: + tags: + - maintenance-endpoint + summary: Update maintenance message + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BannerMessageUpdateDto' + required: true + responses: "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + description: Could not find message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Method Not Allowed + $ref: '#/components/schemas/BannerMessageNotFoundException' + "202": + description: Updated message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + $ref: '#/components/schemas/BannerMessageBriefDto' + delete: + tags: + - maintenance-endpoint + summary: Delete maintenance message + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "202": + description: Deleted message content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + application/json: {} + "404": + description: Could not find message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/BannerMessageNotFoundException' + /api/user: + get: + tags: + - user-endpoint + summary: Find all users + operationId: findAll + responses: "200": - description: OK + description: List users content: - '*/*': + application/json: schema: type: array items: @@ -384,147 +266,80 @@ paths: $ref: '#/components/schemas/SignupRequestDto' required: true responses: - "504": - description: Gateway Timeout - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "423": - description: Locked + "409": + description: User with username already exists content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: Realm or default role not found content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "201": + description: Created user content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Method Not Allowed + $ref: '#/components/schemas/UserBriefDto' + "417": + description: User with e-mail already exists content: - '*/*': + application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - "417": - description: Expectation Failed + /api/maintenance/message: + get: + tags: + - maintenance-endpoint + summary: Find maintenance messages + operationId: list + responses: + "200": + description: List messages content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + type: array + items: + $ref: '#/components/schemas/BannerMessageDto' + post: + tags: + - maintenance-endpoint + summary: Create maintenance message + operationId: create_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BannerMessageCreateDto' + required: true + responses: + "201": + description: Created message content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/BannerMessageBriefDto' + /api/maintenance/message/active: + get: + tags: + - maintenance-endpoint + summary: Find active maintenance messages + operationId: active + responses: "200": - description: OK + description: List messages content: - '*/*': + application/json: schema: - $ref: '#/components/schemas/UserBriefDto' + type: array + items: + $ref: '#/components/schemas/BannerMessageBriefDto' components: schemas: - ApiErrorDto: - required: - - code - - message - - status - type: object - properties: - status: - type: string - example: STATUS - enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED - message: - type: string - example: Error message - code: - type: string - example: error.service.code UserUpdateDto: type: object properties: @@ -540,17 +355,14 @@ components: orcid: type: string example: 0000-0002-1825-0097 - titles_before: - type: string - example: Prof. - titles_after: - type: string ColumnBriefDto: required: - column_type + - database_id - id - internal_name - name + - table_id type: object properties: id: @@ -559,6 +371,12 @@ components: name: type: string example: date + database_id: + type: integer + format: int64 + table_id: + type: integer + format: int64 internal_name: type: string example: mdb_date @@ -647,12 +465,6 @@ components: orcid: type: string example: 0000-0002-1825-0097 - created: - type: string - format: date-time - lastModified: - type: string - format: date-time DatabaseAccessDto: required: - type @@ -766,7 +578,6 @@ components: example: everyone enum: - everyone - - trusted - self doi: type: string @@ -1017,6 +828,7 @@ components: ImageBriefDto: required: - id + - registry - repository - tag type: object @@ -1024,6 +836,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1064,6 +879,7 @@ components: - driver_class - id - jdbc_method + - registry - repository - tag type: object @@ -1071,6 +887,9 @@ components: id: type: integer format: int64 + registry: + type: string + example: docker.io/library repository: type: string example: mariadb @@ -1198,11 +1017,11 @@ components: TableBriefDto: required: - columns - - creator - description - id - internal_name - name + - owner type: object properties: id: @@ -1214,7 +1033,7 @@ components: description: type: string example: Air Quality in Austria - creator: + owner: $ref: '#/components/schemas/UserBriefDto' columns: type: array @@ -1352,6 +1171,92 @@ components: last_modified: type: string format: date-time + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: STATUS + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code UserThemeSetDto: required: - theme_dark @@ -1367,6 +1272,174 @@ components: properties: password: type: string + BannerMessageUpdateDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + display_end: + type: string + format: date-time + BannerMessageNotFoundException: + type: object + properties: + cause: + type: object + properties: + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + suppressed: + type: array + items: + type: object + properties: + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + localizedMessage: + type: string + localizedMessage: + type: string + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + suppressed: + type: array + items: + type: object + properties: + stackTrace: + type: array + items: + type: object + properties: + classLoaderName: + type: string + moduleName: + type: string + moduleVersion: + type: string + methodName: + type: string + fileName: + type: string + lineNumber: + type: integer + format: int32 + nativeMethod: + type: boolean + className: + type: string + message: + type: string + localizedMessage: + type: string + localizedMessage: + type: string + BannerMessageBriefDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More SignupRequestDto: required: - email @@ -1383,6 +1456,64 @@ components: example: user@example.com password: type: string + BannerMessageCreateDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + display_end: + type: string + format: date-time + BannerMessageDto: + required: + - id + - message + - type + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + display_end: + type: string + format: date-time securitySchemes: bearerAuth: type: http