From 4f61dbc52df6cfb8b95a5f0fcda97fa1e85f3451 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Mon, 27 Feb 2023 19:08:03 +0100 Subject: [PATCH] Updated python clients and docs --- swagger/api-authentication.yaml | 520 ++++++++++++------ swagger/api-container.yaml | 317 ++++++++--- swagger/api-database.yaml | 209 +++++-- swagger/api-identifier.yaml | 8 + swagger/api-metadata.yaml | 4 +- swagger/api-query.yaml | 178 ++++-- swagger/api-semantics.yaml | 2 +- swagger/api-table.yaml | 128 +++-- swagger/api/api_authentication/__init__.py | 3 +- .../api/token_endpoint_api.py | 6 +- .../api/user_endpoint_api.py | 8 +- .../api/api_authentication/models/__init__.py | 3 +- .../models/column_brief_dto.py | 198 +++++++ .../models/container_dto.py | 28 +- .../api_authentication/models/database_dto.py | 54 +- .../api_authentication/models/image_dto.py | 29 +- .../models/table_brief_dto.py | 29 +- .../models/view_brief_dto.py | 353 ++++++++++++ swagger/api/api_container/__init__.py | 2 + .../api_container/api/image_endpoint_api.py | 30 +- swagger/api/api_container/models/__init__.py | 2 + .../api_container/models/column_brief_dto.py | 198 +++++++ .../api/api_container/models/container_dto.py | 28 +- .../api/api_container/models/database_dto.py | 54 +- swagger/api/api_container/models/image_dto.py | 29 +- .../models/image_env_item_dto.py | 29 +- .../api_container/models/table_brief_dto.py | 29 +- .../api_container/models/view_brief_dto.py | 353 ++++++++++++ swagger/api/api_database/__init__.py | 4 +- .../api_database/api/access_endpoint_api.py | 80 +-- .../api_database/api/database_endpoint_api.py | 113 ++++ swagger/api/api_database/models/__init__.py | 4 +- .../api_database/models/column_brief_dto.py | 198 +++++++ .../api/api_database/models/container_dto.py | 28 +- .../api/api_database/models/database_dto.py | 54 +- .../models/database_modify_visibility_dto.py} | 47 +- .../models/database_transfer_dto.py | 36 +- swagger/api/api_database/models/image_dto.py | 29 +- .../api_database/models/table_brief_dto.py | 29 +- .../api/api_database/models/view_brief_dto.py | 353 ++++++++++++ .../api/identifier_endpoint_api.py | 6 +- .../api_identifier/models/container_dto.py | 355 ------------ .../api/api_identifier/models/database_dto.py | 427 -------------- .../api_identifier/models/image_date_dto.py | 245 --------- .../api/api_identifier/models/image_dto.py | 404 -------------- .../models/image_env_item_dto.py | 198 ------- .../api_identifier/models/user_brief_dto.py | 350 ------------ swagger/api/api_identifier/models/user_dto.py | 481 ---------------- .../models/oai_list_identifiers_parameters.py | 58 +- swagger/api/api_query/__init__.py | 3 +- swagger/api/api_query/models/__init__.py | 3 +- .../api/api_query/models/column_brief_dto.py | 198 +++++++ swagger/api/api_query/models/container_dto.py | 28 +- swagger/api/api_query/models/database_dto.py | 54 +- .../api_query/models/execute_statement_dto.py | 34 +- .../models/identifier_brief_dto.py | 67 +-- swagger/api/api_query/models/image_dto.py | 29 +- .../api/api_query/models/query_brief_dto.py | 28 +- swagger/api/api_query/models/query_dto.py | 28 +- .../api/api_query/models/query_result_dto.py | 2 +- .../api/api_query/models/table_brief_dto.py | 29 +- .../api/api_query/models/view_brief_dto.py | 110 ++-- swagger/api/api_query/models/view_dto.py | 56 +- swagger/api/api_semantics/__init__.py | 2 + .../api/concepts_endpoint_api.py | 95 +++- .../api_semantics/api/units_endpoint_api.py | 95 +++- swagger/api/api_semantics/models/__init__.py | 2 + .../models/semantics_concept_body.py | 29 +- .../models/semantics_concept_body1.py} | 101 ++-- .../models/semantics_unit_body.py | 29 +- .../models/semantics_unit_body1.py | 138 +++++ swagger/api/api_table/__init__.py | 3 +- swagger/api/api_table/models/__init__.py | 3 +- .../models/column_brief_dto.py} | 96 ++-- swagger/api/api_table/models/column_dto.py | 29 +- swagger/api/api_table/models/container_dto.py | 28 +- swagger/api/api_table/models/database_dto.py | 54 +- swagger/api/api_table/models/image_dto.py | 29 +- .../api/api_table/models/table_brief_dto.py | 29 +- swagger/api/api_table/models/table_dto.py | 33 +- .../api/api_table/models/view_brief_dto.py | 353 ++++++++++++ swagger/authentication/api.yaml | 520 ++++++++++++------ swagger/container/api.yaml | 317 ++++++++--- swagger/database/api.yaml | 209 +++++-- swagger/generate.sh | 12 + swagger/identifier/api.yaml | 8 + swagger/metadata/api.yaml | 4 +- swagger/query/api.yaml | 178 ++++-- swagger/semantics/api.yaml | 2 +- swagger/table/api.yaml | 128 +++-- 90 files changed, 5656 insertions(+), 3869 deletions(-) create mode 100644 swagger/api/api_authentication/models/column_brief_dto.py create mode 100644 swagger/api/api_authentication/models/view_brief_dto.py create mode 100644 swagger/api/api_container/models/column_brief_dto.py create mode 100644 swagger/api/api_container/models/view_brief_dto.py create mode 100644 swagger/api/api_database/models/column_brief_dto.py rename swagger/api/{api_identifier/models/granted_authority_dto.py => api_database/models/database_modify_visibility_dto.py} (64%) create mode 100644 swagger/api/api_database/models/view_brief_dto.py delete mode 100644 swagger/api/api_identifier/models/container_dto.py delete mode 100644 swagger/api/api_identifier/models/database_dto.py delete mode 100644 swagger/api/api_identifier/models/image_date_dto.py delete mode 100644 swagger/api/api_identifier/models/image_dto.py delete mode 100644 swagger/api/api_identifier/models/image_env_item_dto.py delete mode 100644 swagger/api/api_identifier/models/user_brief_dto.py delete mode 100644 swagger/api/api_identifier/models/user_dto.py create mode 100644 swagger/api/api_query/models/column_brief_dto.py rename swagger/api/{api_database => api_query}/models/identifier_brief_dto.py (94%) rename swagger/api/{api_identifier/models/image_brief_dto.py => api_semantics/models/semantics_concept_body1.py} (51%) create mode 100644 swagger/api/api_semantics/models/semantics_unit_body1.py rename swagger/api/{api_identifier/models/table_brief_dto.py => api_table/models/column_brief_dto.py} (59%) create mode 100644 swagger/api/api_table/models/view_brief_dto.py diff --git a/swagger/api-authentication.yaml b/swagger/api-authentication.yaml index a702656..c3c5567 100644 --- a/swagger/api-authentication.yaml +++ b/swagger/api-authentication.yaml @@ -23,8 +23,8 @@ paths: summary: List users operationId: list responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -35,8 +35,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -65,14 +65,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -94,7 +100,7 @@ paths: put: tags: - user-endpoint - summary: Forgot user information + summary: Request a new user password operationId: forgot requestBody: content: @@ -103,8 +109,8 @@ paths: $ref: '#/components/schemas/UserForgotDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -115,8 +121,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -145,14 +151,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -181,8 +193,8 @@ paths: $ref: '#/components/schemas/SignupRequestDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -193,8 +205,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -223,14 +235,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -261,8 +279,8 @@ paths: type: integer format: int64 responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -273,8 +291,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -303,14 +321,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -348,8 +372,8 @@ paths: $ref: '#/components/schemas/UserUpdateDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -360,8 +384,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -390,14 +414,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -436,8 +466,8 @@ paths: $ref: '#/components/schemas/UserThemeSetDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -448,8 +478,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -478,14 +508,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -520,8 +556,8 @@ paths: $ref: '#/components/schemas/UserRolesDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -532,8 +568,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -562,14 +598,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -608,8 +650,8 @@ paths: $ref: '#/components/schemas/UserPasswordDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -620,8 +662,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -650,14 +692,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -696,8 +744,8 @@ paths: $ref: '#/components/schemas/UserEmailDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -708,8 +756,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -738,14 +786,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -768,7 +822,7 @@ paths: put: tags: - user-endpoint - summary: Reset user information + summary: Reset user password operationId: reset requestBody: content: @@ -777,8 +831,8 @@ paths: $ref: '#/components/schemas/UserResetDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -789,8 +843,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -819,14 +873,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -852,8 +912,8 @@ paths: schema: type: string responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -864,8 +924,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -894,14 +954,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -932,8 +998,8 @@ paths: $ref: '#/components/schemas/LoginRequestDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -944,8 +1010,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -974,14 +1040,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1005,8 +1077,8 @@ paths: summary: Lists developer tokens for user operationId: listAll responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1017,8 +1089,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1047,14 +1119,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1081,8 +1159,8 @@ paths: summary: Create developer token operationId: create responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1093,8 +1171,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1123,14 +1201,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1162,8 +1246,8 @@ paths: $ref: '#/components/schemas/UserForgotDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1174,8 +1258,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1204,14 +1288,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1235,8 +1325,8 @@ paths: summary: Renew authentication token operationId: reAuthenticateUser responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1247,8 +1337,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1277,14 +1367,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1316,8 +1412,8 @@ paths: schema: type: string responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1328,8 +1424,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1358,14 +1454,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1392,8 +1494,8 @@ paths: type: integer format: int64 responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1404,8 +1506,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1434,14 +1536,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1454,6 +1562,10 @@ paths: $ref: '#/components/schemas/ApiErrorDto' "200": description: OK + content: + '*/*': + schema: + type: object security: - bearerAuth: [] components: @@ -1552,6 +1664,36 @@ components: email: type: string example: jcarberry@brown.edu + 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 ContainerDto: required: - created @@ -1587,6 +1729,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -1667,6 +1811,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -1675,12 +1823,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -2032,7 +2182,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -2061,10 +2210,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -2079,31 +2224,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -2197,6 +2317,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -2215,6 +2336,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -2327,6 +2452,47 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time UserUpdateDto: type: object properties: diff --git a/swagger/api-container.yaml b/swagger/api-container.yaml index b39513d..e2f8cd0 100644 --- a/swagger/api-container.yaml +++ b/swagger/api-container.yaml @@ -30,12 +30,6 @@ paths: type: integer format: int64 responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -48,14 +42,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -85,12 +91,6 @@ paths: $ref: '#/components/schemas/ImageChangeDto' required: true responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -103,14 +103,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -129,19 +141,13 @@ paths: summary: Delete some image operationId: delete parameters: - - name: id + - name: imageId in: path required: true schema: type: integer format: int64 responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -154,14 +160,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Unable to delete image content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -188,12 +206,6 @@ paths: type: integer format: int64 responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -206,14 +218,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -243,12 +267,6 @@ paths: $ref: '#/components/schemas/ContainerChangeDto' required: true responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -261,14 +279,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -294,12 +324,6 @@ paths: type: integer format: int64 responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -312,14 +336,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -339,12 +375,6 @@ paths: summary: Find all images operationId: findAll responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -357,14 +387,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -389,12 +431,6 @@ paths: $ref: '#/components/schemas/ImageCreateDto' required: true responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -407,14 +443,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -434,12 +482,6 @@ paths: summary: Find all containers operationId: findAll_1 responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -452,14 +494,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -484,12 +538,6 @@ paths: $ref: '#/components/schemas/ContainerCreateRequestDto' required: true responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -502,14 +550,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -640,7 +700,6 @@ components: - iid - key - type - - value type: object properties: iid: @@ -649,9 +708,6 @@ components: key: type: string example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb type: type: string example: PRIVILEGED_PASSWORD @@ -692,7 +748,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -721,10 +776,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -876,6 +927,36 @@ components: tag: type: string example: "10.5" + 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 ContainerDto: required: - created @@ -911,6 +992,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -991,6 +1074,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -999,12 +1086,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -1401,6 +1490,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -1419,6 +1509,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -1489,6 +1583,47 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time securitySchemes: bearerAuth: type: http diff --git a/swagger/api-database.yaml b/swagger/api-database.yaml index dddf38b..7e9a0c3 100644 --- a/swagger/api-database.yaml +++ b/swagger/api-database.yaml @@ -16,6 +16,88 @@ servers: - url: http://localhost:9092 description: Generated server url paths: + /api/container/{id}/database/{databaseId}/visibility: + put: + tags: + - database-endpoint + summary: Update database + operationId: visibility + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseModifyVisibilityDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DatabaseDto' + security: + - bearerAuth: [] /api/container/{id}/database/{databaseId}/transfer: put: tags: @@ -189,7 +271,7 @@ paths: tags: - access-endpoint summary: Revoke access to some database - operationId: update_1 + operationId: revoke parameters: - name: id in: path @@ -875,7 +957,7 @@ components: code: type: string example: error.container.notfound - DatabaseTransferDto: + DatabaseModifyVisibilityDto: required: - is_public type: object @@ -883,6 +965,36 @@ components: is_public: type: boolean example: true + 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 ContainerDto: required: - created @@ -918,6 +1030,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -998,6 +1112,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -1006,12 +1124,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -1363,7 +1483,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -1392,10 +1511,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -1410,31 +1525,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -1528,6 +1618,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -1546,6 +1637,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -1658,6 +1753,54 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time + DatabaseTransferDto: + required: + - username + type: object + properties: + username: + type: string DatabaseModifyAccessDto: required: - type diff --git a/swagger/api-identifier.yaml b/swagger/api-identifier.yaml index 8aedd6b..3836852 100644 --- a/swagger/api-identifier.yaml +++ b/swagger/api-identifier.yaml @@ -156,6 +156,14 @@ paths: schema: type: integer format: int64 + - name: type + in: query + required: false + schema: + type: string + enum: + - database + - subset responses: "404": description: Not Found diff --git a/swagger/api-metadata.yaml b/swagger/api-metadata.yaml index 464eeaa..cfae26f 100644 --- a/swagger/api-metadata.yaml +++ b/swagger/api-metadata.yaml @@ -149,11 +149,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 78da736..42dfa4d 100644 --- a/swagger/api-query.yaml +++ b/swagger/api-query.yaml @@ -377,6 +377,7 @@ paths: $ref: '#/components/schemas/ApiErrorDto' "200": description: OK + deprecated: true security: - bearerAuth: [] post: @@ -1910,7 +1911,7 @@ components: id: type: integer format: int64 - resultNumber: + result_number: type: integer format: int64 example: 1 @@ -1928,6 +1929,36 @@ components: type: object additionalProperties: type: object + 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 ContainerDto: required: - created @@ -1963,6 +1994,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -2043,6 +2076,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -2051,12 +2088,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -2408,7 +2447,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -2437,10 +2475,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -2455,31 +2489,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -2527,6 +2536,8 @@ components: enum: - query - view + identifier: + $ref: '#/components/schemas/IdentifierDto' created: type: string format: date-time @@ -2535,10 +2546,13 @@ components: example: SELECT `id` FROM `air_quality` query_hash: type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 is_persisted: type: boolean + example: true result_hash: type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 result_number: type: integer format: int64 @@ -2627,6 +2641,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -2645,6 +2660,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -2757,28 +2776,12 @@ components: email_verified: type: boolean example: true - ViewCreateDto: - required: - - is_public - - name - - query - type: object - properties: - name: - type: string - example: Air Quality - query: - type: string - example: SELECT `id` FROM `air_quality` - is_public: - type: boolean - example: true ViewBriefDto: required: - created - - created_by + - creator - id - - internalName + - internal_name - name - query - vdbid @@ -2793,15 +2796,17 @@ components: name: type: string example: Air Quality - internalName: - type: string - example: air_quality query: type: string example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC created: type: string format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality is_public: type: boolean example: true @@ -2809,12 +2814,25 @@ components: type: boolean description: True if it is the default view for the database example: true - created_by: - type: integer - format: int64 last_modified: type: string format: date-time + ViewCreateDto: + required: + - is_public + - name + - query + type: object + properties: + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` + is_public: + type: boolean + example: true TableCsvDto: required: - data @@ -2858,6 +2876,10 @@ components: statement: type: string example: SELECT `id` FROM `air_quality` + timestamp: + type: string + description: Execute query for data at this timestamp + format: date-time ViewDto: required: - created @@ -2876,8 +2898,6 @@ components: vdbid: type: integer format: int64 - creator: - $ref: '#/components/schemas/UserDto' database: $ref: '#/components/schemas/DatabaseDto' name: @@ -2892,6 +2912,8 @@ components: created: type: string format: date-time + creator: + $ref: '#/components/schemas/UserDto' is_public: type: boolean example: true @@ -2902,6 +2924,44 @@ components: last_modified: type: string format: date-time + IdentifierBriefDto: + required: + - container id + - database id + - id + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + created: + type: string + format: date-time + lastModified: + 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 QueryBriefDto: required: - cid @@ -2936,6 +2996,8 @@ components: enum: - query - view + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' created: type: string format: date-time diff --git a/swagger/api-semantics.yaml b/swagger/api-semantics.yaml index e813438..3ed782a 100644 --- a/swagger/api-semantics.yaml +++ b/swagger/api-semantics.yaml @@ -1 +1 @@ -{"definitions":{},"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.1.0-alpha"},"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"]}},"/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"]}},"/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":"DBRepo Production Server","url":"https://dbrepo1.ec.tuwien.ac.at/api/units"}]} +{"definitions":{},"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.1.0-alpha"},"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":"DBRepo Production Server","url":"https://dbrepo1.ec.tuwien.ac.at/api/units"}]} diff --git a/swagger/api-table.yaml b/swagger/api-table.yaml index 372f3dc..c1ee928 100644 --- a/swagger/api-table.yaml +++ b/swagger/api-table.yaml @@ -504,6 +504,7 @@ components: - internal_name - is_null_allowed - is_primary_key + - is_public - name - unique type: object @@ -547,6 +548,9 @@ components: - date - timestamp - blob + is_public: + type: boolean + example: true is_null_allowed: type: boolean example: false @@ -684,8 +688,39 @@ components: type: array items: $ref: '#/components/schemas/ColumnCreateDto' + 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 @@ -704,6 +739,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -756,6 +795,7 @@ components: - description - id - internal_name + - is_public - name - queue_name - routing_key @@ -784,10 +824,13 @@ components: example: air_quality queue_name: type: string - example: dbrepo/4/4/2 + example: dbrepo/air_quality/air_quality routing_key: type: string - example: dbrepo/4/4/2/1 + example: dbrepo/air_quality/air_quality/1 + is_public: + type: boolean + example: true ContainerDto: required: - created @@ -823,6 +866,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -903,6 +948,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -911,12 +960,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -1241,7 +1292,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -1270,10 +1320,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -1288,31 +1334,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -1471,6 +1492,47 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time securitySchemes: bearerAuth: type: http diff --git a/swagger/api/api_authentication/__init__.py b/swagger/api/api_authentication/__init__.py index c88ae78..ab1243b 100644 --- a/swagger/api/api_authentication/__init__.py +++ b/swagger/api/api_authentication/__init__.py @@ -24,6 +24,7 @@ from api_authentication.api_client import ApiClient from api_authentication.configuration import Configuration # import models into sdk package from api_authentication.models.api_error_dto import ApiErrorDto +from api_authentication.models.column_brief_dto import ColumnBriefDto from api_authentication.models.container_dto import ContainerDto from api_authentication.models.creator_dto import CreatorDto from api_authentication.models.database_access_dto import DatabaseAccessDto @@ -33,7 +34,6 @@ from api_authentication.models.identifier_dto import IdentifierDto from api_authentication.models.image_brief_dto import ImageBriefDto from api_authentication.models.image_date_dto import ImageDateDto from api_authentication.models.image_dto import ImageDto -from api_authentication.models.image_env_item_dto import ImageEnvItemDto from api_authentication.models.jwt_response_dto import JwtResponseDto from api_authentication.models.license_dto import LicenseDto from api_authentication.models.login_request_dto import LoginRequestDto @@ -51,3 +51,4 @@ from api_authentication.models.user_reset_dto import UserResetDto from api_authentication.models.user_roles_dto import UserRolesDto from api_authentication.models.user_theme_set_dto import UserThemeSetDto from api_authentication.models.user_update_dto import UserUpdateDto +from api_authentication.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_authentication/api/token_endpoint_api.py b/swagger/api/api_authentication/api/token_endpoint_api.py index 134c5c1..e2b2c02 100644 --- a/swagger/api/api_authentication/api/token_endpoint_api.py +++ b/swagger/api/api_authentication/api/token_endpoint_api.py @@ -127,7 +127,7 @@ class TokenEndpointApi(object): :param async_req bool :param int id: (required) - :return: None + :return: object If the method is called asynchronously, returns the request thread. """ @@ -148,7 +148,7 @@ class TokenEndpointApi(object): :param async_req bool :param int id: (required) - :return: None + :return: object If the method is called asynchronously, returns the request thread. """ @@ -202,7 +202,7 @@ class TokenEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='object', # 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_authentication/api/user_endpoint_api.py b/swagger/api/api_authentication/api/user_endpoint_api.py index e6a913e..4619f41 100644 --- a/swagger/api/api_authentication/api/user_endpoint_api.py +++ b/swagger/api/api_authentication/api/user_endpoint_api.py @@ -126,7 +126,7 @@ class UserEndpointApi(object): collection_formats=collection_formats) def forgot(self, body, **kwargs): # noqa: E501 - """Forgot user information # noqa: E501 + """Request a new user password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -147,7 +147,7 @@ class UserEndpointApi(object): return data def forgot_with_http_info(self, body, **kwargs): # noqa: E501 - """Forgot user information # noqa: E501 + """Request a new user password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -405,7 +405,7 @@ class UserEndpointApi(object): collection_formats=collection_formats) def reset(self, body, **kwargs): # noqa: E501 - """Reset user information # noqa: E501 + """Reset user password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -426,7 +426,7 @@ class UserEndpointApi(object): return data def reset_with_http_info(self, body, **kwargs): # noqa: E501 - """Reset user information # noqa: E501 + """Reset user password # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/swagger/api/api_authentication/models/__init__.py b/swagger/api/api_authentication/models/__init__.py index 62a7c8d..bb944c5 100644 --- a/swagger/api/api_authentication/models/__init__.py +++ b/swagger/api/api_authentication/models/__init__.py @@ -15,6 +15,7 @@ from __future__ import absolute_import # import models into model package from api_authentication.models.api_error_dto import ApiErrorDto +from api_authentication.models.column_brief_dto import ColumnBriefDto from api_authentication.models.container_dto import ContainerDto from api_authentication.models.creator_dto import CreatorDto from api_authentication.models.database_access_dto import DatabaseAccessDto @@ -24,7 +25,6 @@ from api_authentication.models.identifier_dto import IdentifierDto from api_authentication.models.image_brief_dto import ImageBriefDto from api_authentication.models.image_date_dto import ImageDateDto from api_authentication.models.image_dto import ImageDto -from api_authentication.models.image_env_item_dto import ImageEnvItemDto from api_authentication.models.jwt_response_dto import JwtResponseDto from api_authentication.models.license_dto import LicenseDto from api_authentication.models.login_request_dto import LoginRequestDto @@ -42,3 +42,4 @@ from api_authentication.models.user_reset_dto import UserResetDto from api_authentication.models.user_roles_dto import UserRolesDto from api_authentication.models.user_theme_set_dto import UserThemeSetDto from api_authentication.models.user_update_dto import UserUpdateDto +from api_authentication.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_authentication/models/column_brief_dto.py b/swagger/api/api_authentication/models/column_brief_dto.py new file mode 100644 index 0000000..65bfe64 --- /dev/null +++ b/swagger/api/api_authentication/models/column_brief_dto.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Database Repository Authentication Service API + + Service that manages the authentication # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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', + 'internal_name': 'str', + 'column_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'internal_name': 'internal_name', + 'column_type': 'column_type' + } + + def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._internal_name = None + self._column_type = None + self.discriminator = None + self.id = id + self.name = name + 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 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_authentication/models/container_dto.py b/swagger/api/api_authentication/models/container_dto.py index df862ae..b3e26d1 100644 --- a/swagger/api/api_authentication/models/container_dto.py +++ b/swagger/api/api_authentication/models/container_dto.py @@ -35,6 +35,7 @@ class ContainerDto(object): 'database': 'DatabaseDto', 'image': 'ImageBriefDto', 'port': 'int', + 'owner': 'UserBriefDto', 'created': 'datetime', 'internal_name': 'str', 'ip_address': 'str' @@ -48,12 +49,13 @@ class ContainerDto(object): 'database': 'database', 'image': 'image', 'port': 'port', + 'owner': 'owner', 'created': 'created', 'internal_name': 'internal_name', 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, owner=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -62,6 +64,7 @@ class ContainerDto(object): self._database = None self._image = None self._port = None + self._owner = None self._created = None self._internal_name = None self._ip_address = None @@ -77,6 +80,8 @@ class ContainerDto(object): self.image = image if port is not None: self.port = port + if owner is not None: + self.owner = owner self.created = created self.internal_name = internal_name if ip_address is not None: @@ -241,6 +246,27 @@ class ContainerDto(object): self._port = port + @property + def owner(self): + """Gets the owner of this ContainerDto. # noqa: E501 + + + :return: The owner of this ContainerDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this ContainerDto. + + + :param owner: The owner of this ContainerDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this ContainerDto. # noqa: E501 diff --git a/swagger/api/api_authentication/models/database_dto.py b/swagger/api/api_authentication/models/database_dto.py index cfdd041..5af8e06 100644 --- a/swagger/api/api_authentication/models/database_dto.py +++ b/swagger/api/api_authentication/models/database_dto.py @@ -34,9 +34,11 @@ class DatabaseDto(object): 'identifier': 'IdentifierDto', 'description': 'str', 'tables': 'list[TableBriefDto]', + 'views': 'list[ViewBriefDto]', 'image': 'ImageDto', 'container': 'ContainerDto', 'accesses': 'list[DatabaseAccessDto]', + 'owner': 'UserBriefDto', 'created': 'datetime', 'exchange_name': 'str', 'internal_name': 'str', @@ -50,16 +52,18 @@ class DatabaseDto(object): 'identifier': 'identifier', 'description': 'description', 'tables': 'tables', + 'views': 'views', 'image': 'image', 'container': 'container', 'accesses': 'accesses', + 'owner': 'owner', 'created': 'created', 'exchange_name': 'exchange_name', 'internal_name': 'internal_name', 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, image=None, container=None, accesses=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, owner=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -67,9 +71,11 @@ class DatabaseDto(object): self._identifier = None self._description = None self._tables = None + self._views = None self._image = None self._container = None self._accesses = None + self._owner = None self._created = None self._exchange_name = None self._internal_name = None @@ -84,12 +90,16 @@ class DatabaseDto(object): self.description = description if tables is not None: self.tables = tables + if views is not None: + self.views = views if image is not None: self.image = image if container is not None: self.container = container if accesses is not None: self.accesses = accesses + if owner is not None: + self.owner = owner if created is not None: self.created = created self.exchange_name = exchange_name @@ -229,6 +239,27 @@ class DatabaseDto(object): self._tables = tables + @property + def views(self): + """Gets the views of this DatabaseDto. # noqa: E501 + + + :return: The views of this DatabaseDto. # noqa: E501 + :rtype: list[ViewBriefDto] + """ + return self._views + + @views.setter + def views(self, views): + """Sets the views of this DatabaseDto. + + + :param views: The views of this DatabaseDto. # noqa: E501 + :type: list[ViewBriefDto] + """ + + self._views = views + @property def image(self): """Gets the image of this DatabaseDto. # noqa: E501 @@ -292,6 +323,27 @@ class DatabaseDto(object): self._accesses = accesses + @property + def owner(self): + """Gets the owner of this DatabaseDto. # noqa: E501 + + + :return: The owner of this DatabaseDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this DatabaseDto. + + + :param owner: The owner of this DatabaseDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this DatabaseDto. # noqa: E501 diff --git a/swagger/api/api_authentication/models/image_dto.py b/swagger/api/api_authentication/models/image_dto.py index 25e5ad1..2861b64 100644 --- a/swagger/api/api_authentication/models/image_dto.py +++ b/swagger/api/api_authentication/models/image_dto.py @@ -35,7 +35,6 @@ class ImageDto(object): 'hash': 'str', 'compiled': 'datetime', 'size': 'int', - 'environment': 'list[ImageEnvItemDto]', 'driver_class': 'str', 'date_formats': 'list[ImageDateDto]', 'jdbc_method': 'str', @@ -50,14 +49,13 @@ class ImageDto(object): 'hash': 'hash', 'compiled': 'compiled', 'size': 'size', - 'environment': 'environment', 'driver_class': 'driver_class', 'date_formats': 'date_formats', 'jdbc_method': 'jdbc_method', 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, environment=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + 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 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None self._repository = None @@ -66,7 +64,6 @@ class ImageDto(object): self._hash = None self._compiled = None self._size = None - self._environment = None self._driver_class = None self._date_formats = None self._jdbc_method = None @@ -82,7 +79,6 @@ class ImageDto(object): self.compiled = compiled if size is not None: self.size = size - self.environment = environment self.driver_class = driver_class if date_formats is not None: self.date_formats = date_formats @@ -244,29 +240,6 @@ class ImageDto(object): self._size = size - @property - def environment(self): - """Gets the environment of this ImageDto. # noqa: E501 - - - :return: The environment of this ImageDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageDto. - - - :param environment: The environment of this ImageDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - if environment is None: - raise ValueError("Invalid value for `environment`, must not be `None`") # noqa: E501 - - self._environment = environment - @property def driver_class(self): """Gets the driver_class of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_authentication/models/table_brief_dto.py b/swagger/api/api_authentication/models/table_brief_dto.py index c25e0c0..08f477e 100644 --- a/swagger/api/api_authentication/models/table_brief_dto.py +++ b/swagger/api/api_authentication/models/table_brief_dto.py @@ -32,6 +32,7 @@ class TableBriefDto(object): 'name': 'str', 'description': 'str', 'creator': 'UserBriefDto', + 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,21 +41,24 @@ class TableBriefDto(object): 'name': 'name', 'description': 'description', 'creator': 'creator', + 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, creator=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._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description self.creator = creator + self.columns = columns self.internal_name = internal_name @property @@ -149,6 +153,29 @@ class TableBriefDto(object): self._creator = creator + @property + def columns(self): + """Gets the columns of this TableBriefDto. # noqa: E501 + + + :return: The columns of this TableBriefDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableBriefDto. + + + :param columns: The columns of this TableBriefDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + @property def internal_name(self): """Gets the internal_name of this TableBriefDto. # noqa: E501 diff --git a/swagger/api/api_authentication/models/view_brief_dto.py b/swagger/api/api_authentication/models/view_brief_dto.py new file mode 100644 index 0000000..cc5435d --- /dev/null +++ b/swagger/api/api_authentication/models/view_brief_dto.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + Database Repository Authentication Service API + + Service that manages the authentication # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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 ViewBriefDto(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', + 'vdbid': 'int', + 'name': 'str', + 'query': 'str', + 'created': 'datetime', + 'creator': 'UserDto', + 'internal_name': 'str', + 'is_public': 'bool', + 'initial_view': 'bool', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'vdbid': 'vdbid', + 'name': 'name', + 'query': 'query', + 'created': 'created', + 'creator': 'creator', + 'internal_name': 'internal_name', + 'is_public': 'is_public', + 'initial_view': 'initial_view', + 'last_modified': 'last_modified' + } + + def __init__(self, id=None, vdbid=None, name=None, query=None, created=None, creator=None, internal_name=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 + """ViewBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._vdbid = None + self._name = None + self._query = None + self._created = None + self._creator = None + self._internal_name = None + self._is_public = None + self._initial_view = None + self._last_modified = None + self.discriminator = None + self.id = id + self.vdbid = vdbid + self.name = name + self.query = query + self.created = created + self.creator = creator + self.internal_name = internal_name + if is_public is not None: + self.is_public = is_public + if initial_view is not None: + self.initial_view = initial_view + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this ViewBriefDto. # noqa: E501 + + + :return: The id of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ViewBriefDto. + + + :param id: The id of this ViewBriefDto. # 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 vdbid(self): + """Gets the vdbid of this ViewBriefDto. # noqa: E501 + + + :return: The vdbid of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._vdbid + + @vdbid.setter + def vdbid(self, vdbid): + """Sets the vdbid of this ViewBriefDto. + + + :param vdbid: The vdbid of this ViewBriefDto. # noqa: E501 + :type: int + """ + if vdbid is None: + raise ValueError("Invalid value for `vdbid`, must not be `None`") # noqa: E501 + + self._vdbid = vdbid + + @property + def name(self): + """Gets the name of this ViewBriefDto. # noqa: E501 + + + :return: The name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ViewBriefDto. + + + :param name: The name of this ViewBriefDto. # 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 query(self): + """Gets the query of this ViewBriefDto. # noqa: E501 + + + :return: The query of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """Sets the query of this ViewBriefDto. + + + :param query: The query of this ViewBriefDto. # noqa: E501 + :type: str + """ + if query is None: + raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 + + self._query = query + + @property + def created(self): + """Gets the created of this ViewBriefDto. # noqa: E501 + + + :return: The created of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ViewBriefDto. + + + :param created: The created of this ViewBriefDto. # 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 creator(self): + """Gets the creator of this ViewBriefDto. # noqa: E501 + + + :return: The creator of this ViewBriefDto. # noqa: E501 + :rtype: UserDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ViewBriefDto. + + + :param creator: The creator of this ViewBriefDto. # noqa: E501 + :type: UserDto + """ + if creator is None: + raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + + self._creator = creator + + @property + def internal_name(self): + """Gets the internal_name of this ViewBriefDto. # noqa: E501 + + + :return: The internal_name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ViewBriefDto. + + + :param internal_name: The internal_name of this ViewBriefDto. # 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 is_public(self): + """Gets the is_public of this ViewBriefDto. # noqa: E501 + + + :return: The is_public of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this ViewBriefDto. + + + :param is_public: The is_public of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._is_public = is_public + + @property + def initial_view(self): + """Gets the initial_view of this ViewBriefDto. # noqa: E501 + + True if it is the default view for the database # noqa: E501 + + :return: The initial_view of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._initial_view + + @initial_view.setter + def initial_view(self, initial_view): + """Sets the initial_view of this ViewBriefDto. + + True if it is the default view for the database # noqa: E501 + + :param initial_view: The initial_view of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._initial_view = initial_view + + @property + def last_modified(self): + """Gets the last_modified of this ViewBriefDto. # noqa: E501 + + + :return: The last_modified of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this ViewBriefDto. + + + :param last_modified: The last_modified of this ViewBriefDto. # 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(ViewBriefDto, 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, ViewBriefDto): + 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/__init__.py b/swagger/api/api_container/__init__.py index d2bcec4..e236f59 100644 --- a/swagger/api/api_container/__init__.py +++ b/swagger/api/api_container/__init__.py @@ -22,6 +22,7 @@ from api_container.api_client import ApiClient 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.container_brief_dto import ContainerBriefDto from api_container.models.container_change_dto import ContainerChangeDto from api_container.models.container_create_request_dto import ContainerCreateRequestDto @@ -42,3 +43,4 @@ from api_container.models.related_identifier_dto import RelatedIdentifierDto from api_container.models.table_brief_dto import TableBriefDto from api_container.models.user_brief_dto import UserBriefDto from api_container.models.user_dto import UserDto +from api_container.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_container/api/image_endpoint_api.py b/swagger/api/api_container/api/image_endpoint_api.py index d85d81a..f01beb9 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, id, **kwargs): # noqa: E501 + def delete(self, image_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(id, async_req=True) + >>> thread = api.delete(image_id, async_req=True) >>> result = thread.get() :param async_req bool - :param int id: (required) + :param int image_id: (required) :return: object 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 + return self.delete_with_http_info(image_id, **kwargs) # noqa: E501 else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.delete_with_http_info(image_id, **kwargs) # noqa: E501 return data - def delete_with_http_info(self, id, **kwargs): # noqa: E501 + def delete_with_http_info(self, image_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(id, async_req=True) + >>> thread = api.delete_with_http_info(image_id, async_req=True) >>> result = thread.get() :param async_req bool - :param int id: (required) + :param int image_id: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['image_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 '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 + # 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 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'image_id' in params: + path_params['imageId'] = params['image_id'] # noqa: E501 query_params = [] diff --git a/swagger/api/api_container/models/__init__.py b/swagger/api/api_container/models/__init__.py index e4f3f94..a605bde 100644 --- a/swagger/api/api_container/models/__init__.py +++ b/swagger/api/api_container/models/__init__.py @@ -15,6 +15,7 @@ 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.container_brief_dto import ContainerBriefDto from api_container.models.container_change_dto import ContainerChangeDto from api_container.models.container_create_request_dto import ContainerCreateRequestDto @@ -35,3 +36,4 @@ from api_container.models.related_identifier_dto import RelatedIdentifierDto from api_container.models.table_brief_dto import TableBriefDto from api_container.models.user_brief_dto import UserBriefDto from api_container.models.user_dto import UserDto +from api_container.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_container/models/column_brief_dto.py b/swagger/api/api_container/models/column_brief_dto.py new file mode 100644 index 0000000..3b5a78d --- /dev/null +++ b/swagger/api/api_container/models/column_brief_dto.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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', + 'internal_name': 'str', + 'column_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'internal_name': 'internal_name', + 'column_type': 'column_type' + } + + def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._internal_name = None + self._column_type = None + self.discriminator = None + self.id = id + self.name = name + 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 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_container/models/container_dto.py b/swagger/api/api_container/models/container_dto.py index 4a7d5a0..97821c7 100644 --- a/swagger/api/api_container/models/container_dto.py +++ b/swagger/api/api_container/models/container_dto.py @@ -35,6 +35,7 @@ class ContainerDto(object): 'database': 'DatabaseDto', 'image': 'ImageBriefDto', 'port': 'int', + 'owner': 'UserBriefDto', 'created': 'datetime', 'internal_name': 'str', 'ip_address': 'str' @@ -48,12 +49,13 @@ class ContainerDto(object): 'database': 'database', 'image': 'image', 'port': 'port', + 'owner': 'owner', 'created': 'created', 'internal_name': 'internal_name', 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, owner=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -62,6 +64,7 @@ class ContainerDto(object): self._database = None self._image = None self._port = None + self._owner = None self._created = None self._internal_name = None self._ip_address = None @@ -77,6 +80,8 @@ class ContainerDto(object): self.image = image if port is not None: self.port = port + if owner is not None: + self.owner = owner self.created = created self.internal_name = internal_name if ip_address is not None: @@ -241,6 +246,27 @@ class ContainerDto(object): self._port = port + @property + def owner(self): + """Gets the owner of this ContainerDto. # noqa: E501 + + + :return: The owner of this ContainerDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this ContainerDto. + + + :param owner: The owner of this ContainerDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this ContainerDto. # noqa: E501 diff --git a/swagger/api/api_container/models/database_dto.py b/swagger/api/api_container/models/database_dto.py index afa0e76..f7496fa 100644 --- a/swagger/api/api_container/models/database_dto.py +++ b/swagger/api/api_container/models/database_dto.py @@ -34,9 +34,11 @@ class DatabaseDto(object): 'identifier': 'IdentifierDto', 'description': 'str', 'tables': 'list[TableBriefDto]', + 'views': 'list[ViewBriefDto]', 'image': 'ImageDto', 'container': 'ContainerDto', 'accesses': 'list[DatabaseAccessDto]', + 'owner': 'UserBriefDto', 'created': 'datetime', 'exchange_name': 'str', 'internal_name': 'str', @@ -50,16 +52,18 @@ class DatabaseDto(object): 'identifier': 'identifier', 'description': 'description', 'tables': 'tables', + 'views': 'views', 'image': 'image', 'container': 'container', 'accesses': 'accesses', + 'owner': 'owner', 'created': 'created', 'exchange_name': 'exchange_name', 'internal_name': 'internal_name', 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, image=None, container=None, accesses=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, owner=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -67,9 +71,11 @@ class DatabaseDto(object): self._identifier = None self._description = None self._tables = None + self._views = None self._image = None self._container = None self._accesses = None + self._owner = None self._created = None self._exchange_name = None self._internal_name = None @@ -84,12 +90,16 @@ class DatabaseDto(object): self.description = description if tables is not None: self.tables = tables + if views is not None: + self.views = views if image is not None: self.image = image if container is not None: self.container = container if accesses is not None: self.accesses = accesses + if owner is not None: + self.owner = owner if created is not None: self.created = created self.exchange_name = exchange_name @@ -229,6 +239,27 @@ class DatabaseDto(object): self._tables = tables + @property + def views(self): + """Gets the views of this DatabaseDto. # noqa: E501 + + + :return: The views of this DatabaseDto. # noqa: E501 + :rtype: list[ViewBriefDto] + """ + return self._views + + @views.setter + def views(self, views): + """Sets the views of this DatabaseDto. + + + :param views: The views of this DatabaseDto. # noqa: E501 + :type: list[ViewBriefDto] + """ + + self._views = views + @property def image(self): """Gets the image of this DatabaseDto. # noqa: E501 @@ -292,6 +323,27 @@ class DatabaseDto(object): self._accesses = accesses + @property + def owner(self): + """Gets the owner of this DatabaseDto. # noqa: E501 + + + :return: The owner of this DatabaseDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this DatabaseDto. + + + :param owner: The owner of this DatabaseDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this DatabaseDto. # noqa: E501 diff --git a/swagger/api/api_container/models/image_dto.py b/swagger/api/api_container/models/image_dto.py index 405fe06..09abf54 100644 --- a/swagger/api/api_container/models/image_dto.py +++ b/swagger/api/api_container/models/image_dto.py @@ -35,7 +35,6 @@ class ImageDto(object): 'hash': 'str', 'compiled': 'datetime', 'size': 'int', - 'environment': 'list[ImageEnvItemDto]', 'driver_class': 'str', 'date_formats': 'list[ImageDateDto]', 'jdbc_method': 'str', @@ -50,14 +49,13 @@ class ImageDto(object): 'hash': 'hash', 'compiled': 'compiled', 'size': 'size', - 'environment': 'environment', 'driver_class': 'driver_class', 'date_formats': 'date_formats', 'jdbc_method': 'jdbc_method', 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, environment=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + 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 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None self._repository = None @@ -66,7 +64,6 @@ class ImageDto(object): self._hash = None self._compiled = None self._size = None - self._environment = None self._driver_class = None self._date_formats = None self._jdbc_method = None @@ -82,7 +79,6 @@ class ImageDto(object): self.compiled = compiled if size is not None: self.size = size - self.environment = environment self.driver_class = driver_class if date_formats is not None: self.date_formats = date_formats @@ -244,29 +240,6 @@ class ImageDto(object): self._size = size - @property - def environment(self): - """Gets the environment of this ImageDto. # noqa: E501 - - - :return: The environment of this ImageDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageDto. - - - :param environment: The environment of this ImageDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - if environment is None: - raise ValueError("Invalid value for `environment`, must not be `None`") # noqa: E501 - - self._environment = environment - @property def driver_class(self): """Gets the driver_class of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_container/models/image_env_item_dto.py b/swagger/api/api_container/models/image_env_item_dto.py index e414cf9..354edcd 100644 --- a/swagger/api/api_container/models/image_env_item_dto.py +++ b/swagger/api/api_container/models/image_env_item_dto.py @@ -30,27 +30,23 @@ class ImageEnvItemDto(object): swagger_types = { 'iid': 'int', 'key': 'str', - 'value': 'str', 'type': 'str' } attribute_map = { 'iid': 'iid', 'key': 'key', - 'value': 'value', 'type': 'type' } - def __init__(self, iid=None, key=None, value=None, type=None): # noqa: E501 + def __init__(self, iid=None, key=None, type=None): # noqa: E501 """ImageEnvItemDto - a model defined in Swagger""" # noqa: E501 self._iid = None self._key = None - self._value = None self._type = None self.discriminator = None self.iid = iid self.key = key - self.value = value self.type = type @property @@ -99,29 +95,6 @@ class ImageEnvItemDto(object): self._key = key - @property - def value(self): - """Gets the value of this ImageEnvItemDto. # noqa: E501 - - - :return: The value of this ImageEnvItemDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this ImageEnvItemDto. - - - :param value: The value of this ImageEnvItemDto. # noqa: E501 - :type: str - """ - if value is None: - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value - @property def type(self): """Gets the type of this ImageEnvItemDto. # noqa: E501 diff --git a/swagger/api/api_container/models/table_brief_dto.py b/swagger/api/api_container/models/table_brief_dto.py index ce3bc12..ab3ad5d 100644 --- a/swagger/api/api_container/models/table_brief_dto.py +++ b/swagger/api/api_container/models/table_brief_dto.py @@ -32,6 +32,7 @@ class TableBriefDto(object): 'name': 'str', 'description': 'str', 'creator': 'UserBriefDto', + 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,21 +41,24 @@ class TableBriefDto(object): 'name': 'name', 'description': 'description', 'creator': 'creator', + 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, creator=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._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description self.creator = creator + self.columns = columns self.internal_name = internal_name @property @@ -149,6 +153,29 @@ class TableBriefDto(object): self._creator = creator + @property + def columns(self): + """Gets the columns of this TableBriefDto. # noqa: E501 + + + :return: The columns of this TableBriefDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableBriefDto. + + + :param columns: The columns of this TableBriefDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + @property def internal_name(self): """Gets the internal_name of this TableBriefDto. # noqa: E501 diff --git a/swagger/api/api_container/models/view_brief_dto.py b/swagger/api/api_container/models/view_brief_dto.py new file mode 100644 index 0000000..332e0af --- /dev/null +++ b/swagger/api/api_container/models/view_brief_dto.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + Database Repository Container Service API + + Service that manages the containers # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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 ViewBriefDto(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', + 'vdbid': 'int', + 'name': 'str', + 'query': 'str', + 'created': 'datetime', + 'creator': 'UserDto', + 'internal_name': 'str', + 'is_public': 'bool', + 'initial_view': 'bool', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'vdbid': 'vdbid', + 'name': 'name', + 'query': 'query', + 'created': 'created', + 'creator': 'creator', + 'internal_name': 'internal_name', + 'is_public': 'is_public', + 'initial_view': 'initial_view', + 'last_modified': 'last_modified' + } + + def __init__(self, id=None, vdbid=None, name=None, query=None, created=None, creator=None, internal_name=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 + """ViewBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._vdbid = None + self._name = None + self._query = None + self._created = None + self._creator = None + self._internal_name = None + self._is_public = None + self._initial_view = None + self._last_modified = None + self.discriminator = None + self.id = id + self.vdbid = vdbid + self.name = name + self.query = query + self.created = created + self.creator = creator + self.internal_name = internal_name + if is_public is not None: + self.is_public = is_public + if initial_view is not None: + self.initial_view = initial_view + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this ViewBriefDto. # noqa: E501 + + + :return: The id of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ViewBriefDto. + + + :param id: The id of this ViewBriefDto. # 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 vdbid(self): + """Gets the vdbid of this ViewBriefDto. # noqa: E501 + + + :return: The vdbid of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._vdbid + + @vdbid.setter + def vdbid(self, vdbid): + """Sets the vdbid of this ViewBriefDto. + + + :param vdbid: The vdbid of this ViewBriefDto. # noqa: E501 + :type: int + """ + if vdbid is None: + raise ValueError("Invalid value for `vdbid`, must not be `None`") # noqa: E501 + + self._vdbid = vdbid + + @property + def name(self): + """Gets the name of this ViewBriefDto. # noqa: E501 + + + :return: The name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ViewBriefDto. + + + :param name: The name of this ViewBriefDto. # 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 query(self): + """Gets the query of this ViewBriefDto. # noqa: E501 + + + :return: The query of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """Sets the query of this ViewBriefDto. + + + :param query: The query of this ViewBriefDto. # noqa: E501 + :type: str + """ + if query is None: + raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 + + self._query = query + + @property + def created(self): + """Gets the created of this ViewBriefDto. # noqa: E501 + + + :return: The created of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ViewBriefDto. + + + :param created: The created of this ViewBriefDto. # 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 creator(self): + """Gets the creator of this ViewBriefDto. # noqa: E501 + + + :return: The creator of this ViewBriefDto. # noqa: E501 + :rtype: UserDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ViewBriefDto. + + + :param creator: The creator of this ViewBriefDto. # noqa: E501 + :type: UserDto + """ + if creator is None: + raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + + self._creator = creator + + @property + def internal_name(self): + """Gets the internal_name of this ViewBriefDto. # noqa: E501 + + + :return: The internal_name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ViewBriefDto. + + + :param internal_name: The internal_name of this ViewBriefDto. # 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 is_public(self): + """Gets the is_public of this ViewBriefDto. # noqa: E501 + + + :return: The is_public of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this ViewBriefDto. + + + :param is_public: The is_public of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._is_public = is_public + + @property + def initial_view(self): + """Gets the initial_view of this ViewBriefDto. # noqa: E501 + + True if it is the default view for the database # noqa: E501 + + :return: The initial_view of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._initial_view + + @initial_view.setter + def initial_view(self, initial_view): + """Sets the initial_view of this ViewBriefDto. + + True if it is the default view for the database # noqa: E501 + + :param initial_view: The initial_view of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._initial_view = initial_view + + @property + def last_modified(self): + """Gets the last_modified of this ViewBriefDto. # noqa: E501 + + + :return: The last_modified of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this ViewBriefDto. + + + :param last_modified: The last_modified of this ViewBriefDto. # 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(ViewBriefDto, 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, ViewBriefDto): + 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/__init__.py b/swagger/api/api_database/__init__.py index a381fd9..c6847c3 100644 --- a/swagger/api/api_database/__init__.py +++ b/swagger/api/api_database/__init__.py @@ -23,6 +23,7 @@ from api_database.api_client import ApiClient from api_database.configuration import Configuration # import models into sdk package from api_database.models.api_error_dto import ApiErrorDto +from api_database.models.column_brief_dto import ColumnBriefDto from api_database.models.container_brief_dto import ContainerBriefDto from api_database.models.container_dto import ContainerDto from api_database.models.creator_dto import CreatorDto @@ -32,15 +33,16 @@ from api_database.models.database_create_dto import DatabaseCreateDto from api_database.models.database_dto import DatabaseDto from api_database.models.database_give_access_dto import DatabaseGiveAccessDto from api_database.models.database_modify_access_dto import DatabaseModifyAccessDto +from api_database.models.database_modify_visibility_dto import DatabaseModifyVisibilityDto from api_database.models.database_transfer_dto import DatabaseTransferDto from api_database.models.granted_authority_dto import GrantedAuthorityDto from api_database.models.identifier_dto import IdentifierDto from api_database.models.image_brief_dto import ImageBriefDto from api_database.models.image_date_dto import ImageDateDto from api_database.models.image_dto import ImageDto -from api_database.models.image_env_item_dto import ImageEnvItemDto from api_database.models.license_dto import LicenseDto from api_database.models.related_identifier_dto import RelatedIdentifierDto from api_database.models.table_brief_dto import TableBriefDto from api_database.models.user_brief_dto import UserBriefDto from api_database.models.user_dto import UserDto +from api_database.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_database/api/access_endpoint_api.py b/swagger/api/api_database/api/access_endpoint_api.py index a12279a..d9d871b 100644 --- a/swagger/api/api_database/api/access_endpoint_api.py +++ b/swagger/api/api_database/api/access_endpoint_api.py @@ -246,16 +246,15 @@ class AccessEndpointApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def update(self, body, id, database_id, username, **kwargs): # noqa: E501 - """Modify access to some database # noqa: E501 + def revoke(self, id, database_id, username, **kwargs): # noqa: E501 + """Revoke access to some database # 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, username, async_req=True) + >>> thread = api.revoke(id, database_id, username, async_req=True) >>> result = thread.get() :param async_req bool - :param DatabaseModifyAccessDto body: (required) :param int id: (required) :param int database_id: (required) :param str username: (required) @@ -265,21 +264,20 @@ class AccessEndpointApi(object): """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_with_http_info(body, id, database_id, username, **kwargs) # noqa: E501 + return self.revoke_with_http_info(id, database_id, username, **kwargs) # noqa: E501 else: - (data) = self.update_with_http_info(body, id, database_id, username, **kwargs) # noqa: E501 + (data) = self.revoke_with_http_info(id, database_id, username, **kwargs) # noqa: E501 return data - def update_with_http_info(self, body, id, database_id, username, **kwargs): # noqa: E501 - """Modify access to some database # noqa: E501 + def revoke_with_http_info(self, id, database_id, username, **kwargs): # noqa: E501 + """Revoke access to some database # 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, username, async_req=True) + >>> thread = api.revoke_with_http_info(id, database_id, username, async_req=True) >>> result = thread.get() :param async_req bool - :param DatabaseModifyAccessDto body: (required) :param int id: (required) :param int database_id: (required) :param str username: (required) @@ -288,7 +286,7 @@ class AccessEndpointApi(object): returns the request thread. """ - all_params = ['body', 'id', 'database_id', 'username'] # noqa: E501 + all_params = ['id', 'database_id', 'username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -299,26 +297,22 @@ class AccessEndpointApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method update" % key + " to method revoke" % 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 + raise ValueError("Missing the required parameter `id` when calling `revoke`") # noqa: E501 # 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 `update`") # noqa: E501 + raise ValueError("Missing the required parameter `database_id` when calling `revoke`") # noqa: E501 # verify the required parameter 'username' is set if ('username' not in params or params['username'] is None): - raise ValueError("Missing the required parameter `username` when calling `update`") # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `revoke`") # noqa: E501 collection_formats = {} @@ -338,21 +332,15 @@ class AccessEndpointApi(object): 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( ['*/*']) # 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/container/{id}/database/{databaseId}/access/{username}', 'PUT', + '/api/container/{id}/database/{databaseId}/access/{username}', 'DELETE', path_params, query_params, header_params, @@ -367,15 +355,16 @@ class AccessEndpointApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def update1(self, id, database_id, username, **kwargs): # noqa: E501 - """Revoke access to some database # noqa: E501 + def update(self, body, id, database_id, username, **kwargs): # noqa: E501 + """Modify access to some database # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update1(id, database_id, username, async_req=True) + >>> thread = api.update(body, id, database_id, username, async_req=True) >>> result = thread.get() :param async_req bool + :param DatabaseModifyAccessDto body: (required) :param int id: (required) :param int database_id: (required) :param str username: (required) @@ -385,20 +374,21 @@ class AccessEndpointApi(object): """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update1_with_http_info(id, database_id, username, **kwargs) # noqa: E501 + return self.update_with_http_info(body, id, database_id, username, **kwargs) # noqa: E501 else: - (data) = self.update1_with_http_info(id, database_id, username, **kwargs) # noqa: E501 + (data) = self.update_with_http_info(body, id, database_id, username, **kwargs) # noqa: E501 return data - def update1_with_http_info(self, id, database_id, username, **kwargs): # noqa: E501 - """Revoke access to some database # noqa: E501 + def update_with_http_info(self, body, id, database_id, username, **kwargs): # noqa: E501 + """Modify access to some database # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update1_with_http_info(id, database_id, username, async_req=True) + >>> thread = api.update_with_http_info(body, id, database_id, username, async_req=True) >>> result = thread.get() :param async_req bool + :param DatabaseModifyAccessDto body: (required) :param int id: (required) :param int database_id: (required) :param str username: (required) @@ -407,7 +397,7 @@ class AccessEndpointApi(object): returns the request thread. """ - all_params = ['id', 'database_id', 'username'] # noqa: E501 + all_params = ['body', 'id', 'database_id', 'username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -418,22 +408,26 @@ class AccessEndpointApi(object): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method update1" % key + " 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 `update1`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 # 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 `update1`") # noqa: E501 + raise ValueError("Missing the required parameter `database_id` when calling `update`") # noqa: E501 # verify the required parameter 'username' is set if ('username' not in params or params['username'] is None): - raise ValueError("Missing the required parameter `username` when calling `update1`") # noqa: E501 + raise ValueError("Missing the required parameter `username` when calling `update`") # noqa: E501 collection_formats = {} @@ -453,15 +447,21 @@ class AccessEndpointApi(object): 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( ['*/*']) # 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/container/{id}/database/{databaseId}/access/{username}', 'DELETE', + '/api/container/{id}/database/{databaseId}/access/{username}', 'PUT', path_params, query_params, header_params, diff --git a/swagger/api/api_database/api/database_endpoint_api.py b/swagger/api/api_database/api/database_endpoint_api.py index 3245d77..64dbe3e 100644 --- a/swagger/api/api_database/api/database_endpoint_api.py +++ b/swagger/api/api_database/api/database_endpoint_api.py @@ -544,3 +544,116 @@ class DatabaseEndpointApi(object): _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def visibility(self, body, id, database_id, **kwargs): # noqa: E501 + """Update database # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.visibility(body, id, database_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DatabaseModifyVisibilityDto body: (required) + :param int id: (required) + :param int database_id: (required) + :return: DatabaseDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.visibility_with_http_info(body, id, database_id, **kwargs) # noqa: E501 + else: + (data) = self.visibility_with_http_info(body, id, database_id, **kwargs) # noqa: E501 + return data + + def visibility_with_http_info(self, body, id, database_id, **kwargs): # noqa: E501 + """Update database # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.visibility_with_http_info(body, id, database_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DatabaseModifyVisibilityDto body: (required) + :param int id: (required) + :param int database_id: (required) + :return: DatabaseDto + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'id', 'database_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 visibility" % 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 `visibility`") # 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 `visibility`") # noqa: E501 + # 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 `visibility`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'database_id' in params: + path_params['databaseId'] = params['database_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( + ['*/*']) # 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/container/{id}/database/{databaseId}/visibility', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DatabaseDto', # 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_database/models/__init__.py b/swagger/api/api_database/models/__init__.py index 31780c5..7928adf 100644 --- a/swagger/api/api_database/models/__init__.py +++ b/swagger/api/api_database/models/__init__.py @@ -15,6 +15,7 @@ from __future__ import absolute_import # import models into model package from api_database.models.api_error_dto import ApiErrorDto +from api_database.models.column_brief_dto import ColumnBriefDto from api_database.models.container_brief_dto import ContainerBriefDto from api_database.models.container_dto import ContainerDto from api_database.models.creator_dto import CreatorDto @@ -24,15 +25,16 @@ from api_database.models.database_create_dto import DatabaseCreateDto from api_database.models.database_dto import DatabaseDto from api_database.models.database_give_access_dto import DatabaseGiveAccessDto from api_database.models.database_modify_access_dto import DatabaseModifyAccessDto +from api_database.models.database_modify_visibility_dto import DatabaseModifyVisibilityDto from api_database.models.database_transfer_dto import DatabaseTransferDto from api_database.models.granted_authority_dto import GrantedAuthorityDto from api_database.models.identifier_dto import IdentifierDto from api_database.models.image_brief_dto import ImageBriefDto from api_database.models.image_date_dto import ImageDateDto from api_database.models.image_dto import ImageDto -from api_database.models.image_env_item_dto import ImageEnvItemDto from api_database.models.license_dto import LicenseDto from api_database.models.related_identifier_dto import RelatedIdentifierDto from api_database.models.table_brief_dto import TableBriefDto from api_database.models.user_brief_dto import UserBriefDto from api_database.models.user_dto import UserDto +from api_database.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_database/models/column_brief_dto.py b/swagger/api/api_database/models/column_brief_dto.py new file mode 100644 index 0000000..c417e6a --- /dev/null +++ b/swagger/api/api_database/models/column_brief_dto.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Database Repository Database Service API + + Service that manages the databases # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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', + 'internal_name': 'str', + 'column_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'internal_name': 'internal_name', + 'column_type': 'column_type' + } + + def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._internal_name = None + self._column_type = None + self.discriminator = None + self.id = id + self.name = name + 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 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_database/models/container_dto.py b/swagger/api/api_database/models/container_dto.py index 885b53f..8cdb0d0 100644 --- a/swagger/api/api_database/models/container_dto.py +++ b/swagger/api/api_database/models/container_dto.py @@ -35,6 +35,7 @@ class ContainerDto(object): 'database': 'DatabaseDto', 'image': 'ImageBriefDto', 'port': 'int', + 'owner': 'UserBriefDto', 'created': 'datetime', 'internal_name': 'str', 'ip_address': 'str' @@ -48,12 +49,13 @@ class ContainerDto(object): 'database': 'database', 'image': 'image', 'port': 'port', + 'owner': 'owner', 'created': 'created', 'internal_name': 'internal_name', 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, owner=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -62,6 +64,7 @@ class ContainerDto(object): self._database = None self._image = None self._port = None + self._owner = None self._created = None self._internal_name = None self._ip_address = None @@ -77,6 +80,8 @@ class ContainerDto(object): self.image = image if port is not None: self.port = port + if owner is not None: + self.owner = owner self.created = created self.internal_name = internal_name if ip_address is not None: @@ -241,6 +246,27 @@ class ContainerDto(object): self._port = port + @property + def owner(self): + """Gets the owner of this ContainerDto. # noqa: E501 + + + :return: The owner of this ContainerDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this ContainerDto. + + + :param owner: The owner of this ContainerDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this ContainerDto. # noqa: E501 diff --git a/swagger/api/api_database/models/database_dto.py b/swagger/api/api_database/models/database_dto.py index c996c3a..4f06ddd 100644 --- a/swagger/api/api_database/models/database_dto.py +++ b/swagger/api/api_database/models/database_dto.py @@ -34,9 +34,11 @@ class DatabaseDto(object): 'identifier': 'IdentifierDto', 'description': 'str', 'tables': 'list[TableBriefDto]', + 'views': 'list[ViewBriefDto]', 'image': 'ImageDto', 'container': 'ContainerDto', 'accesses': 'list[DatabaseAccessDto]', + 'owner': 'UserBriefDto', 'created': 'datetime', 'exchange_name': 'str', 'internal_name': 'str', @@ -50,16 +52,18 @@ class DatabaseDto(object): 'identifier': 'identifier', 'description': 'description', 'tables': 'tables', + 'views': 'views', 'image': 'image', 'container': 'container', 'accesses': 'accesses', + 'owner': 'owner', 'created': 'created', 'exchange_name': 'exchange_name', 'internal_name': 'internal_name', 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, image=None, container=None, accesses=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, owner=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -67,9 +71,11 @@ class DatabaseDto(object): self._identifier = None self._description = None self._tables = None + self._views = None self._image = None self._container = None self._accesses = None + self._owner = None self._created = None self._exchange_name = None self._internal_name = None @@ -84,12 +90,16 @@ class DatabaseDto(object): self.description = description if tables is not None: self.tables = tables + if views is not None: + self.views = views if image is not None: self.image = image if container is not None: self.container = container if accesses is not None: self.accesses = accesses + if owner is not None: + self.owner = owner if created is not None: self.created = created self.exchange_name = exchange_name @@ -229,6 +239,27 @@ class DatabaseDto(object): self._tables = tables + @property + def views(self): + """Gets the views of this DatabaseDto. # noqa: E501 + + + :return: The views of this DatabaseDto. # noqa: E501 + :rtype: list[ViewBriefDto] + """ + return self._views + + @views.setter + def views(self, views): + """Sets the views of this DatabaseDto. + + + :param views: The views of this DatabaseDto. # noqa: E501 + :type: list[ViewBriefDto] + """ + + self._views = views + @property def image(self): """Gets the image of this DatabaseDto. # noqa: E501 @@ -292,6 +323,27 @@ class DatabaseDto(object): self._accesses = accesses + @property + def owner(self): + """Gets the owner of this DatabaseDto. # noqa: E501 + + + :return: The owner of this DatabaseDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this DatabaseDto. + + + :param owner: The owner of this DatabaseDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this DatabaseDto. # noqa: E501 diff --git a/swagger/api/api_identifier/models/granted_authority_dto.py b/swagger/api/api_database/models/database_modify_visibility_dto.py similarity index 64% rename from swagger/api/api_identifier/models/granted_authority_dto.py rename to swagger/api/api_database/models/database_modify_visibility_dto.py index 40fd021..dd7e4c6 100644 --- a/swagger/api/api_identifier/models/granted_authority_dto.py +++ b/swagger/api/api_database/models/database_modify_visibility_dto.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Database Repository Identifier Service API + Database Repository Database Service API - Service that manages the identifiers # noqa: E501 + Service that manages the databases # noqa: E501 OpenAPI spec version: 1.1.0-alpha Contact: andreas.rauber@tuwien.ac.at @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class GrantedAuthorityDto(object): +class DatabaseModifyVisibilityDto(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -28,40 +28,41 @@ class GrantedAuthorityDto(object): and the value is json key in definition. """ swagger_types = { - 'authority': 'str' + 'is_public': 'bool' } attribute_map = { - 'authority': 'authority' + 'is_public': 'is_public' } - def __init__(self, authority=None): # noqa: E501 - """GrantedAuthorityDto - a model defined in Swagger""" # noqa: E501 - self._authority = None + def __init__(self, is_public=None): # noqa: E501 + """DatabaseModifyVisibilityDto - a model defined in Swagger""" # noqa: E501 + self._is_public = None self.discriminator = None - if authority is not None: - self.authority = authority + self.is_public = is_public @property - def authority(self): - """Gets the authority of this GrantedAuthorityDto. # noqa: E501 + def is_public(self): + """Gets the is_public of this DatabaseModifyVisibilityDto. # noqa: E501 - :return: The authority of this GrantedAuthorityDto. # noqa: E501 - :rtype: str + :return: The is_public of this DatabaseModifyVisibilityDto. # noqa: E501 + :rtype: bool """ - return self._authority + return self._is_public - @authority.setter - def authority(self, authority): - """Sets the authority of this GrantedAuthorityDto. + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this DatabaseModifyVisibilityDto. - :param authority: The authority of this GrantedAuthorityDto. # noqa: E501 - :type: str + :param is_public: The is_public of this DatabaseModifyVisibilityDto. # noqa: E501 + :type: bool """ + if is_public is None: + raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501 - self._authority = authority + self._is_public = is_public def to_dict(self): """Returns the model properties as a dict""" @@ -84,7 +85,7 @@ class GrantedAuthorityDto(object): )) else: result[attr] = value - if issubclass(GrantedAuthorityDto, dict): + if issubclass(DatabaseModifyVisibilityDto, dict): for key, value in self.items(): result[key] = value @@ -100,7 +101,7 @@ class GrantedAuthorityDto(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, GrantedAuthorityDto): + if not isinstance(other, DatabaseModifyVisibilityDto): return False return self.__dict__ == other.__dict__ diff --git a/swagger/api/api_database/models/database_transfer_dto.py b/swagger/api/api_database/models/database_transfer_dto.py index e179371..b26b345 100644 --- a/swagger/api/api_database/models/database_transfer_dto.py +++ b/swagger/api/api_database/models/database_transfer_dto.py @@ -28,41 +28,41 @@ class DatabaseTransferDto(object): and the value is json key in definition. """ swagger_types = { - 'is_public': 'bool' + 'username': 'str' } attribute_map = { - 'is_public': 'is_public' + 'username': 'username' } - def __init__(self, is_public=None): # noqa: E501 + def __init__(self, username=None): # noqa: E501 """DatabaseTransferDto - a model defined in Swagger""" # noqa: E501 - self._is_public = None + self._username = None self.discriminator = None - self.is_public = is_public + self.username = username @property - def is_public(self): - """Gets the is_public of this DatabaseTransferDto. # noqa: E501 + def username(self): + """Gets the username of this DatabaseTransferDto. # noqa: E501 - :return: The is_public of this DatabaseTransferDto. # noqa: E501 - :rtype: bool + :return: The username of this DatabaseTransferDto. # noqa: E501 + :rtype: str """ - return self._is_public + return self._username - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseTransferDto. + @username.setter + def username(self, username): + """Sets the username of this DatabaseTransferDto. - :param is_public: The is_public of this DatabaseTransferDto. # noqa: E501 - :type: bool + :param username: The username of this DatabaseTransferDto. # noqa: E501 + :type: str """ - if is_public is None: - raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501 + if username is None: + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - self._is_public = is_public + self._username = username def to_dict(self): """Returns the model properties as a dict""" diff --git a/swagger/api/api_database/models/image_dto.py b/swagger/api/api_database/models/image_dto.py index e067503..4596790 100644 --- a/swagger/api/api_database/models/image_dto.py +++ b/swagger/api/api_database/models/image_dto.py @@ -35,7 +35,6 @@ class ImageDto(object): 'hash': 'str', 'compiled': 'datetime', 'size': 'int', - 'environment': 'list[ImageEnvItemDto]', 'driver_class': 'str', 'date_formats': 'list[ImageDateDto]', 'jdbc_method': 'str', @@ -50,14 +49,13 @@ class ImageDto(object): 'hash': 'hash', 'compiled': 'compiled', 'size': 'size', - 'environment': 'environment', 'driver_class': 'driver_class', 'date_formats': 'date_formats', 'jdbc_method': 'jdbc_method', 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, environment=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + 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 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None self._repository = None @@ -66,7 +64,6 @@ class ImageDto(object): self._hash = None self._compiled = None self._size = None - self._environment = None self._driver_class = None self._date_formats = None self._jdbc_method = None @@ -82,7 +79,6 @@ class ImageDto(object): self.compiled = compiled if size is not None: self.size = size - self.environment = environment self.driver_class = driver_class if date_formats is not None: self.date_formats = date_formats @@ -244,29 +240,6 @@ class ImageDto(object): self._size = size - @property - def environment(self): - """Gets the environment of this ImageDto. # noqa: E501 - - - :return: The environment of this ImageDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageDto. - - - :param environment: The environment of this ImageDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - if environment is None: - raise ValueError("Invalid value for `environment`, must not be `None`") # noqa: E501 - - self._environment = environment - @property def driver_class(self): """Gets the driver_class 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 c77a8a3..828d233 100644 --- a/swagger/api/api_database/models/table_brief_dto.py +++ b/swagger/api/api_database/models/table_brief_dto.py @@ -32,6 +32,7 @@ class TableBriefDto(object): 'name': 'str', 'description': 'str', 'creator': 'UserBriefDto', + 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,21 +41,24 @@ class TableBriefDto(object): 'name': 'name', 'description': 'description', 'creator': 'creator', + 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, creator=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._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description self.creator = creator + self.columns = columns self.internal_name = internal_name @property @@ -149,6 +153,29 @@ class TableBriefDto(object): self._creator = creator + @property + def columns(self): + """Gets the columns of this TableBriefDto. # noqa: E501 + + + :return: The columns of this TableBriefDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableBriefDto. + + + :param columns: The columns of this TableBriefDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + @property def internal_name(self): """Gets the internal_name of this TableBriefDto. # noqa: E501 diff --git a/swagger/api/api_database/models/view_brief_dto.py b/swagger/api/api_database/models/view_brief_dto.py new file mode 100644 index 0000000..a87e94c --- /dev/null +++ b/swagger/api/api_database/models/view_brief_dto.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + Database Repository Database Service API + + Service that manages the databases # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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 ViewBriefDto(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', + 'vdbid': 'int', + 'name': 'str', + 'query': 'str', + 'created': 'datetime', + 'creator': 'UserDto', + 'internal_name': 'str', + 'is_public': 'bool', + 'initial_view': 'bool', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'vdbid': 'vdbid', + 'name': 'name', + 'query': 'query', + 'created': 'created', + 'creator': 'creator', + 'internal_name': 'internal_name', + 'is_public': 'is_public', + 'initial_view': 'initial_view', + 'last_modified': 'last_modified' + } + + def __init__(self, id=None, vdbid=None, name=None, query=None, created=None, creator=None, internal_name=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 + """ViewBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._vdbid = None + self._name = None + self._query = None + self._created = None + self._creator = None + self._internal_name = None + self._is_public = None + self._initial_view = None + self._last_modified = None + self.discriminator = None + self.id = id + self.vdbid = vdbid + self.name = name + self.query = query + self.created = created + self.creator = creator + self.internal_name = internal_name + if is_public is not None: + self.is_public = is_public + if initial_view is not None: + self.initial_view = initial_view + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this ViewBriefDto. # noqa: E501 + + + :return: The id of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ViewBriefDto. + + + :param id: The id of this ViewBriefDto. # 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 vdbid(self): + """Gets the vdbid of this ViewBriefDto. # noqa: E501 + + + :return: The vdbid of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._vdbid + + @vdbid.setter + def vdbid(self, vdbid): + """Sets the vdbid of this ViewBriefDto. + + + :param vdbid: The vdbid of this ViewBriefDto. # noqa: E501 + :type: int + """ + if vdbid is None: + raise ValueError("Invalid value for `vdbid`, must not be `None`") # noqa: E501 + + self._vdbid = vdbid + + @property + def name(self): + """Gets the name of this ViewBriefDto. # noqa: E501 + + + :return: The name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ViewBriefDto. + + + :param name: The name of this ViewBriefDto. # 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 query(self): + """Gets the query of this ViewBriefDto. # noqa: E501 + + + :return: The query of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """Sets the query of this ViewBriefDto. + + + :param query: The query of this ViewBriefDto. # noqa: E501 + :type: str + """ + if query is None: + raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 + + self._query = query + + @property + def created(self): + """Gets the created of this ViewBriefDto. # noqa: E501 + + + :return: The created of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ViewBriefDto. + + + :param created: The created of this ViewBriefDto. # 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 creator(self): + """Gets the creator of this ViewBriefDto. # noqa: E501 + + + :return: The creator of this ViewBriefDto. # noqa: E501 + :rtype: UserDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ViewBriefDto. + + + :param creator: The creator of this ViewBriefDto. # noqa: E501 + :type: UserDto + """ + if creator is None: + raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + + self._creator = creator + + @property + def internal_name(self): + """Gets the internal_name of this ViewBriefDto. # noqa: E501 + + + :return: The internal_name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ViewBriefDto. + + + :param internal_name: The internal_name of this ViewBriefDto. # 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 is_public(self): + """Gets the is_public of this ViewBriefDto. # noqa: E501 + + + :return: The is_public of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this ViewBriefDto. + + + :param is_public: The is_public of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._is_public = is_public + + @property + def initial_view(self): + """Gets the initial_view of this ViewBriefDto. # noqa: E501 + + True if it is the default view for the database # noqa: E501 + + :return: The initial_view of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._initial_view + + @initial_view.setter + def initial_view(self, initial_view): + """Sets the initial_view of this ViewBriefDto. + + True if it is the default view for the database # noqa: E501 + + :param initial_view: The initial_view of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._initial_view = initial_view + + @property + def last_modified(self): + """Gets the last_modified of this ViewBriefDto. # noqa: E501 + + + :return: The last_modified of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this ViewBriefDto. + + + :param last_modified: The last_modified of this ViewBriefDto. # 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(ViewBriefDto, 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, ViewBriefDto): + 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_identifier/api/identifier_endpoint_api.py b/swagger/api/api_identifier/api/identifier_endpoint_api.py index 0dc412f..dca64c9 100644 --- a/swagger/api/api_identifier/api/identifier_endpoint_api.py +++ b/swagger/api/api_identifier/api/identifier_endpoint_api.py @@ -241,6 +241,7 @@ class IdentifierEndpointApi(object): :param async_req bool :param int dbid: :param int qid: + :param str type: :return: list[IdentifierDto] If the method is called asynchronously, returns the request thread. @@ -263,12 +264,13 @@ class IdentifierEndpointApi(object): :param async_req bool :param int dbid: :param int qid: + :param str type: :return: list[IdentifierDto] If the method is called asynchronously, returns the request thread. """ - all_params = ['dbid', 'qid'] # noqa: E501 + all_params = ['dbid', 'qid', 'type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -293,6 +295,8 @@ class IdentifierEndpointApi(object): query_params.append(('dbid', params['dbid'])) # noqa: E501 if 'qid' in params: query_params.append(('qid', params['qid'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 header_params = {} diff --git a/swagger/api/api_identifier/models/container_dto.py b/swagger/api/api_identifier/models/container_dto.py deleted file mode 100644 index 693e708..0000000 --- a/swagger/api/api_identifier/models/container_dto.py +++ /dev/null @@ -1,355 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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 ContainerDto(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', - 'hash': 'str', - 'name': 'str', - 'state': 'str', - 'databases': 'list[DatabaseDto]', - 'image': 'ImageBriefDto', - 'port': 'int', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - 'databases': 'databases', - 'image': 'image', - 'port': 'port', - 'created': 'created', - 'internal_name': 'internal_name', - 'ip_address': 'ip_address' - } - - def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 - """ContainerDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._hash = None - self._name = None - self._state = None - self._databases = None - self._image = None - self._port = None - self._created = None - self._internal_name = None - self._ip_address = None - self.discriminator = None - self.id = id - self.hash = hash - self.name = name - if state is not None: - self.state = state - if databases is not None: - self.databases = databases - if image is not None: - self.image = image - if port is not None: - self.port = port - self.created = created - self.internal_name = internal_name - if ip_address is not None: - self.ip_address = ip_address - - @property - def id(self): - """Gets the id of this ContainerDto. # noqa: E501 - - - :return: The id of this ContainerDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ContainerDto. - - - :param id: The id of this ContainerDto. # 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 hash(self): - """Gets the hash of this ContainerDto. # noqa: E501 - - - :return: The hash of this ContainerDto. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this ContainerDto. - - - :param hash: The hash of this ContainerDto. # noqa: E501 - :type: str - """ - if hash is None: - raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 - - self._hash = hash - - @property - def name(self): - """Gets the name of this ContainerDto. # noqa: E501 - - - :return: The name of this ContainerDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ContainerDto. - - - :param name: The name of this ContainerDto. # 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 state(self): - """Gets the state of this ContainerDto. # noqa: E501 - - - :return: The state of this ContainerDto. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this ContainerDto. - - - :param state: The state of this ContainerDto. # noqa: E501 - :type: str - """ - allowed_values = ["created", "restarting", "running", "paused", "exited", "dead"] # noqa: E501 - if state not in allowed_values: - raise ValueError( - "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 - .format(state, allowed_values) - ) - - self._state = state - - @property - def databases(self): - """Gets the databases of this ContainerDto. # noqa: E501 - - - :return: The databases of this ContainerDto. # noqa: E501 - :rtype: list[DatabaseDto] - """ - return self._databases - - @databases.setter - def databases(self, databases): - """Sets the databases of this ContainerDto. - - - :param databases: The databases of this ContainerDto. # noqa: E501 - :type: list[DatabaseDto] - """ - - self._databases = databases - - @property - def image(self): - """Gets the image of this ContainerDto. # noqa: E501 - - - :return: The image of this ContainerDto. # noqa: E501 - :rtype: ImageBriefDto - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this ContainerDto. - - - :param image: The image of this ContainerDto. # noqa: E501 - :type: ImageBriefDto - """ - - self._image = image - - @property - def port(self): - """Gets the port of this ContainerDto. # noqa: E501 - - - :return: The port of this ContainerDto. # noqa: E501 - :rtype: int - """ - return self._port - - @port.setter - def port(self, port): - """Sets the port of this ContainerDto. - - - :param port: The port of this ContainerDto. # noqa: E501 - :type: int - """ - - self._port = port - - @property - def created(self): - """Gets the created of this ContainerDto. # noqa: E501 - - - :return: The created of this ContainerDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ContainerDto. - - - :param created: The created of this ContainerDto. # 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 internal_name(self): - """Gets the internal_name of this ContainerDto. # noqa: E501 - - - :return: The internal_name of this ContainerDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ContainerDto. - - - :param internal_name: The internal_name of this ContainerDto. # 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 ip_address(self): - """Gets the ip_address of this ContainerDto. # noqa: E501 - - - :return: The ip_address of this ContainerDto. # noqa: E501 - :rtype: str - """ - return self._ip_address - - @ip_address.setter - def ip_address(self, ip_address): - """Sets the ip_address of this ContainerDto. - - - :param ip_address: The ip_address of this ContainerDto. # noqa: E501 - :type: str - """ - - self._ip_address = ip_address - - 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(ContainerDto, 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, ContainerDto): - 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_identifier/models/database_dto.py b/swagger/api/api_identifier/models/database_dto.py deleted file mode 100644 index c5ca2f5..0000000 --- a/swagger/api/api_identifier/models/database_dto.py +++ /dev/null @@ -1,427 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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 DatabaseDto(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', - 'exchange': 'str', - 'creator': 'UserBriefDto', - 'identifier': 'IdentifierDto', - 'description': 'str', - 'tables': 'list[TableBriefDto]', - 'image': 'ImageDto', - 'container': 'ContainerDto', - 'created': 'datetime', - 'deleted': 'datetime', - 'internal_name': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'exchange': 'exchange', - 'creator': 'creator', - 'identifier': 'identifier', - 'description': 'description', - 'tables': 'tables', - 'image': 'image', - 'container': 'container', - 'created': 'created', - 'deleted': 'deleted', - 'internal_name': 'internal_name', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, exchange=None, creator=None, identifier=None, description=None, tables=None, image=None, container=None, created=None, deleted=None, internal_name=None, is_public=None): # noqa: E501 - """DatabaseDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._exchange = None - self._creator = None - self._identifier = None - self._description = None - self._tables = None - self._image = None - self._container = None - self._created = None - self._deleted = None - self._internal_name = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - self.exchange = exchange - self.creator = creator - if identifier is not None: - self.identifier = identifier - if description is not None: - self.description = description - if tables is not None: - self.tables = tables - if image is not None: - self.image = image - if container is not None: - self.container = container - if created is not None: - self.created = created - if deleted is not None: - self.deleted = deleted - self.internal_name = internal_name - if is_public is not None: - self.is_public = is_public - - @property - def id(self): - """Gets the id of this DatabaseDto. # noqa: E501 - - - :return: The id of this DatabaseDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DatabaseDto. - - - :param id: The id of this DatabaseDto. # 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 DatabaseDto. # noqa: E501 - - - :return: The name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DatabaseDto. - - - :param name: The name of this DatabaseDto. # 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 exchange(self): - """Gets the exchange of this DatabaseDto. # noqa: E501 - - - :return: The exchange of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange - - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this DatabaseDto. - - - :param exchange: The exchange of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange is None: - raise ValueError("Invalid value for `exchange`, must not be `None`") # noqa: E501 - - self._exchange = exchange - - @property - def creator(self): - """Gets the creator of this DatabaseDto. # noqa: E501 - - - :return: The creator of this DatabaseDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseDto. - - - :param creator: The creator of this DatabaseDto. # noqa: E501 - :type: UserBriefDto - """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 - - self._creator = creator - - @property - def identifier(self): - """Gets the identifier of this DatabaseDto. # noqa: E501 - - - :return: The identifier of this DatabaseDto. # noqa: E501 - :rtype: IdentifierDto - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this DatabaseDto. - - - :param identifier: The identifier of this DatabaseDto. # noqa: E501 - :type: IdentifierDto - """ - - self._identifier = identifier - - @property - def description(self): - """Gets the description of this DatabaseDto. # noqa: E501 - - - :return: The description of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this DatabaseDto. - - - :param description: The description of this DatabaseDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def tables(self): - """Gets the tables of this DatabaseDto. # noqa: E501 - - - :return: The tables of this DatabaseDto. # noqa: E501 - :rtype: list[TableBriefDto] - """ - return self._tables - - @tables.setter - def tables(self, tables): - """Sets the tables of this DatabaseDto. - - - :param tables: The tables of this DatabaseDto. # noqa: E501 - :type: list[TableBriefDto] - """ - - self._tables = tables - - @property - def image(self): - """Gets the image of this DatabaseDto. # noqa: E501 - - - :return: The image of this DatabaseDto. # noqa: E501 - :rtype: ImageDto - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this DatabaseDto. - - - :param image: The image of this DatabaseDto. # noqa: E501 - :type: ImageDto - """ - - self._image = image - - @property - def container(self): - """Gets the container of this DatabaseDto. # noqa: E501 - - - :return: The container of this DatabaseDto. # noqa: E501 - :rtype: ContainerDto - """ - return self._container - - @container.setter - def container(self, container): - """Sets the container of this DatabaseDto. - - - :param container: The container of this DatabaseDto. # noqa: E501 - :type: ContainerDto - """ - - self._container = container - - @property - def created(self): - """Gets the created of this DatabaseDto. # noqa: E501 - - - :return: The created of this DatabaseDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseDto. - - - :param created: The created of this DatabaseDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def deleted(self): - """Gets the deleted of this DatabaseDto. # noqa: E501 - - - :return: The deleted of this DatabaseDto. # noqa: E501 - :rtype: datetime - """ - return self._deleted - - @deleted.setter - def deleted(self, deleted): - """Sets the deleted of this DatabaseDto. - - - :param deleted: The deleted of this DatabaseDto. # noqa: E501 - :type: datetime - """ - - self._deleted = deleted - - @property - def internal_name(self): - """Gets the internal_name of this DatabaseDto. # noqa: E501 - - - :return: The internal_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this DatabaseDto. - - - :param internal_name: The internal_name of this DatabaseDto. # 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 is_public(self): - """Gets the is_public of this DatabaseDto. # noqa: E501 - - - :return: The is_public of this DatabaseDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseDto. - - - :param is_public: The is_public of this DatabaseDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - - 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(DatabaseDto, 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, DatabaseDto): - 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_identifier/models/image_date_dto.py b/swagger/api/api_identifier/models/image_date_dto.py deleted file mode 100644 index 7cc2600..0000000 --- a/swagger/api/api_identifier/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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 ImageDateDto(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', - 'example': 'str', - 'database_format': 'str', - 'unix_format': 'str', - 'has_time': 'bool', - 'created_at': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'example': 'example', - 'database_format': 'database_format', - 'unix_format': 'unix_format', - 'has_time': 'has_time', - 'created_at': 'created_at' - } - - def __init__(self, id=None, example=None, database_format=None, unix_format=None, has_time=None, created_at=None): # noqa: E501 - """ImageDateDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._example = None - self._database_format = None - self._unix_format = None - self._has_time = None - self._created_at = None - self.discriminator = None - self.id = id - self.example = example - self.database_format = database_format - self.unix_format = unix_format - self.has_time = has_time - if created_at is not None: - self.created_at = created_at - - @property - def id(self): - """Gets the id of this ImageDateDto. # noqa: E501 - - - :return: The id of this ImageDateDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ImageDateDto. - - - :param id: The id of this ImageDateDto. # 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 example(self): - """Gets the example of this ImageDateDto. # noqa: E501 - - - :return: The example of this ImageDateDto. # noqa: E501 - :rtype: str - """ - return self._example - - @example.setter - def example(self, example): - """Sets the example of this ImageDateDto. - - - :param example: The example of this ImageDateDto. # noqa: E501 - :type: str - """ - if example is None: - raise ValueError("Invalid value for `example`, must not be `None`") # noqa: E501 - - self._example = example - - @property - def database_format(self): - """Gets the database_format of this ImageDateDto. # noqa: E501 - - - :return: The database_format of this ImageDateDto. # noqa: E501 - :rtype: str - """ - return self._database_format - - @database_format.setter - def database_format(self, database_format): - """Sets the database_format of this ImageDateDto. - - - :param database_format: The database_format of this ImageDateDto. # noqa: E501 - :type: str - """ - if database_format is None: - raise ValueError("Invalid value for `database_format`, must not be `None`") # noqa: E501 - - self._database_format = database_format - - @property - def unix_format(self): - """Gets the unix_format of this ImageDateDto. # noqa: E501 - - - :return: The unix_format of this ImageDateDto. # noqa: E501 - :rtype: str - """ - return self._unix_format - - @unix_format.setter - def unix_format(self, unix_format): - """Sets the unix_format of this ImageDateDto. - - - :param unix_format: The unix_format of this ImageDateDto. # noqa: E501 - :type: str - """ - if unix_format is None: - raise ValueError("Invalid value for `unix_format`, must not be `None`") # noqa: E501 - - self._unix_format = unix_format - - @property - def has_time(self): - """Gets the has_time of this ImageDateDto. # noqa: E501 - - - :return: The has_time of this ImageDateDto. # noqa: E501 - :rtype: bool - """ - return self._has_time - - @has_time.setter - def has_time(self, has_time): - """Sets the has_time of this ImageDateDto. - - - :param has_time: The has_time of this ImageDateDto. # noqa: E501 - :type: bool - """ - if has_time is None: - raise ValueError("Invalid value for `has_time`, must not be `None`") # noqa: E501 - - self._has_time = has_time - - @property - def created_at(self): - """Gets the created_at of this ImageDateDto. # noqa: E501 - - - :return: The created_at of this ImageDateDto. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this ImageDateDto. - - - :param created_at: The created_at of this ImageDateDto. # 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(ImageDateDto, 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, ImageDateDto): - 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_identifier/models/image_dto.py b/swagger/api/api_identifier/models/image_dto.py deleted file mode 100644 index 5df9096..0000000 --- a/swagger/api/api_identifier/models/image_dto.py +++ /dev/null @@ -1,404 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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 ImageDto(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', - 'tag': 'str', - 'dialect': 'str', - 'hash': 'str', - 'compiled': 'datetime', - 'size': 'int', - 'environment': 'list[ImageEnvItemDto]', - 'driver_class': 'str', - 'date_formats': 'list[ImageDateDto]', - 'jdbc_method': 'str', - 'default_port': 'int' - } - - attribute_map = { - 'id': 'id', - 'repository': 'repository', - 'tag': 'tag', - 'dialect': 'dialect', - 'hash': 'hash', - 'compiled': 'compiled', - 'size': 'size', - 'environment': 'environment', - 'driver_class': 'driver_class', - 'date_formats': 'date_formats', - 'jdbc_method': 'jdbc_method', - 'default_port': 'default_port' - } - - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, environment=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._repository = None - self._tag = None - self._dialect = None - self._hash = None - self._compiled = None - self._size = None - self._environment = None - self._driver_class = None - self._date_formats = None - self._jdbc_method = None - self._default_port = None - self.discriminator = None - self.id = id - self.repository = repository - self.tag = tag - self.dialect = dialect - if hash is not None: - self.hash = hash - if compiled is not None: - self.compiled = compiled - if size is not None: - self.size = size - self.environment = environment - self.driver_class = driver_class - if date_formats is not None: - self.date_formats = date_formats - self.jdbc_method = jdbc_method - self.default_port = default_port - - @property - def id(self): - """Gets the id of this ImageDto. # noqa: E501 - - - :return: The id of this ImageDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ImageDto. - - - :param id: The id of this ImageDto. # 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 repository(self): - """Gets the repository of this ImageDto. # noqa: E501 - - - :return: The repository of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageDto. - - - :param repository: The repository of this ImageDto. # noqa: E501 - :type: str - """ - if repository is None: - raise ValueError("Invalid value for `repository`, must not be `None`") # noqa: E501 - - self._repository = repository - - @property - def tag(self): - """Gets the tag of this ImageDto. # noqa: E501 - - - :return: The tag of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageDto. - - - :param tag: The tag of this ImageDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - @property - def dialect(self): - """Gets the dialect of this ImageDto. # noqa: E501 - - - :return: The dialect of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._dialect - - @dialect.setter - def dialect(self, dialect): - """Sets the dialect of this ImageDto. - - - :param dialect: The dialect of this ImageDto. # noqa: E501 - :type: str - """ - if dialect is None: - raise ValueError("Invalid value for `dialect`, must not be `None`") # noqa: E501 - - self._dialect = dialect - - @property - def hash(self): - """Gets the hash of this ImageDto. # noqa: E501 - - - :return: The hash of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this ImageDto. - - - :param hash: The hash of this ImageDto. # noqa: E501 - :type: str - """ - - self._hash = hash - - @property - def compiled(self): - """Gets the compiled of this ImageDto. # noqa: E501 - - - :return: The compiled of this ImageDto. # noqa: E501 - :rtype: datetime - """ - return self._compiled - - @compiled.setter - def compiled(self, compiled): - """Sets the compiled of this ImageDto. - - - :param compiled: The compiled of this ImageDto. # noqa: E501 - :type: datetime - """ - - self._compiled = compiled - - @property - def size(self): - """Gets the size of this ImageDto. # noqa: E501 - - - :return: The size of this ImageDto. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this ImageDto. - - - :param size: The size of this ImageDto. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def environment(self): - """Gets the environment of this ImageDto. # noqa: E501 - - - :return: The environment of this ImageDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageDto. - - - :param environment: The environment of this ImageDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - if environment is None: - raise ValueError("Invalid value for `environment`, must not be `None`") # noqa: E501 - - self._environment = environment - - @property - def driver_class(self): - """Gets the driver_class of this ImageDto. # noqa: E501 - - - :return: The driver_class of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._driver_class - - @driver_class.setter - def driver_class(self, driver_class): - """Sets the driver_class of this ImageDto. - - - :param driver_class: The driver_class of this ImageDto. # noqa: E501 - :type: str - """ - if driver_class is None: - raise ValueError("Invalid value for `driver_class`, must not be `None`") # noqa: E501 - - self._driver_class = driver_class - - @property - def date_formats(self): - """Gets the date_formats of this ImageDto. # noqa: E501 - - - :return: The date_formats of this ImageDto. # noqa: E501 - :rtype: list[ImageDateDto] - """ - return self._date_formats - - @date_formats.setter - def date_formats(self, date_formats): - """Sets the date_formats of this ImageDto. - - - :param date_formats: The date_formats of this ImageDto. # noqa: E501 - :type: list[ImageDateDto] - """ - - self._date_formats = date_formats - - @property - def jdbc_method(self): - """Gets the jdbc_method of this ImageDto. # noqa: E501 - - - :return: The jdbc_method of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._jdbc_method - - @jdbc_method.setter - def jdbc_method(self, jdbc_method): - """Sets the jdbc_method of this ImageDto. - - - :param jdbc_method: The jdbc_method of this ImageDto. # noqa: E501 - :type: str - """ - if jdbc_method is None: - raise ValueError("Invalid value for `jdbc_method`, must not be `None`") # noqa: E501 - - self._jdbc_method = jdbc_method - - @property - def default_port(self): - """Gets the default_port of this ImageDto. # noqa: E501 - - - :return: The default_port of this ImageDto. # noqa: E501 - :rtype: int - """ - return self._default_port - - @default_port.setter - def default_port(self, default_port): - """Sets the default_port of this ImageDto. - - - :param default_port: The default_port of this ImageDto. # noqa: E501 - :type: int - """ - if default_port is None: - raise ValueError("Invalid value for `default_port`, must not be `None`") # noqa: E501 - - self._default_port = default_port - - 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(ImageDto, 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, ImageDto): - 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_identifier/models/image_env_item_dto.py b/swagger/api/api_identifier/models/image_env_item_dto.py deleted file mode 100644 index d57bcd0..0000000 --- a/swagger/api/api_identifier/models/image_env_item_dto.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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 ImageEnvItemDto(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 = { - 'iid': 'int', - 'key': 'str', - 'value': 'str', - 'type': 'str' - } - - attribute_map = { - 'iid': 'iid', - 'key': 'key', - 'value': 'value', - 'type': 'type' - } - - def __init__(self, iid=None, key=None, value=None, type=None): # noqa: E501 - """ImageEnvItemDto - a model defined in Swagger""" # noqa: E501 - self._iid = None - self._key = None - self._value = None - self._type = None - self.discriminator = None - self.iid = iid - self.key = key - self.value = value - self.type = type - - @property - def iid(self): - """Gets the iid of this ImageEnvItemDto. # noqa: E501 - - - :return: The iid of this ImageEnvItemDto. # noqa: E501 - :rtype: int - """ - return self._iid - - @iid.setter - def iid(self, iid): - """Sets the iid of this ImageEnvItemDto. - - - :param iid: The iid of this ImageEnvItemDto. # noqa: E501 - :type: int - """ - if iid is None: - raise ValueError("Invalid value for `iid`, must not be `None`") # noqa: E501 - - self._iid = iid - - @property - def key(self): - """Gets the key of this ImageEnvItemDto. # noqa: E501 - - - :return: The key of this ImageEnvItemDto. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this ImageEnvItemDto. - - - :param key: The key of this ImageEnvItemDto. # noqa: E501 - :type: str - """ - if key is None: - raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 - - self._key = key - - @property - def value(self): - """Gets the value of this ImageEnvItemDto. # noqa: E501 - - - :return: The value of this ImageEnvItemDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this ImageEnvItemDto. - - - :param value: The value of this ImageEnvItemDto. # noqa: E501 - :type: str - """ - if value is None: - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - - self._value = value - - @property - def type(self): - """Gets the type of this ImageEnvItemDto. # noqa: E501 - - - :return: The type of this ImageEnvItemDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ImageEnvItemDto. - - - :param type: The type of this ImageEnvItemDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - 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 - - 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(ImageEnvItemDto, 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, ImageEnvItemDto): - 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_identifier/models/user_brief_dto.py b/swagger/api/api_identifier/models/user_brief_dto.py deleted file mode 100644 index 2c331dd..0000000 --- a/swagger/api/api_identifier/models/user_brief_dto.py +++ /dev/null @@ -1,350 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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': 'int', - 'username': 'str', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'titles_before': 'str', - 'titles_after': 'str', - 'theme_dark': 'bool', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'titles_before': 'titles_before', - 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._titles_before = None - self._titles_after = None - self._theme_dark = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - 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 titles_before is not None: - self.titles_before = titles_before - if titles_after is not None: - self.titles_after = titles_after - self.theme_dark = theme_dark - 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: int - """ - 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: int - """ - 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 firstname(self): - """Gets the firstname of this UserBriefDto. # noqa: E501 - - - :return: The firstname of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserBriefDto. - - - :param firstname: The firstname of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this UserBriefDto. # noqa: E501 - - - :return: The lastname of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserBriefDto. - - - :param lastname: The lastname of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this UserBriefDto. # noqa: E501 - - - :return: The affiliation of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this UserBriefDto. - - - :param affiliation: The affiliation of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @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 titles_before(self): - """Gets the titles_before of this UserBriefDto. # noqa: E501 - - - :return: The titles_before of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._titles_before - - @titles_before.setter - def titles_before(self, titles_before): - """Sets the titles_before of this UserBriefDto. - - - :param titles_before: The titles_before of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._titles_before = titles_before - - @property - def titles_after(self): - """Gets the titles_after of this UserBriefDto. # noqa: E501 - - - :return: The titles_after of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._titles_after - - @titles_after.setter - def titles_after(self, titles_after): - """Sets the titles_after of this UserBriefDto. - - - :param titles_after: The titles_after of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._titles_after = titles_after - - @property - def theme_dark(self): - """Gets the theme_dark of this UserBriefDto. # noqa: E501 - - - :return: The theme_dark of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._theme_dark - - @theme_dark.setter - def theme_dark(self, theme_dark): - """Sets the theme_dark of this UserBriefDto. - - - :param theme_dark: The theme_dark of this UserBriefDto. # noqa: E501 - :type: bool - """ - if theme_dark is None: - raise ValueError("Invalid value for `theme_dark`, must not be `None`") # noqa: E501 - - self._theme_dark = theme_dark - - @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 - """ - if email_verified is None: - raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 - - 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_identifier/models/user_dto.py b/swagger/api/api_identifier/models/user_dto.py deleted file mode 100644 index 882cb85..0000000 --- a/swagger/api/api_identifier/models/user_dto.py +++ /dev/null @@ -1,481 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.1.0-alpha - 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 UserDto(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', - 'authorities': 'list[GrantedAuthorityDto]', - 'username': 'str', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'containers': 'list[ContainerDto]', - 'databases': 'list[ContainerDto]', - 'identifiers': 'list[ContainerDto]', - 'email': 'str', - 'titles_before': 'str', - 'titles_after': 'str', - 'theme_dark': 'bool', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'authorities': 'authorities', - 'username': 'username', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'containers': 'containers', - 'databases': 'databases', - 'identifiers': 'identifiers', - 'email': 'email', - 'titles_before': 'titles_before', - 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, authorities=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, containers=None, databases=None, identifiers=None, email=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 - """UserDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._authorities = None - self._username = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._containers = None - self._databases = None - self._identifiers = None - self._email = None - self._titles_before = None - self._titles_after = None - self._theme_dark = None - self._email_verified = None - self.discriminator = None - self.id = id - if authorities is not None: - self.authorities = authorities - self.username = username - 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 containers is not None: - self.containers = containers - if databases is not None: - self.databases = databases - if identifiers is not None: - self.identifiers = identifiers - self.email = email - if titles_before is not None: - self.titles_before = titles_before - if titles_after is not None: - self.titles_after = titles_after - self.theme_dark = theme_dark - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserDto. # noqa: E501 - - - :return: The id of this UserDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserDto. - - - :param id: The id of this UserDto. # 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 authorities(self): - """Gets the authorities of this UserDto. # noqa: E501 - - - :return: The authorities of this UserDto. # noqa: E501 - :rtype: list[GrantedAuthorityDto] - """ - return self._authorities - - @authorities.setter - def authorities(self, authorities): - """Sets the authorities of this UserDto. - - - :param authorities: The authorities of this UserDto. # noqa: E501 - :type: list[GrantedAuthorityDto] - """ - - self._authorities = authorities - - @property - def username(self): - """Gets the username of this UserDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserDto. # 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 firstname(self): - """Gets the firstname of this UserDto. # noqa: E501 - - - :return: The firstname of this UserDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserDto. - - - :param firstname: The firstname of this UserDto. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this UserDto. # noqa: E501 - - - :return: The lastname of this UserDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserDto. - - - :param lastname: The lastname of this UserDto. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this UserDto. # noqa: E501 - - - :return: The affiliation of this UserDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this UserDto. - - - :param affiliation: The affiliation of this UserDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this UserDto. # noqa: E501 - - - :return: The orcid of this UserDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserDto. - - - :param orcid: The orcid of this UserDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def containers(self): - """Gets the containers of this UserDto. # noqa: E501 - - - :return: The containers of this UserDto. # noqa: E501 - :rtype: list[ContainerDto] - """ - return self._containers - - @containers.setter - def containers(self, containers): - """Sets the containers of this UserDto. - - - :param containers: The containers of this UserDto. # noqa: E501 - :type: list[ContainerDto] - """ - - self._containers = containers - - @property - def databases(self): - """Gets the databases of this UserDto. # noqa: E501 - - - :return: The databases of this UserDto. # noqa: E501 - :rtype: list[ContainerDto] - """ - return self._databases - - @databases.setter - def databases(self, databases): - """Sets the databases of this UserDto. - - - :param databases: The databases of this UserDto. # noqa: E501 - :type: list[ContainerDto] - """ - - self._databases = databases - - @property - def identifiers(self): - """Gets the identifiers of this UserDto. # noqa: E501 - - - :return: The identifiers of this UserDto. # noqa: E501 - :rtype: list[ContainerDto] - """ - return self._identifiers - - @identifiers.setter - def identifiers(self, identifiers): - """Sets the identifiers of this UserDto. - - - :param identifiers: The identifiers of this UserDto. # noqa: E501 - :type: list[ContainerDto] - """ - - self._identifiers = identifiers - - @property - def email(self): - """Gets the email of this UserDto. # noqa: E501 - - - :return: The email of this UserDto. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserDto. - - - :param email: The email of this UserDto. # noqa: E501 - :type: str - """ - if email is None: - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 - - self._email = email - - @property - def titles_before(self): - """Gets the titles_before of this UserDto. # noqa: E501 - - - :return: The titles_before of this UserDto. # noqa: E501 - :rtype: str - """ - return self._titles_before - - @titles_before.setter - def titles_before(self, titles_before): - """Sets the titles_before of this UserDto. - - - :param titles_before: The titles_before of this UserDto. # noqa: E501 - :type: str - """ - - self._titles_before = titles_before - - @property - def titles_after(self): - """Gets the titles_after of this UserDto. # noqa: E501 - - - :return: The titles_after of this UserDto. # noqa: E501 - :rtype: str - """ - return self._titles_after - - @titles_after.setter - def titles_after(self, titles_after): - """Sets the titles_after of this UserDto. - - - :param titles_after: The titles_after of this UserDto. # noqa: E501 - :type: str - """ - - self._titles_after = titles_after - - @property - def theme_dark(self): - """Gets the theme_dark of this UserDto. # noqa: E501 - - - :return: The theme_dark of this UserDto. # noqa: E501 - :rtype: bool - """ - return self._theme_dark - - @theme_dark.setter - def theme_dark(self, theme_dark): - """Sets the theme_dark of this UserDto. - - - :param theme_dark: The theme_dark of this UserDto. # noqa: E501 - :type: bool - """ - if theme_dark is None: - raise ValueError("Invalid value for `theme_dark`, must not be `None`") # noqa: E501 - - self._theme_dark = theme_dark - - @property - def email_verified(self): - """Gets the email_verified of this UserDto. # noqa: E501 - - - :return: The email_verified of this UserDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserDto. - - - :param email_verified: The email_verified of this UserDto. # noqa: E501 - :type: bool - """ - if email_verified is None: - raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 - - 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(UserDto, 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, UserDto): - 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 9afdd18..9d31698 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', - 'parameters_string': 'str' + 'until_date': 'datetime' } 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', - 'parameters_string': 'parametersString' + 'until_date': 'untilDate' } - 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 + 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 """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,6 +182,27 @@ 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 @@ -224,27 +245,6 @@ 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 7ef9e5c..660afb8 100644 --- a/swagger/api/api_query/__init__.py +++ b/swagger/api/api_query/__init__.py @@ -26,17 +26,18 @@ from api_query.api_client import ApiClient from api_query.configuration import Configuration # import models into sdk package 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_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.granted_authority_dto import GrantedAuthorityDto +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.image_env_item_dto import ImageEnvItemDto 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 diff --git a/swagger/api/api_query/models/__init__.py b/swagger/api/api_query/models/__init__.py index b385894..505ee47 100644 --- a/swagger/api/api_query/models/__init__.py +++ b/swagger/api/api_query/models/__init__.py @@ -15,17 +15,18 @@ from __future__ import absolute_import # import models into model package 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_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.granted_authority_dto import GrantedAuthorityDto +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.image_env_item_dto import ImageEnvItemDto 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 diff --git a/swagger/api/api_query/models/column_brief_dto.py b/swagger/api/api_query/models/column_brief_dto.py new file mode 100644 index 0000000..7ab15ea --- /dev/null +++ b/swagger/api/api_query/models/column_brief_dto.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Database Repository Query Service API + + Service that manages the queries # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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', + 'internal_name': 'str', + 'column_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'internal_name': 'internal_name', + 'column_type': 'column_type' + } + + def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._name = None + self._internal_name = None + self._column_type = None + self.discriminator = None + self.id = id + self.name = name + 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 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_query/models/container_dto.py b/swagger/api/api_query/models/container_dto.py index 5266d7f..65b921c 100644 --- a/swagger/api/api_query/models/container_dto.py +++ b/swagger/api/api_query/models/container_dto.py @@ -35,6 +35,7 @@ class ContainerDto(object): 'database': 'DatabaseDto', 'image': 'ImageBriefDto', 'port': 'int', + 'owner': 'UserBriefDto', 'created': 'datetime', 'internal_name': 'str', 'ip_address': 'str' @@ -48,12 +49,13 @@ class ContainerDto(object): 'database': 'database', 'image': 'image', 'port': 'port', + 'owner': 'owner', 'created': 'created', 'internal_name': 'internal_name', 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, owner=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -62,6 +64,7 @@ class ContainerDto(object): self._database = None self._image = None self._port = None + self._owner = None self._created = None self._internal_name = None self._ip_address = None @@ -77,6 +80,8 @@ class ContainerDto(object): self.image = image if port is not None: self.port = port + if owner is not None: + self.owner = owner self.created = created self.internal_name = internal_name if ip_address is not None: @@ -241,6 +246,27 @@ class ContainerDto(object): self._port = port + @property + def owner(self): + """Gets the owner of this ContainerDto. # noqa: E501 + + + :return: The owner of this ContainerDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this ContainerDto. + + + :param owner: The owner of this ContainerDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this ContainerDto. # noqa: E501 diff --git a/swagger/api/api_query/models/database_dto.py b/swagger/api/api_query/models/database_dto.py index 8cd6c07..19c8d67 100644 --- a/swagger/api/api_query/models/database_dto.py +++ b/swagger/api/api_query/models/database_dto.py @@ -34,9 +34,11 @@ class DatabaseDto(object): 'identifier': 'IdentifierDto', 'description': 'str', 'tables': 'list[TableBriefDto]', + 'views': 'list[ViewBriefDto]', 'image': 'ImageDto', 'container': 'ContainerDto', 'accesses': 'list[DatabaseAccessDto]', + 'owner': 'UserBriefDto', 'created': 'datetime', 'exchange_name': 'str', 'internal_name': 'str', @@ -50,16 +52,18 @@ class DatabaseDto(object): 'identifier': 'identifier', 'description': 'description', 'tables': 'tables', + 'views': 'views', 'image': 'image', 'container': 'container', 'accesses': 'accesses', + 'owner': 'owner', 'created': 'created', 'exchange_name': 'exchange_name', 'internal_name': 'internal_name', 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, image=None, container=None, accesses=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, owner=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -67,9 +71,11 @@ class DatabaseDto(object): self._identifier = None self._description = None self._tables = None + self._views = None self._image = None self._container = None self._accesses = None + self._owner = None self._created = None self._exchange_name = None self._internal_name = None @@ -84,12 +90,16 @@ class DatabaseDto(object): self.description = description if tables is not None: self.tables = tables + if views is not None: + self.views = views if image is not None: self.image = image if container is not None: self.container = container if accesses is not None: self.accesses = accesses + if owner is not None: + self.owner = owner if created is not None: self.created = created self.exchange_name = exchange_name @@ -229,6 +239,27 @@ class DatabaseDto(object): self._tables = tables + @property + def views(self): + """Gets the views of this DatabaseDto. # noqa: E501 + + + :return: The views of this DatabaseDto. # noqa: E501 + :rtype: list[ViewBriefDto] + """ + return self._views + + @views.setter + def views(self, views): + """Sets the views of this DatabaseDto. + + + :param views: The views of this DatabaseDto. # noqa: E501 + :type: list[ViewBriefDto] + """ + + self._views = views + @property def image(self): """Gets the image of this DatabaseDto. # noqa: E501 @@ -292,6 +323,27 @@ class DatabaseDto(object): self._accesses = accesses + @property + def owner(self): + """Gets the owner of this DatabaseDto. # noqa: E501 + + + :return: The owner of this DatabaseDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this DatabaseDto. + + + :param owner: The owner of this DatabaseDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this DatabaseDto. # noqa: E501 diff --git a/swagger/api/api_query/models/execute_statement_dto.py b/swagger/api/api_query/models/execute_statement_dto.py index 066ab10..1bc25fe 100644 --- a/swagger/api/api_query/models/execute_statement_dto.py +++ b/swagger/api/api_query/models/execute_statement_dto.py @@ -28,18 +28,23 @@ class ExecuteStatementDto(object): and the value is json key in definition. """ swagger_types = { - 'statement': 'str' + 'statement': 'str', + 'timestamp': 'datetime' } attribute_map = { - 'statement': 'statement' + 'statement': 'statement', + 'timestamp': 'timestamp' } - def __init__(self, statement=None): # noqa: E501 + def __init__(self, statement=None, timestamp=None): # noqa: E501 """ExecuteStatementDto - a model defined in Swagger""" # noqa: E501 self._statement = None + self._timestamp = None self.discriminator = None self.statement = statement + if timestamp is not None: + self.timestamp = timestamp @property def statement(self): @@ -64,6 +69,29 @@ class ExecuteStatementDto(object): self._statement = statement + @property + def timestamp(self): + """Gets the timestamp of this ExecuteStatementDto. # noqa: E501 + + Execute query for data at this timestamp # noqa: E501 + + :return: The timestamp of this ExecuteStatementDto. # noqa: E501 + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this ExecuteStatementDto. + + Execute query for data at this timestamp # noqa: E501 + + :param timestamp: The timestamp of this ExecuteStatementDto. # noqa: E501 + :type: datetime + """ + + self._timestamp = timestamp + 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_query/models/identifier_brief_dto.py similarity index 94% rename from swagger/api/api_database/models/identifier_brief_dto.py rename to swagger/api/api_query/models/identifier_brief_dto.py index 4d7c22c..32acb76 100644 --- a/swagger/api/api_database/models/identifier_brief_dto.py +++ b/swagger/api/api_query/models/identifier_brief_dto.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Database Repository Database Service API + Database Repository Query Service API - Service that manages the databases # noqa: E501 + Service that manages the queries # noqa: E501 OpenAPI spec version: 1.1.0-alpha Contact: andreas.rauber@tuwien.ac.at @@ -32,10 +32,10 @@ class IdentifierBriefDto(object): 'title': 'str', 'type': 'str', 'created': 'datetime', + 'last_modified': 'datetime', 'container_id': 'int', 'database_id': 'int', - 'query_id': 'int', - 'last_modified': 'datetime' + 'query_id': 'int' } attribute_map = { @@ -43,35 +43,34 @@ class IdentifierBriefDto(object): 'title': 'title', 'type': 'type', 'created': 'created', + 'last_modified': 'lastModified', 'container_id': 'container id', 'database_id': 'database id', - 'query_id': 'query id', - 'last_modified': 'last_modified' + 'query_id': 'query id' } - def __init__(self, id=None, title=None, type=None, created=None, container_id=None, database_id=None, query_id=None, last_modified=None): # noqa: E501 + 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 """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._container_id = None self._database_id = None self._query_id = None - self._last_modified = None self.discriminator = None - if id is not None: - self.id = id + 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 self.container_id = container_id self.database_id = database_id if query_id is not None: self.query_id = query_id - if last_modified is not None: - self.last_modified = last_modified @property def id(self): @@ -91,6 +90,8 @@ class IdentifierBriefDto(object): :param id: The id of this IdentifierBriefDto. # noqa: E501 :type: int """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @@ -167,6 +168,27 @@ class IdentifierBriefDto(object): 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 @@ -234,27 +256,6 @@ class IdentifierBriefDto(object): self._query_id = query_id - @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 - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_query/models/image_dto.py b/swagger/api/api_query/models/image_dto.py index f527a51..7c21d18 100644 --- a/swagger/api/api_query/models/image_dto.py +++ b/swagger/api/api_query/models/image_dto.py @@ -35,7 +35,6 @@ class ImageDto(object): 'hash': 'str', 'compiled': 'datetime', 'size': 'int', - 'environment': 'list[ImageEnvItemDto]', 'driver_class': 'str', 'date_formats': 'list[ImageDateDto]', 'jdbc_method': 'str', @@ -50,14 +49,13 @@ class ImageDto(object): 'hash': 'hash', 'compiled': 'compiled', 'size': 'size', - 'environment': 'environment', 'driver_class': 'driver_class', 'date_formats': 'date_formats', 'jdbc_method': 'jdbc_method', 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, environment=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + 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 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None self._repository = None @@ -66,7 +64,6 @@ class ImageDto(object): self._hash = None self._compiled = None self._size = None - self._environment = None self._driver_class = None self._date_formats = None self._jdbc_method = None @@ -82,7 +79,6 @@ class ImageDto(object): self.compiled = compiled if size is not None: self.size = size - self.environment = environment self.driver_class = driver_class if date_formats is not None: self.date_formats = date_formats @@ -244,29 +240,6 @@ class ImageDto(object): self._size = size - @property - def environment(self): - """Gets the environment of this ImageDto. # noqa: E501 - - - :return: The environment of this ImageDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageDto. - - - :param environment: The environment of this ImageDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - if environment is None: - raise ValueError("Invalid value for `environment`, must not be `None`") # noqa: E501 - - self._environment = environment - @property def driver_class(self): """Gets the driver_class 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 9b4a3e4..059107a 100644 --- a/swagger/api/api_query/models/query_brief_dto.py +++ b/swagger/api/api_query/models/query_brief_dto.py @@ -35,6 +35,7 @@ class QueryBriefDto(object): 'execution': 'datetime', 'query': 'str', 'type': 'str', + 'identifier': 'IdentifierBriefDto', 'created': 'datetime', 'query_normalized': 'str', 'query_hash': 'str', @@ -51,6 +52,7 @@ class QueryBriefDto(object): 'execution': 'execution', 'query': 'query', 'type': 'type', + 'identifier': 'identifier', 'created': 'created', 'query_normalized': 'query_normalized', 'query_hash': 'query_hash', @@ -59,7 +61,7 @@ class QueryBriefDto(object): 'last_modified': 'last_modified' } - def __init__(self, id=None, cid=None, dbid=None, creator=None, execution=None, query=None, type=None, created=None, query_normalized=None, query_hash=None, result_hash=None, result_number=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, cid=None, dbid=None, creator=None, execution=None, query=None, type=None, identifier=None, created=None, query_normalized=None, query_hash=None, result_hash=None, result_number=None, last_modified=None): # noqa: E501 """QueryBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._cid = None @@ -68,6 +70,7 @@ class QueryBriefDto(object): self._execution = None self._query = None self._type = None + self._identifier = None self._created = None self._query_normalized = None self._query_hash = None @@ -84,6 +87,8 @@ class QueryBriefDto(object): self.query = query if type is not None: self.type = type + if identifier is not None: + self.identifier = identifier self.created = created if query_normalized is not None: self.query_normalized = query_normalized @@ -258,6 +263,27 @@ class QueryBriefDto(object): self._type = type + @property + def identifier(self): + """Gets the identifier of this QueryBriefDto. # noqa: E501 + + + :return: The identifier of this QueryBriefDto. # noqa: E501 + :rtype: IdentifierBriefDto + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """Sets the identifier of this QueryBriefDto. + + + :param identifier: The identifier of this QueryBriefDto. # noqa: E501 + :type: IdentifierBriefDto + """ + + self._identifier = identifier + @property def created(self): """Gets the created of this QueryBriefDto. # noqa: E501 diff --git a/swagger/api/api_query/models/query_dto.py b/swagger/api/api_query/models/query_dto.py index e8cf522..1ab162d 100644 --- a/swagger/api/api_query/models/query_dto.py +++ b/swagger/api/api_query/models/query_dto.py @@ -35,6 +35,7 @@ class QueryDto(object): 'execution': 'datetime', 'query': 'str', 'type': 'str', + 'identifier': 'IdentifierDto', 'created': 'datetime', 'query_normalized': 'str', 'query_hash': 'str', @@ -52,6 +53,7 @@ class QueryDto(object): 'execution': 'execution', 'query': 'query', 'type': 'type', + 'identifier': 'identifier', 'created': 'created', 'query_normalized': 'query_normalized', 'query_hash': 'query_hash', @@ -61,7 +63,7 @@ class QueryDto(object): 'last_modified': 'last_modified' } - def __init__(self, id=None, cid=None, dbid=None, creator=None, execution=None, query=None, type=None, created=None, query_normalized=None, query_hash=None, is_persisted=None, result_hash=None, result_number=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, cid=None, dbid=None, creator=None, execution=None, query=None, type=None, identifier=None, created=None, query_normalized=None, query_hash=None, is_persisted=None, result_hash=None, result_number=None, last_modified=None): # noqa: E501 """QueryDto - a model defined in Swagger""" # noqa: E501 self._id = None self._cid = None @@ -70,6 +72,7 @@ class QueryDto(object): self._execution = None self._query = None self._type = None + self._identifier = None self._created = None self._query_normalized = None self._query_hash = None @@ -87,6 +90,8 @@ class QueryDto(object): self.query = query if type is not None: self.type = type + if identifier is not None: + self.identifier = identifier self.created = created if query_normalized is not None: self.query_normalized = query_normalized @@ -262,6 +267,27 @@ class QueryDto(object): self._type = type + @property + def identifier(self): + """Gets the identifier of this QueryDto. # noqa: E501 + + + :return: The identifier of this QueryDto. # noqa: E501 + :rtype: IdentifierDto + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """Sets the identifier of this QueryDto. + + + :param identifier: The identifier of this QueryDto. # noqa: E501 + :type: IdentifierDto + """ + + self._identifier = identifier + @property def created(self): """Gets the created of this QueryDto. # noqa: E501 diff --git a/swagger/api/api_query/models/query_result_dto.py b/swagger/api/api_query/models/query_result_dto.py index c60a6fe..a9f56c0 100644 --- a/swagger/api/api_query/models/query_result_dto.py +++ b/swagger/api/api_query/models/query_result_dto.py @@ -36,7 +36,7 @@ class QueryResultDto(object): attribute_map = { 'result': 'result', 'id': 'id', - 'result_number': 'resultNumber' + 'result_number': 'result_number' } def __init__(self, result=None, id=None, result_number=None): # noqa: E501 diff --git a/swagger/api/api_query/models/table_brief_dto.py b/swagger/api/api_query/models/table_brief_dto.py index 61abfa7..c78ec4e 100644 --- a/swagger/api/api_query/models/table_brief_dto.py +++ b/swagger/api/api_query/models/table_brief_dto.py @@ -32,6 +32,7 @@ class TableBriefDto(object): 'name': 'str', 'description': 'str', 'creator': 'UserBriefDto', + 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,21 +41,24 @@ class TableBriefDto(object): 'name': 'name', 'description': 'description', 'creator': 'creator', + 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, creator=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._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description self.creator = creator + self.columns = columns self.internal_name = internal_name @property @@ -149,6 +153,29 @@ class TableBriefDto(object): self._creator = creator + @property + def columns(self): + """Gets the columns of this TableBriefDto. # noqa: E501 + + + :return: The columns of this TableBriefDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableBriefDto. + + + :param columns: The columns of this TableBriefDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + @property def internal_name(self): """Gets the internal_name of this TableBriefDto. # noqa: E501 diff --git a/swagger/api/api_query/models/view_brief_dto.py b/swagger/api/api_query/models/view_brief_dto.py index d2bb77d..32c8730 100644 --- a/swagger/api/api_query/models/view_brief_dto.py +++ b/swagger/api/api_query/models/view_brief_dto.py @@ -31,12 +31,12 @@ class ViewBriefDto(object): 'id': 'int', 'vdbid': 'int', 'name': 'str', - 'internal_name': 'str', 'query': 'str', 'created': 'datetime', + 'creator': 'UserDto', + 'internal_name': 'str', 'is_public': 'bool', 'initial_view': 'bool', - 'created_by': 'int', 'last_modified': 'datetime' } @@ -44,39 +44,39 @@ class ViewBriefDto(object): 'id': 'id', 'vdbid': 'vdbid', 'name': 'name', - 'internal_name': 'internalName', 'query': 'query', 'created': 'created', + 'creator': 'creator', + 'internal_name': 'internal_name', 'is_public': 'is_public', 'initial_view': 'initial_view', - 'created_by': 'created_by', 'last_modified': 'last_modified' } - def __init__(self, id=None, vdbid=None, name=None, internal_name=None, query=None, created=None, is_public=None, initial_view=None, created_by=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, vdbid=None, name=None, query=None, created=None, creator=None, internal_name=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 """ViewBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._vdbid = None self._name = None - self._internal_name = None self._query = None self._created = None + self._creator = None + self._internal_name = None self._is_public = None self._initial_view = None - self._created_by = None self._last_modified = None self.discriminator = None self.id = id self.vdbid = vdbid self.name = name - self.internal_name = internal_name self.query = query self.created = created + self.creator = creator + self.internal_name = internal_name if is_public is not None: self.is_public = is_public if initial_view is not None: self.initial_view = initial_view - self.created_by = created_by if last_modified is not None: self.last_modified = last_modified @@ -149,29 +149,6 @@ class ViewBriefDto(object): self._name = name - @property - def internal_name(self): - """Gets the internal_name of this ViewBriefDto. # noqa: E501 - - - :return: The internal_name of this ViewBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ViewBriefDto. - - - :param internal_name: The internal_name of this ViewBriefDto. # 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 query(self): """Gets the query of this ViewBriefDto. # noqa: E501 @@ -218,6 +195,52 @@ class ViewBriefDto(object): self._created = created + @property + def creator(self): + """Gets the creator of this ViewBriefDto. # noqa: E501 + + + :return: The creator of this ViewBriefDto. # noqa: E501 + :rtype: UserDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ViewBriefDto. + + + :param creator: The creator of this ViewBriefDto. # noqa: E501 + :type: UserDto + """ + if creator is None: + raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + + self._creator = creator + + @property + def internal_name(self): + """Gets the internal_name of this ViewBriefDto. # noqa: E501 + + + :return: The internal_name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ViewBriefDto. + + + :param internal_name: The internal_name of this ViewBriefDto. # 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 is_public(self): """Gets the is_public of this ViewBriefDto. # noqa: E501 @@ -262,29 +285,6 @@ class ViewBriefDto(object): self._initial_view = initial_view - @property - def created_by(self): - """Gets the created_by of this ViewBriefDto. # noqa: E501 - - - :return: The created_by of this ViewBriefDto. # noqa: E501 - :rtype: int - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this ViewBriefDto. - - - :param created_by: The created_by of this ViewBriefDto. # noqa: E501 - :type: int - """ - if created_by is None: - raise ValueError("Invalid value for `created_by`, must not be `None`") # noqa: E501 - - self._created_by = created_by - @property def last_modified(self): """Gets the last_modified of this ViewBriefDto. # noqa: E501 diff --git a/swagger/api/api_query/models/view_dto.py b/swagger/api/api_query/models/view_dto.py index 9510cd4..42c1879 100644 --- a/swagger/api/api_query/models/view_dto.py +++ b/swagger/api/api_query/models/view_dto.py @@ -30,12 +30,12 @@ class ViewDto(object): swagger_types = { 'id': 'int', 'vdbid': 'int', - 'creator': 'UserDto', 'database': 'DatabaseDto', 'name': 'str', 'internal_name': 'str', 'query': 'str', 'created': 'datetime', + 'creator': 'UserDto', 'is_public': 'bool', 'initial_view': 'bool', 'last_modified': 'datetime' @@ -44,39 +44,39 @@ class ViewDto(object): attribute_map = { 'id': 'id', 'vdbid': 'vdbid', - 'creator': 'creator', 'database': 'database', 'name': 'name', 'internal_name': 'internalName', 'query': 'query', 'created': 'created', + 'creator': 'creator', 'is_public': 'is_public', 'initial_view': 'initial_view', 'last_modified': 'last_modified' } - def __init__(self, id=None, vdbid=None, creator=None, database=None, name=None, internal_name=None, query=None, created=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 + def __init__(self, id=None, vdbid=None, database=None, name=None, internal_name=None, query=None, created=None, creator=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 """ViewDto - a model defined in Swagger""" # noqa: E501 self._id = None self._vdbid = None - self._creator = None self._database = None self._name = None self._internal_name = None self._query = None self._created = None + self._creator = None self._is_public = None self._initial_view = None self._last_modified = None self.discriminator = None self.id = id self.vdbid = vdbid - self.creator = creator self.database = database self.name = name self.internal_name = internal_name self.query = query self.created = created + self.creator = creator if is_public is not None: self.is_public = is_public if initial_view is not None: @@ -130,29 +130,6 @@ class ViewDto(object): self._vdbid = vdbid - @property - def creator(self): - """Gets the creator of this ViewDto. # noqa: E501 - - - :return: The creator of this ViewDto. # noqa: E501 - :rtype: UserDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this ViewDto. - - - :param creator: The creator of this ViewDto. # noqa: E501 - :type: UserDto - """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 - - self._creator = creator - @property def database(self): """Gets the database of this ViewDto. # noqa: E501 @@ -268,6 +245,29 @@ class ViewDto(object): self._created = created + @property + def creator(self): + """Gets the creator of this ViewDto. # noqa: E501 + + + :return: The creator of this ViewDto. # noqa: E501 + :rtype: UserDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ViewDto. + + + :param creator: The creator of this ViewDto. # noqa: E501 + :type: UserDto + """ + if creator is None: + raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + + self._creator = creator + @property def is_public(self): """Gets the is_public of this ViewDto. # noqa: E501 diff --git a/swagger/api/api_semantics/__init__.py b/swagger/api/api_semantics/__init__.py index 2fd0d7f..cb85a7a 100644 --- a/swagger/api/api_semantics/__init__.py +++ b/swagger/api/api_semantics/__init__.py @@ -23,4 +23,6 @@ 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 diff --git a/swagger/api/api_semantics/api/concepts_endpoint_api.py b/swagger/api/api_semantics/api/concepts_endpoint_api.py index bcd90ee..bc516e0 100644 --- a/swagger/api/api_semantics/api/concepts_endpoint_api.py +++ b/swagger/api/api_semantics/api/concepts_endpoint_api.py @@ -220,7 +220,7 @@ class ConceptsEndpointApi(object): >>> result = thread.get() :param async_req bool - :param SemanticsConceptBody body: + :param SemanticsConceptBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -242,7 +242,7 @@ class ConceptsEndpointApi(object): >>> result = thread.get() :param async_req bool - :param SemanticsConceptBody body: + :param SemanticsConceptBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -300,3 +300,94 @@ class ConceptsEndpointApi(object): _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def api_semantics_concept_put(self, **kwargs): # noqa: E501 + """Retrieve label from URI # noqa: E501 + + This is a simple API for retrieving label from 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.api_semantics_concept_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SemanticsConceptBody body: + :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.api_semantics_concept_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.api_semantics_concept_put_with_http_info(**kwargs) # noqa: E501 + return data + + def api_semantics_concept_put_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve label from URI # noqa: E501 + + This is a simple API for retrieving label from 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.api_semantics_concept_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SemanticsConceptBody body: + :return: None + 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 api_semantics_concept_put" % key + ) + params[key] = val + del params['kwargs'] + + 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 `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/semantics/concept', 'PUT', + 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) diff --git a/swagger/api/api_semantics/api/units_endpoint_api.py b/swagger/api/api_semantics/api/units_endpoint_api.py index 6a4ad39..ac9e54b 100644 --- a/swagger/api/api_semantics/api/units_endpoint_api.py +++ b/swagger/api/api_semantics/api/units_endpoint_api.py @@ -129,7 +129,7 @@ class UnitsEndpointApi(object): >>> result = thread.get() :param async_req bool - :param SemanticsUnitBody body: + :param SemanticsUnitBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -151,7 +151,7 @@ class UnitsEndpointApi(object): >>> result = thread.get() :param async_req bool - :param SemanticsUnitBody body: + :param SemanticsUnitBody1 body: :return: None If the method is called asynchronously, returns the request thread. @@ -210,6 +210,97 @@ class UnitsEndpointApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def api_semantics_unit_put(self, **kwargs): # noqa: E501 + """Retrieve label from URI # noqa: E501 + + This is a simple API for retrieving label from 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.api_semantics_unit_put(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SemanticsUnitBody body: + :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.api_semantics_unit_put_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.api_semantics_unit_put_with_http_info(**kwargs) # noqa: E501 + return data + + def api_semantics_unit_put_with_http_info(self, **kwargs): # noqa: E501 + """Retrieve label from URI # noqa: E501 + + This is a simple API for retrieving label from 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.api_semantics_unit_put_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SemanticsUnitBody body: + :return: None + 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 api_semantics_unit_put" % key + ) + params[key] = val + del params['kwargs'] + + 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 `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/semantics/unit', 'PUT', + 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 api_semantics_unit_unit_validate_get(self, unit, **kwargs): # noqa: E501 """Validate units # noqa: E501 diff --git a/swagger/api/api_semantics/models/__init__.py b/swagger/api/api_semantics/models/__init__.py index 914eef9..b5f9f62 100644 --- a/swagger/api/api_semantics/models/__init__.py +++ b/swagger/api/api_semantics/models/__init__.py @@ -15,4 +15,6 @@ 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 diff --git a/swagger/api/api_semantics/models/semantics_concept_body.py b/swagger/api/api_semantics/models/semantics_concept_body.py index 8aa8897..80695c3 100644 --- a/swagger/api/api_semantics/models/semantics_concept_body.py +++ b/swagger/api/api_semantics/models/semantics_concept_body.py @@ -28,46 +28,19 @@ class SemanticsConceptBody(object): and the value is json key in definition. """ swagger_types = { - 'name': 'str', 'uri': 'str' } attribute_map = { - 'name': 'name', 'uri': 'uri' } - def __init__(self, name=None, uri=None): # noqa: E501 + def __init__(self, uri=None): # noqa: E501 """SemanticsConceptBody - a model defined in Swagger""" # noqa: E501 - self._name = None self._uri = None self.discriminator = None - self.name = name self.uri = uri - @property - def name(self): - """Gets the name of this SemanticsConceptBody. # noqa: E501 - - - :return: The name of this SemanticsConceptBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SemanticsConceptBody. - - - :param name: The name of this SemanticsConceptBody. # 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 uri(self): """Gets the uri of this SemanticsConceptBody. # noqa: E501 diff --git a/swagger/api/api_identifier/models/image_brief_dto.py b/swagger/api/api_semantics/models/semantics_concept_body1.py similarity index 51% rename from swagger/api/api_identifier/models/image_brief_dto.py rename to swagger/api/api_semantics/models/semantics_concept_body1.py index 01ecbd3..33b98b9 100644 --- a/swagger/api/api_identifier/models/image_brief_dto.py +++ b/swagger/api/api_semantics/models/semantics_concept_body1.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Database Repository Identifier Service API + Database Repository Unit / Ontology Service API - Service that manages the identifiers # noqa: E501 + Service for assigning concepts to database tables and columns. # noqa: E501 OpenAPI spec version: 1.1.0-alpha Contact: andreas.rauber@tuwien.ac.at @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class ImageBriefDto(object): +class SemanticsConceptBody1(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -28,95 +28,68 @@ class ImageBriefDto(object): and the value is json key in definition. """ swagger_types = { - 'id': 'int', - 'repository': 'str', - 'tag': 'str' + 'name': 'str', + 'uri': 'str' } attribute_map = { - 'id': 'id', - 'repository': 'repository', - 'tag': 'tag' + 'name': 'name', + 'uri': 'uri' } - def __init__(self, id=None, repository=None, tag=None): # noqa: E501 - """ImageBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._repository = None - self._tag = None + def __init__(self, name=None, uri=None): # noqa: E501 + """SemanticsConceptBody1 - a model defined in Swagger""" # noqa: E501 + self._name = None + self._uri = None self.discriminator = None - self.id = id - self.repository = repository - self.tag = tag + self.name = name + self.uri = uri @property - def id(self): - """Gets the id of this ImageBriefDto. # noqa: E501 + def name(self): + """Gets the name of this SemanticsConceptBody1. # noqa: E501 - :return: The id of this ImageBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ImageBriefDto. - - - :param id: The id of this ImageBriefDto. # 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 repository(self): - """Gets the repository of this ImageBriefDto. # noqa: E501 - - - :return: The repository of this ImageBriefDto. # noqa: E501 + :return: The name of this SemanticsConceptBody1. # noqa: E501 :rtype: str """ - return self._repository + return self._name - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. + @name.setter + def name(self, name): + """Sets the name of this SemanticsConceptBody1. - :param repository: The repository of this ImageBriefDto. # noqa: E501 + :param name: The name of this SemanticsConceptBody1. # noqa: E501 :type: str """ - if repository is None: - raise ValueError("Invalid value for `repository`, must not be `None`") # noqa: E501 + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - self._repository = repository + self._name = name @property - def tag(self): - """Gets the tag of this ImageBriefDto. # noqa: E501 + def uri(self): + """Gets the uri of this SemanticsConceptBody1. # noqa: E501 - :return: The tag of this ImageBriefDto. # noqa: E501 + :return: The uri of this SemanticsConceptBody1. # noqa: E501 :rtype: str """ - return self._tag + return self._uri - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. + @uri.setter + def uri(self, uri): + """Sets the uri of this SemanticsConceptBody1. - :param tag: The tag of this ImageBriefDto. # noqa: E501 + :param uri: The uri of this SemanticsConceptBody1. # noqa: E501 :type: str """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - self._tag = tag + self._uri = uri def to_dict(self): """Returns the model properties as a dict""" @@ -139,7 +112,7 @@ class ImageBriefDto(object): )) else: result[attr] = value - if issubclass(ImageBriefDto, dict): + if issubclass(SemanticsConceptBody1, dict): for key, value in self.items(): result[key] = value @@ -155,7 +128,7 @@ class ImageBriefDto(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ImageBriefDto): + if not isinstance(other, SemanticsConceptBody1): return False return self.__dict__ == other.__dict__ diff --git a/swagger/api/api_semantics/models/semantics_unit_body.py b/swagger/api/api_semantics/models/semantics_unit_body.py index 2a0352d..06b3bc1 100644 --- a/swagger/api/api_semantics/models/semantics_unit_body.py +++ b/swagger/api/api_semantics/models/semantics_unit_body.py @@ -28,46 +28,19 @@ class SemanticsUnitBody(object): and the value is json key in definition. """ swagger_types = { - 'name': 'str', 'uri': 'str' } attribute_map = { - 'name': 'name', 'uri': 'uri' } - def __init__(self, name=None, uri=None): # noqa: E501 + def __init__(self, uri=None): # noqa: E501 """SemanticsUnitBody - a model defined in Swagger""" # noqa: E501 - self._name = None self._uri = None self.discriminator = None - self.name = name self.uri = uri - @property - def name(self): - """Gets the name of this SemanticsUnitBody. # noqa: E501 - - - :return: The name of this SemanticsUnitBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SemanticsUnitBody. - - - :param name: The name of this SemanticsUnitBody. # 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 uri(self): """Gets the uri of this SemanticsUnitBody. # noqa: E501 diff --git a/swagger/api/api_semantics/models/semantics_unit_body1.py b/swagger/api/api_semantics/models/semantics_unit_body1.py new file mode 100644 index 0000000..6d374f8 --- /dev/null +++ b/swagger/api/api_semantics/models/semantics_unit_body1.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Database Repository Unit / Ontology Service API + + Service for assigning concepts to database tables and columns. # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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 SemanticsUnitBody1(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 = { + 'name': 'str', + 'uri': 'str' + } + + attribute_map = { + 'name': 'name', + 'uri': 'uri' + } + + def __init__(self, name=None, uri=None): # noqa: E501 + """SemanticsUnitBody1 - a model defined in Swagger""" # noqa: E501 + self._name = None + self._uri = None + self.discriminator = None + self.name = name + self.uri = uri + + @property + def name(self): + """Gets the name of this SemanticsUnitBody1. # noqa: E501 + + + :return: The name of this SemanticsUnitBody1. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this SemanticsUnitBody1. + + + :param name: The name of this SemanticsUnitBody1. # 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 uri(self): + """Gets the uri of this SemanticsUnitBody1. # noqa: E501 + + + :return: The uri of this SemanticsUnitBody1. # noqa: E501 + :rtype: str + """ + return self._uri + + @uri.setter + def uri(self, uri): + """Sets the uri of this SemanticsUnitBody1. + + + :param uri: The uri of this SemanticsUnitBody1. # noqa: E501 + :type: str + """ + if uri is None: + raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 + + 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(SemanticsUnitBody1, 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, SemanticsUnitBody1): + 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_table/__init__.py b/swagger/api/api_table/__init__.py index de199b5..2524c1b 100644 --- a/swagger/api/api_table/__init__.py +++ b/swagger/api/api_table/__init__.py @@ -23,6 +23,7 @@ from api_table.api_client import ApiClient from api_table.configuration import Configuration # import models into sdk package from api_table.models.api_error_dto import ApiErrorDto +from api_table.models.column_brief_dto import ColumnBriefDto from api_table.models.column_create_dto import ColumnCreateDto from api_table.models.column_dto import ColumnDto from api_table.models.column_semantics_update_dto import ColumnSemanticsUpdateDto @@ -36,7 +37,6 @@ from api_table.models.identifier_dto import IdentifierDto from api_table.models.image_brief_dto import ImageBriefDto from api_table.models.image_date_dto import ImageDateDto from api_table.models.image_dto import ImageDto -from api_table.models.image_env_item_dto import ImageEnvItemDto from api_table.models.license_dto import LicenseDto from api_table.models.related_identifier_dto import RelatedIdentifierDto from api_table.models.table_brief_dto import TableBriefDto @@ -45,3 +45,4 @@ from api_table.models.table_dto import TableDto from api_table.models.unit_dto import UnitDto from api_table.models.user_brief_dto import UserBriefDto from api_table.models.user_dto import UserDto +from api_table.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_table/models/__init__.py b/swagger/api/api_table/models/__init__.py index 73aa50c..34e4c95 100644 --- a/swagger/api/api_table/models/__init__.py +++ b/swagger/api/api_table/models/__init__.py @@ -15,6 +15,7 @@ from __future__ import absolute_import # import models into model package from api_table.models.api_error_dto import ApiErrorDto +from api_table.models.column_brief_dto import ColumnBriefDto from api_table.models.column_create_dto import ColumnCreateDto from api_table.models.column_dto import ColumnDto from api_table.models.column_semantics_update_dto import ColumnSemanticsUpdateDto @@ -28,7 +29,6 @@ from api_table.models.identifier_dto import IdentifierDto from api_table.models.image_brief_dto import ImageBriefDto from api_table.models.image_date_dto import ImageDateDto from api_table.models.image_dto import ImageDto -from api_table.models.image_env_item_dto import ImageEnvItemDto from api_table.models.license_dto import LicenseDto from api_table.models.related_identifier_dto import RelatedIdentifierDto from api_table.models.table_brief_dto import TableBriefDto @@ -37,3 +37,4 @@ from api_table.models.table_dto import TableDto from api_table.models.unit_dto import UnitDto from api_table.models.user_brief_dto import UserBriefDto from api_table.models.user_dto import UserDto +from api_table.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_identifier/models/table_brief_dto.py b/swagger/api/api_table/models/column_brief_dto.py similarity index 59% rename from swagger/api/api_identifier/models/table_brief_dto.py rename to swagger/api/api_table/models/column_brief_dto.py index c3dec21..558a147 100644 --- a/swagger/api/api_identifier/models/table_brief_dto.py +++ b/swagger/api/api_table/models/column_brief_dto.py @@ -1,9 +1,9 @@ # coding: utf-8 """ - Database Repository Identifier Service API + Database Repository Table Service API - Service that manages the identifiers # noqa: E501 + Service that manages the tables # noqa: E501 OpenAPI spec version: 1.1.0-alpha Contact: andreas.rauber@tuwien.ac.at @@ -15,7 +15,7 @@ import re # noqa: F401 import six -class TableBriefDto(object): +class ColumnBriefDto(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -30,45 +30,45 @@ class TableBriefDto(object): swagger_types = { 'id': 'int', 'name': 'str', - 'creator': 'UserBriefDto', - 'internal_name': 'str' + 'internal_name': 'str', + 'column_type': 'str' } attribute_map = { 'id': 'id', 'name': 'name', - 'creator': 'creator', - 'internal_name': 'internal_name' + 'internal_name': 'internal_name', + 'column_type': 'column_type' } - def __init__(self, id=None, name=None, creator=None, internal_name=None): # noqa: E501 - """TableBriefDto - a model defined in Swagger""" # noqa: E501 + def __init__(self, id=None, name=None, internal_name=None, column_type=None): # noqa: E501 + """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None - self._creator = None self._internal_name = None + self._column_type = None self.discriminator = None self.id = id self.name = name - self.creator = creator self.internal_name = internal_name + self.column_type = column_type @property def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 + """Gets the id of this ColumnBriefDto. # noqa: E501 - :return: The id of this TableBriefDto. # 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 TableBriefDto. + """Sets the id of this ColumnBriefDto. - :param id: The id of this TableBriefDto. # noqa: E501 + :param id: The id of this ColumnBriefDto. # noqa: E501 :type: int """ if id is None: @@ -78,20 +78,20 @@ class TableBriefDto(object): @property def name(self): - """Gets the name of this TableBriefDto. # noqa: E501 + """Gets the name of this ColumnBriefDto. # noqa: E501 - :return: The name of this TableBriefDto. # 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 TableBriefDto. + """Sets the name of this ColumnBriefDto. - :param name: The name of this TableBriefDto. # noqa: E501 + :param name: The name of this ColumnBriefDto. # noqa: E501 :type: str """ if name is None: @@ -100,50 +100,56 @@ class TableBriefDto(object): self._name = name @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 + def internal_name(self): + """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - :return: The creator of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto + :return: The internal_name of this ColumnBriefDto. # noqa: E501 + :rtype: str """ - return self._creator + return self._internal_name - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ColumnBriefDto. - :param creator: The creator of this TableBriefDto. # noqa: E501 - :type: UserBriefDto + :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 + :type: str """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if internal_name is None: + raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - self._creator = creator + self._internal_name = internal_name @property - def internal_name(self): - """Gets the internal_name of this TableBriefDto. # noqa: E501 + def column_type(self): + """Gets the column_type of this ColumnBriefDto. # noqa: E501 - :return: The internal_name of this TableBriefDto. # noqa: E501 + :return: The column_type of this ColumnBriefDto. # noqa: E501 :rtype: str """ - return self._internal_name + return self._column_type - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. + @column_type.setter + def column_type(self, column_type): + """Sets the column_type of this ColumnBriefDto. - :param internal_name: The internal_name of this TableBriefDto. # noqa: E501 + :param column_type: The column_type 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 + 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._internal_name = internal_name + self._column_type = column_type def to_dict(self): """Returns the model properties as a dict""" @@ -166,7 +172,7 @@ class TableBriefDto(object): )) else: result[attr] = value - if issubclass(TableBriefDto, dict): + if issubclass(ColumnBriefDto, dict): for key, value in self.items(): result[key] = value @@ -182,7 +188,7 @@ class TableBriefDto(object): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, TableBriefDto): + if not isinstance(other, ColumnBriefDto): return False return self.__dict__ == other.__dict__ diff --git a/swagger/api/api_table/models/column_dto.py b/swagger/api/api_table/models/column_dto.py index 588a3b0..6841893 100644 --- a/swagger/api/api_table/models/column_dto.py +++ b/swagger/api/api_table/models/column_dto.py @@ -39,6 +39,7 @@ class ColumnDto(object): 'auto_generated': 'bool', 'is_primary_key': 'bool', 'column_type': 'str', + 'is_public': 'bool', 'is_null_allowed': 'bool', 'check_expression': 'str', 'foreign_key': 'str', @@ -57,13 +58,14 @@ class ColumnDto(object): 'auto_generated': 'auto_generated', 'is_primary_key': 'is_primary_key', 'column_type': 'column_type', + 'is_public': 'is_public', 'is_null_allowed': 'is_null_allowed', 'check_expression': 'check_expression', 'foreign_key': 'foreign_key', 'enum_values': 'enum_values' } - def __init__(self, id=None, name=None, concept=None, unit=None, unique=None, references=None, internal_name=None, date_format=None, auto_generated=None, is_primary_key=None, column_type=None, is_null_allowed=None, check_expression=None, foreign_key=None, enum_values=None): # noqa: E501 + def __init__(self, id=None, name=None, concept=None, unit=None, unique=None, references=None, internal_name=None, date_format=None, auto_generated=None, is_primary_key=None, column_type=None, is_public=None, is_null_allowed=None, check_expression=None, foreign_key=None, enum_values=None): # noqa: E501 """ColumnDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -76,6 +78,7 @@ class ColumnDto(object): self._auto_generated = None self._is_primary_key = None self._column_type = None + self._is_public = None self._is_null_allowed = None self._check_expression = None self._foreign_key = None @@ -96,6 +99,7 @@ class ColumnDto(object): self.auto_generated = auto_generated self.is_primary_key = is_primary_key self.column_type = column_type + self.is_public = is_public self.is_null_allowed = is_null_allowed if check_expression is not None: self.check_expression = check_expression @@ -355,6 +359,29 @@ class ColumnDto(object): self._column_type = column_type + @property + def is_public(self): + """Gets the is_public of this ColumnDto. # noqa: E501 + + + :return: The is_public of this ColumnDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this ColumnDto. + + + :param is_public: The is_public of this ColumnDto. # noqa: E501 + :type: bool + """ + if is_public is None: + raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501 + + self._is_public = is_public + @property def is_null_allowed(self): """Gets the is_null_allowed of this ColumnDto. # noqa: E501 diff --git a/swagger/api/api_table/models/container_dto.py b/swagger/api/api_table/models/container_dto.py index c27399c..83df476 100644 --- a/swagger/api/api_table/models/container_dto.py +++ b/swagger/api/api_table/models/container_dto.py @@ -35,6 +35,7 @@ class ContainerDto(object): 'database': 'DatabaseDto', 'image': 'ImageBriefDto', 'port': 'int', + 'owner': 'UserBriefDto', 'created': 'datetime', 'internal_name': 'str', 'ip_address': 'str' @@ -48,12 +49,13 @@ class ContainerDto(object): 'database': 'database', 'image': 'image', 'port': 'port', + 'owner': 'owner', 'created': 'created', 'internal_name': 'internal_name', 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, database=None, image=None, port=None, owner=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -62,6 +64,7 @@ class ContainerDto(object): self._database = None self._image = None self._port = None + self._owner = None self._created = None self._internal_name = None self._ip_address = None @@ -77,6 +80,8 @@ class ContainerDto(object): self.image = image if port is not None: self.port = port + if owner is not None: + self.owner = owner self.created = created self.internal_name = internal_name if ip_address is not None: @@ -241,6 +246,27 @@ class ContainerDto(object): self._port = port + @property + def owner(self): + """Gets the owner of this ContainerDto. # noqa: E501 + + + :return: The owner of this ContainerDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this ContainerDto. + + + :param owner: The owner of this ContainerDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this ContainerDto. # noqa: E501 diff --git a/swagger/api/api_table/models/database_dto.py b/swagger/api/api_table/models/database_dto.py index a88de9a..c9a14f2 100644 --- a/swagger/api/api_table/models/database_dto.py +++ b/swagger/api/api_table/models/database_dto.py @@ -34,9 +34,11 @@ class DatabaseDto(object): 'identifier': 'IdentifierDto', 'description': 'str', 'tables': 'list[TableBriefDto]', + 'views': 'list[ViewBriefDto]', 'image': 'ImageDto', 'container': 'ContainerDto', 'accesses': 'list[DatabaseAccessDto]', + 'owner': 'UserBriefDto', 'created': 'datetime', 'exchange_name': 'str', 'internal_name': 'str', @@ -50,16 +52,18 @@ class DatabaseDto(object): 'identifier': 'identifier', 'description': 'description', 'tables': 'tables', + 'views': 'views', 'image': 'image', 'container': 'container', 'accesses': 'accesses', + 'owner': 'owner', 'created': 'created', 'exchange_name': 'exchange_name', 'internal_name': 'internal_name', 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, image=None, container=None, accesses=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, owner=None, created=None, exchange_name=None, internal_name=None, is_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None @@ -67,9 +71,11 @@ class DatabaseDto(object): self._identifier = None self._description = None self._tables = None + self._views = None self._image = None self._container = None self._accesses = None + self._owner = None self._created = None self._exchange_name = None self._internal_name = None @@ -84,12 +90,16 @@ class DatabaseDto(object): self.description = description if tables is not None: self.tables = tables + if views is not None: + self.views = views if image is not None: self.image = image if container is not None: self.container = container if accesses is not None: self.accesses = accesses + if owner is not None: + self.owner = owner if created is not None: self.created = created self.exchange_name = exchange_name @@ -229,6 +239,27 @@ class DatabaseDto(object): self._tables = tables + @property + def views(self): + """Gets the views of this DatabaseDto. # noqa: E501 + + + :return: The views of this DatabaseDto. # noqa: E501 + :rtype: list[ViewBriefDto] + """ + return self._views + + @views.setter + def views(self, views): + """Sets the views of this DatabaseDto. + + + :param views: The views of this DatabaseDto. # noqa: E501 + :type: list[ViewBriefDto] + """ + + self._views = views + @property def image(self): """Gets the image of this DatabaseDto. # noqa: E501 @@ -292,6 +323,27 @@ class DatabaseDto(object): self._accesses = accesses + @property + def owner(self): + """Gets the owner of this DatabaseDto. # noqa: E501 + + + :return: The owner of this DatabaseDto. # noqa: E501 + :rtype: UserBriefDto + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this DatabaseDto. + + + :param owner: The owner of this DatabaseDto. # noqa: E501 + :type: UserBriefDto + """ + + self._owner = owner + @property def created(self): """Gets the created of this DatabaseDto. # noqa: E501 diff --git a/swagger/api/api_table/models/image_dto.py b/swagger/api/api_table/models/image_dto.py index f8f1b0c..be59e17 100644 --- a/swagger/api/api_table/models/image_dto.py +++ b/swagger/api/api_table/models/image_dto.py @@ -35,7 +35,6 @@ class ImageDto(object): 'hash': 'str', 'compiled': 'datetime', 'size': 'int', - 'environment': 'list[ImageEnvItemDto]', 'driver_class': 'str', 'date_formats': 'list[ImageDateDto]', 'jdbc_method': 'str', @@ -50,14 +49,13 @@ class ImageDto(object): 'hash': 'hash', 'compiled': 'compiled', 'size': 'size', - 'environment': 'environment', 'driver_class': 'driver_class', 'date_formats': 'date_formats', 'jdbc_method': 'jdbc_method', 'default_port': 'default_port' } - def __init__(self, id=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, environment=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 + 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 """ImageDto - a model defined in Swagger""" # noqa: E501 self._id = None self._repository = None @@ -66,7 +64,6 @@ class ImageDto(object): self._hash = None self._compiled = None self._size = None - self._environment = None self._driver_class = None self._date_formats = None self._jdbc_method = None @@ -82,7 +79,6 @@ class ImageDto(object): self.compiled = compiled if size is not None: self.size = size - self.environment = environment self.driver_class = driver_class if date_formats is not None: self.date_formats = date_formats @@ -244,29 +240,6 @@ class ImageDto(object): self._size = size - @property - def environment(self): - """Gets the environment of this ImageDto. # noqa: E501 - - - :return: The environment of this ImageDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageDto. - - - :param environment: The environment of this ImageDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - if environment is None: - raise ValueError("Invalid value for `environment`, must not be `None`") # noqa: E501 - - self._environment = environment - @property def driver_class(self): """Gets the driver_class of this ImageDto. # noqa: E501 diff --git a/swagger/api/api_table/models/table_brief_dto.py b/swagger/api/api_table/models/table_brief_dto.py index 41b26e7..a75f2b4 100644 --- a/swagger/api/api_table/models/table_brief_dto.py +++ b/swagger/api/api_table/models/table_brief_dto.py @@ -32,6 +32,7 @@ class TableBriefDto(object): 'name': 'str', 'description': 'str', 'creator': 'UserBriefDto', + 'columns': 'list[ColumnBriefDto]', 'internal_name': 'str' } @@ -40,21 +41,24 @@ class TableBriefDto(object): 'name': 'name', 'description': 'description', 'creator': 'creator', + 'columns': 'columns', 'internal_name': 'internal_name' } - def __init__(self, id=None, name=None, description=None, creator=None, internal_name=None): # noqa: E501 + def __init__(self, id=None, name=None, description=None, creator=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._columns = None self._internal_name = None self.discriminator = None self.id = id self.name = name self.description = description self.creator = creator + self.columns = columns self.internal_name = internal_name @property @@ -149,6 +153,29 @@ class TableBriefDto(object): self._creator = creator + @property + def columns(self): + """Gets the columns of this TableBriefDto. # noqa: E501 + + + :return: The columns of this TableBriefDto. # noqa: E501 + :rtype: list[ColumnBriefDto] + """ + return self._columns + + @columns.setter + def columns(self, columns): + """Sets the columns of this TableBriefDto. + + + :param columns: The columns of this TableBriefDto. # noqa: E501 + :type: list[ColumnBriefDto] + """ + if columns is None: + raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 + + self._columns = columns + @property def internal_name(self): """Gets the internal_name of this TableBriefDto. # noqa: E501 diff --git a/swagger/api/api_table/models/table_dto.py b/swagger/api/api_table/models/table_dto.py index 5f33cb5..3043212 100644 --- a/swagger/api/api_table/models/table_dto.py +++ b/swagger/api/api_table/models/table_dto.py @@ -36,7 +36,8 @@ class TableDto(object): 'columns': 'list[ColumnDto]', 'internal_name': 'str', 'queue_name': 'str', - 'routing_key': 'str' + 'routing_key': 'str', + 'is_public': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class TableDto(object): 'columns': 'columns', 'internal_name': 'internal_name', 'queue_name': 'queue_name', - 'routing_key': 'routing_key' + 'routing_key': 'routing_key', + 'is_public': 'is_public' } - def __init__(self, id=None, name=None, creator=None, description=None, created=None, columns=None, internal_name=None, queue_name=None, routing_key=None): # noqa: E501 + def __init__(self, id=None, name=None, creator=None, description=None, created=None, columns=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 @@ -62,6 +64,7 @@ class TableDto(object): self._internal_name = None self._queue_name = None self._routing_key = None + self._is_public = None self.discriminator = None self.id = id self.name = name @@ -73,6 +76,7 @@ class TableDto(object): self.internal_name = internal_name self.queue_name = queue_name self.routing_key = routing_key + self.is_public = is_public @property def id(self): @@ -279,6 +283,29 @@ class TableDto(object): self._routing_key = routing_key + @property + def is_public(self): + """Gets the is_public of this TableDto. # noqa: E501 + + + :return: The is_public of this TableDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this TableDto. + + + :param is_public: The is_public of this TableDto. # noqa: E501 + :type: bool + """ + if is_public is None: + raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501 + + self._is_public = is_public + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api/api_table/models/view_brief_dto.py b/swagger/api/api_table/models/view_brief_dto.py new file mode 100644 index 0000000..8b78e85 --- /dev/null +++ b/swagger/api/api_table/models/view_brief_dto.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + Database Repository Table Service API + + Service that manages the tables # noqa: E501 + + OpenAPI spec version: 1.1.0-alpha + 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 ViewBriefDto(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', + 'vdbid': 'int', + 'name': 'str', + 'query': 'str', + 'created': 'datetime', + 'creator': 'UserDto', + 'internal_name': 'str', + 'is_public': 'bool', + 'initial_view': 'bool', + 'last_modified': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'vdbid': 'vdbid', + 'name': 'name', + 'query': 'query', + 'created': 'created', + 'creator': 'creator', + 'internal_name': 'internal_name', + 'is_public': 'is_public', + 'initial_view': 'initial_view', + 'last_modified': 'last_modified' + } + + def __init__(self, id=None, vdbid=None, name=None, query=None, created=None, creator=None, internal_name=None, is_public=None, initial_view=None, last_modified=None): # noqa: E501 + """ViewBriefDto - a model defined in Swagger""" # noqa: E501 + self._id = None + self._vdbid = None + self._name = None + self._query = None + self._created = None + self._creator = None + self._internal_name = None + self._is_public = None + self._initial_view = None + self._last_modified = None + self.discriminator = None + self.id = id + self.vdbid = vdbid + self.name = name + self.query = query + self.created = created + self.creator = creator + self.internal_name = internal_name + if is_public is not None: + self.is_public = is_public + if initial_view is not None: + self.initial_view = initial_view + if last_modified is not None: + self.last_modified = last_modified + + @property + def id(self): + """Gets the id of this ViewBriefDto. # noqa: E501 + + + :return: The id of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ViewBriefDto. + + + :param id: The id of this ViewBriefDto. # 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 vdbid(self): + """Gets the vdbid of this ViewBriefDto. # noqa: E501 + + + :return: The vdbid of this ViewBriefDto. # noqa: E501 + :rtype: int + """ + return self._vdbid + + @vdbid.setter + def vdbid(self, vdbid): + """Sets the vdbid of this ViewBriefDto. + + + :param vdbid: The vdbid of this ViewBriefDto. # noqa: E501 + :type: int + """ + if vdbid is None: + raise ValueError("Invalid value for `vdbid`, must not be `None`") # noqa: E501 + + self._vdbid = vdbid + + @property + def name(self): + """Gets the name of this ViewBriefDto. # noqa: E501 + + + :return: The name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ViewBriefDto. + + + :param name: The name of this ViewBriefDto. # 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 query(self): + """Gets the query of this ViewBriefDto. # noqa: E501 + + + :return: The query of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._query + + @query.setter + def query(self, query): + """Sets the query of this ViewBriefDto. + + + :param query: The query of this ViewBriefDto. # noqa: E501 + :type: str + """ + if query is None: + raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 + + self._query = query + + @property + def created(self): + """Gets the created of this ViewBriefDto. # noqa: E501 + + + :return: The created of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this ViewBriefDto. + + + :param created: The created of this ViewBriefDto. # 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 creator(self): + """Gets the creator of this ViewBriefDto. # noqa: E501 + + + :return: The creator of this ViewBriefDto. # noqa: E501 + :rtype: UserDto + """ + return self._creator + + @creator.setter + def creator(self, creator): + """Sets the creator of this ViewBriefDto. + + + :param creator: The creator of this ViewBriefDto. # noqa: E501 + :type: UserDto + """ + if creator is None: + raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + + self._creator = creator + + @property + def internal_name(self): + """Gets the internal_name of this ViewBriefDto. # noqa: E501 + + + :return: The internal_name of this ViewBriefDto. # noqa: E501 + :rtype: str + """ + return self._internal_name + + @internal_name.setter + def internal_name(self, internal_name): + """Sets the internal_name of this ViewBriefDto. + + + :param internal_name: The internal_name of this ViewBriefDto. # 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 is_public(self): + """Gets the is_public of this ViewBriefDto. # noqa: E501 + + + :return: The is_public of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this ViewBriefDto. + + + :param is_public: The is_public of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._is_public = is_public + + @property + def initial_view(self): + """Gets the initial_view of this ViewBriefDto. # noqa: E501 + + True if it is the default view for the database # noqa: E501 + + :return: The initial_view of this ViewBriefDto. # noqa: E501 + :rtype: bool + """ + return self._initial_view + + @initial_view.setter + def initial_view(self, initial_view): + """Sets the initial_view of this ViewBriefDto. + + True if it is the default view for the database # noqa: E501 + + :param initial_view: The initial_view of this ViewBriefDto. # noqa: E501 + :type: bool + """ + + self._initial_view = initial_view + + @property + def last_modified(self): + """Gets the last_modified of this ViewBriefDto. # noqa: E501 + + + :return: The last_modified of this ViewBriefDto. # noqa: E501 + :rtype: datetime + """ + return self._last_modified + + @last_modified.setter + def last_modified(self, last_modified): + """Sets the last_modified of this ViewBriefDto. + + + :param last_modified: The last_modified of this ViewBriefDto. # 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(ViewBriefDto, 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, ViewBriefDto): + 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/authentication/api.yaml b/swagger/authentication/api.yaml index a702656..c3c5567 100644 --- a/swagger/authentication/api.yaml +++ b/swagger/authentication/api.yaml @@ -23,8 +23,8 @@ paths: summary: List users operationId: list responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -35,8 +35,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -65,14 +65,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -94,7 +100,7 @@ paths: put: tags: - user-endpoint - summary: Forgot user information + summary: Request a new user password operationId: forgot requestBody: content: @@ -103,8 +109,8 @@ paths: $ref: '#/components/schemas/UserForgotDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -115,8 +121,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -145,14 +151,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -181,8 +193,8 @@ paths: $ref: '#/components/schemas/SignupRequestDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -193,8 +205,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -223,14 +235,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -261,8 +279,8 @@ paths: type: integer format: int64 responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -273,8 +291,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -303,14 +321,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -348,8 +372,8 @@ paths: $ref: '#/components/schemas/UserUpdateDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -360,8 +384,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -390,14 +414,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -436,8 +466,8 @@ paths: $ref: '#/components/schemas/UserThemeSetDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -448,8 +478,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -478,14 +508,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -520,8 +556,8 @@ paths: $ref: '#/components/schemas/UserRolesDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -532,8 +568,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -562,14 +598,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -608,8 +650,8 @@ paths: $ref: '#/components/schemas/UserPasswordDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -620,8 +662,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -650,14 +692,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -696,8 +744,8 @@ paths: $ref: '#/components/schemas/UserEmailDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -708,8 +756,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -738,14 +786,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -768,7 +822,7 @@ paths: put: tags: - user-endpoint - summary: Reset user information + summary: Reset user password operationId: reset requestBody: content: @@ -777,8 +831,8 @@ paths: $ref: '#/components/schemas/UserResetDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -789,8 +843,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -819,14 +873,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -852,8 +912,8 @@ paths: schema: type: string responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -864,8 +924,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -894,14 +954,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -932,8 +998,8 @@ paths: $ref: '#/components/schemas/LoginRequestDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -944,8 +1010,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -974,14 +1040,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1005,8 +1077,8 @@ paths: summary: Lists developer tokens for user operationId: listAll responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1017,8 +1089,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1047,14 +1119,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1081,8 +1159,8 @@ paths: summary: Create developer token operationId: create responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1093,8 +1171,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1123,14 +1201,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1162,8 +1246,8 @@ paths: $ref: '#/components/schemas/UserForgotDto' required: true responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1174,8 +1258,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1204,14 +1288,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1235,8 +1325,8 @@ paths: summary: Renew authentication token operationId: reAuthenticateUser responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1247,8 +1337,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1277,14 +1367,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1316,8 +1412,8 @@ paths: schema: type: string responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1328,8 +1424,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1358,14 +1454,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1392,8 +1494,8 @@ paths: type: integer format: int64 responses: - "417": - description: Expectation Failed + "401": + description: Unauthorized content: '*/*': schema: @@ -1404,8 +1506,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "401": - description: Unauthorized + "417": + description: Expectation Failed content: '*/*': schema: @@ -1434,14 +1536,20 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request + "406": + description: Not Acceptable content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "406": - description: Not Acceptable + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request content: '*/*': schema: @@ -1454,6 +1562,10 @@ paths: $ref: '#/components/schemas/ApiErrorDto' "200": description: OK + content: + '*/*': + schema: + type: object security: - bearerAuth: [] components: @@ -1552,6 +1664,36 @@ components: email: type: string example: jcarberry@brown.edu + 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 ContainerDto: required: - created @@ -1587,6 +1729,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -1667,6 +1811,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -1675,12 +1823,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -2032,7 +2182,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -2061,10 +2210,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -2079,31 +2224,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -2197,6 +2317,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -2215,6 +2336,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -2327,6 +2452,47 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time UserUpdateDto: type: object properties: diff --git a/swagger/container/api.yaml b/swagger/container/api.yaml index b39513d..e2f8cd0 100644 --- a/swagger/container/api.yaml +++ b/swagger/container/api.yaml @@ -30,12 +30,6 @@ paths: type: integer format: int64 responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -48,14 +42,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -85,12 +91,6 @@ paths: $ref: '#/components/schemas/ImageChangeDto' required: true responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -103,14 +103,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -129,19 +141,13 @@ paths: summary: Delete some image operationId: delete parameters: - - name: id + - name: imageId in: path required: true schema: type: integer format: int64 responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -154,14 +160,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Unable to delete image content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -188,12 +206,6 @@ paths: type: integer format: int64 responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -206,14 +218,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -243,12 +267,6 @@ paths: $ref: '#/components/schemas/ContainerChangeDto' required: true responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -261,14 +279,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -294,12 +324,6 @@ paths: type: integer format: int64 responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -312,14 +336,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -339,12 +375,6 @@ paths: summary: Find all images operationId: findAll responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -357,14 +387,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -389,12 +431,6 @@ paths: $ref: '#/components/schemas/ImageCreateDto' required: true responses: - "404": - description: Image not found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -407,14 +443,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -434,12 +482,6 @@ paths: summary: Find all containers operationId: findAll_1 responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -452,14 +494,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -484,12 +538,6 @@ paths: $ref: '#/components/schemas/ContainerCreateRequestDto' required: true responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' "406": description: Not Acceptable content: @@ -502,14 +550,26 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "403": description: Forbidden content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "405": + description: Method Not Allowed content: '*/*': schema: @@ -640,7 +700,6 @@ components: - iid - key - type - - value type: object properties: iid: @@ -649,9 +708,6 @@ components: key: type: string example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb type: type: string example: PRIVILEGED_PASSWORD @@ -692,7 +748,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -721,10 +776,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -876,6 +927,36 @@ components: tag: type: string example: "10.5" + 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 ContainerDto: required: - created @@ -911,6 +992,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -991,6 +1074,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -999,12 +1086,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -1401,6 +1490,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -1419,6 +1509,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -1489,6 +1583,47 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time securitySchemes: bearerAuth: type: http diff --git a/swagger/database/api.yaml b/swagger/database/api.yaml index dddf38b..7e9a0c3 100644 --- a/swagger/database/api.yaml +++ b/swagger/database/api.yaml @@ -16,6 +16,88 @@ servers: - url: http://localhost:9092 description: Generated server url paths: + /api/container/{id}/database/{databaseId}/visibility: + put: + tags: + - database-endpoint + summary: Update database + operationId: visibility + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseModifyVisibilityDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DatabaseDto' + security: + - bearerAuth: [] /api/container/{id}/database/{databaseId}/transfer: put: tags: @@ -189,7 +271,7 @@ paths: tags: - access-endpoint summary: Revoke access to some database - operationId: update_1 + operationId: revoke parameters: - name: id in: path @@ -875,7 +957,7 @@ components: code: type: string example: error.container.notfound - DatabaseTransferDto: + DatabaseModifyVisibilityDto: required: - is_public type: object @@ -883,6 +965,36 @@ components: is_public: type: boolean example: true + 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 ContainerDto: required: - created @@ -918,6 +1030,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -998,6 +1112,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -1006,12 +1124,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -1363,7 +1483,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -1392,10 +1511,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -1410,31 +1525,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -1528,6 +1618,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -1546,6 +1637,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -1658,6 +1753,54 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time + DatabaseTransferDto: + required: + - username + type: object + properties: + username: + type: string DatabaseModifyAccessDto: required: - type diff --git a/swagger/generate.sh b/swagger/generate.sh index 2a0f1f7..5910802 100755 --- a/swagger/generate.sh +++ b/swagger/generate.sh @@ -60,3 +60,15 @@ for key in "${!services[@]}"; do replace "$key" "${services[$key]}" move "${services[$key]}" done + +echo "" +echo "==============================" +echo " SUMMARY:" +echo "==============================" +echo "" +if [[ ! -z "${UPDATE}" ]]; then + echo "- Retrieved ${#services[@]} updated Swagger endpoint defintions" +fi +echo "- Removed ${#services[@]} old Python APIs" +echo "- Generated ${#services[@]} new Python APIs" +echo "- Generated ${#services[@]} static Swagger Docs" diff --git a/swagger/identifier/api.yaml b/swagger/identifier/api.yaml index 8aedd6b..3836852 100644 --- a/swagger/identifier/api.yaml +++ b/swagger/identifier/api.yaml @@ -156,6 +156,14 @@ paths: schema: type: integer format: int64 + - name: type + in: query + required: false + schema: + type: string + enum: + - database + - subset responses: "404": description: Not Found diff --git a/swagger/metadata/api.yaml b/swagger/metadata/api.yaml index 464eeaa..cfae26f 100644 --- a/swagger/metadata/api.yaml +++ b/swagger/metadata/api.yaml @@ -149,11 +149,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 78da736..42dfa4d 100644 --- a/swagger/query/api.yaml +++ b/swagger/query/api.yaml @@ -377,6 +377,7 @@ paths: $ref: '#/components/schemas/ApiErrorDto' "200": description: OK + deprecated: true security: - bearerAuth: [] post: @@ -1910,7 +1911,7 @@ components: id: type: integer format: int64 - resultNumber: + result_number: type: integer format: int64 example: 1 @@ -1928,6 +1929,36 @@ components: type: object additionalProperties: type: object + 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 ContainerDto: required: - created @@ -1963,6 +1994,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -2043,6 +2076,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -2051,12 +2088,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -2408,7 +2447,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -2437,10 +2475,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -2455,31 +2489,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -2527,6 +2536,8 @@ components: enum: - query - view + identifier: + $ref: '#/components/schemas/IdentifierDto' created: type: string format: date-time @@ -2535,10 +2546,13 @@ components: example: SELECT `id` FROM `air_quality` query_hash: type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 is_persisted: type: boolean + example: true result_hash: type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 result_number: type: integer format: int64 @@ -2627,6 +2641,7 @@ components: format: date-time TableBriefDto: required: + - columns - creator - description - id @@ -2645,6 +2660,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -2757,28 +2776,12 @@ components: email_verified: type: boolean example: true - ViewCreateDto: - required: - - is_public - - name - - query - type: object - properties: - name: - type: string - example: Air Quality - query: - type: string - example: SELECT `id` FROM `air_quality` - is_public: - type: boolean - example: true ViewBriefDto: required: - created - - created_by + - creator - id - - internalName + - internal_name - name - query - vdbid @@ -2793,15 +2796,17 @@ components: name: type: string example: Air Quality - internalName: - type: string - example: air_quality query: type: string example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC created: type: string format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality is_public: type: boolean example: true @@ -2809,12 +2814,25 @@ components: type: boolean description: True if it is the default view for the database example: true - created_by: - type: integer - format: int64 last_modified: type: string format: date-time + ViewCreateDto: + required: + - is_public + - name + - query + type: object + properties: + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` + is_public: + type: boolean + example: true TableCsvDto: required: - data @@ -2858,6 +2876,10 @@ components: statement: type: string example: SELECT `id` FROM `air_quality` + timestamp: + type: string + description: Execute query for data at this timestamp + format: date-time ViewDto: required: - created @@ -2876,8 +2898,6 @@ components: vdbid: type: integer format: int64 - creator: - $ref: '#/components/schemas/UserDto' database: $ref: '#/components/schemas/DatabaseDto' name: @@ -2892,6 +2912,8 @@ components: created: type: string format: date-time + creator: + $ref: '#/components/schemas/UserDto' is_public: type: boolean example: true @@ -2902,6 +2924,44 @@ components: last_modified: type: string format: date-time + IdentifierBriefDto: + required: + - container id + - database id + - id + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + created: + type: string + format: date-time + lastModified: + 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 QueryBriefDto: required: - cid @@ -2936,6 +2996,8 @@ components: enum: - query - view + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' created: type: string format: date-time diff --git a/swagger/semantics/api.yaml b/swagger/semantics/api.yaml index e813438..3ed782a 100644 --- a/swagger/semantics/api.yaml +++ b/swagger/semantics/api.yaml @@ -1 +1 @@ -{"definitions":{},"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.1.0-alpha"},"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"]}},"/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"]}},"/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":"DBRepo Production Server","url":"https://dbrepo1.ec.tuwien.ac.at/api/units"}]} +{"definitions":{},"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.1.0-alpha"},"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":"DBRepo Production Server","url":"https://dbrepo1.ec.tuwien.ac.at/api/units"}]} diff --git a/swagger/table/api.yaml b/swagger/table/api.yaml index 372f3dc..c1ee928 100644 --- a/swagger/table/api.yaml +++ b/swagger/table/api.yaml @@ -504,6 +504,7 @@ components: - internal_name - is_null_allowed - is_primary_key + - is_public - name - unique type: object @@ -547,6 +548,9 @@ components: - date - timestamp - blob + is_public: + type: boolean + example: true is_null_allowed: type: boolean example: false @@ -684,8 +688,39 @@ components: type: array items: $ref: '#/components/schemas/ColumnCreateDto' + 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 @@ -704,6 +739,10 @@ components: example: Air Quality in Austria creator: $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ColumnBriefDto' internal_name: type: string example: air_quality @@ -756,6 +795,7 @@ components: - description - id - internal_name + - is_public - name - queue_name - routing_key @@ -784,10 +824,13 @@ components: example: air_quality queue_name: type: string - example: dbrepo/4/4/2 + example: dbrepo/air_quality/air_quality routing_key: type: string - example: dbrepo/4/4/2/1 + example: dbrepo/air_quality/air_quality/1 + is_public: + type: boolean + example: true ContainerDto: required: - created @@ -823,6 +866,8 @@ components: port: type: integer format: int32 + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time @@ -903,6 +948,10 @@ components: type: array items: $ref: '#/components/schemas/TableBriefDto' + views: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' image: $ref: '#/components/schemas/ImageDto' container: @@ -911,12 +960,14 @@ components: type: array items: $ref: '#/components/schemas/DatabaseAccessDto' + owner: + $ref: '#/components/schemas/UserBriefDto' created: type: string format: date-time exchange_name: type: string - example: dbrepo/4/4 + example: dbrepo/air_quality internal_name: type: string example: weather_australia @@ -1241,7 +1292,6 @@ components: - default_port - dialect - driver_class - - environment - id - jdbc_method - repository @@ -1270,10 +1320,6 @@ components: size: type: integer example: 314295447 - environment: - type: array - items: - $ref: '#/components/schemas/ImageEnvItemDto' driver_class: type: string example: org.mariadb.jdbc.Driver @@ -1288,31 +1334,6 @@ components: type: integer format: int32 example: 3306 - ImageEnvItemDto: - required: - - iid - - key - - type - - value - type: object - properties: - iid: - type: integer - format: int64 - key: - type: string - example: MARIADB_ROOT_PASSWORD - value: - type: string - example: mariadb - type: - type: string - example: PRIVILEGED_PASSWORD - enum: - - username - - password - - privileged_username - - privileged_password LicenseDto: required: - identifier @@ -1471,6 +1492,47 @@ components: email_verified: type: boolean example: true + ViewBriefDto: + required: + - created + - creator + - id + - internal_name + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + creator: + $ref: '#/components/schemas/UserDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time securitySchemes: bearerAuth: type: http -- GitLab