diff --git a/.gitignore b/.gitignore index 715a1e4c5ad78ff01c939a2c9c4f4054f31d113a..9d287a16dc711075c7eee82e7d18a4dd5eef844a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ swagger/api-query/ swagger/api-table/ swagger/api-semantics/ swagger/api-user/ +swagger/api/ swagger/**/*.png swagger/**/*.css swagger/**/*.html diff --git a/swagger/api/__init__.py b/swagger/api/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/swagger/api/api_analyse/__init__.py b/swagger/api/api_analyse/__init__.py deleted file mode 100644 index 30b71b467adf6c97a2d33a1558ef04a6a717fd91..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Analyse Service API - - Service that analyses data structures # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_analyse.api.default_api import DefaultApi -# import ApiClient -from api_analyse.api_client import ApiClient -from api_analyse.configuration import Configuration -# import models into sdk package diff --git a/swagger/api/api_analyse/api/__init__.py b/swagger/api/api_analyse/api/__init__.py deleted file mode 100644 index 6b591ee3dcfab64fe943b8d0cb87068ab697bab9..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_analyse.api.default_api import DefaultApi diff --git a/swagger/api/api_analyse/api/default_api.py b/swagger/api/api_analyse/api/default_api.py deleted file mode 100644 index 255fd68ae933564807ea322c8f86eb9f3eeedeaa..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/api/default_api.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Analyse Service API - - Service that analyses data structures # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_analyse.api_client import ApiClient - - -class DefaultApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def api_analyse_determinedt_post(self, **kwargs): # noqa: E501 - """Determine datatypes # noqa: E501 - - This is a simple API which returns the datatypes of a (path) csv file # 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_analyse_determinedt_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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_analyse_determinedt_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_analyse_determinedt_post_with_http_info(**kwargs) # noqa: E501 - return data - - def api_analyse_determinedt_post_with_http_info(self, **kwargs): # noqa: E501 - """Determine datatypes # noqa: E501 - - This is a simple API which returns the datatypes of a (path) csv file # 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_analyse_determinedt_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method api_analyse_determinedt_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/analyse/determinedt', 'POST', - 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_analyse_determinepk_post(self, **kwargs): # noqa: E501 - """Determine primary keys # noqa: E501 - - This is a simple API which returns the primary keys + ranking of a (path) csv file # 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_analyse_determinepk_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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_analyse_determinepk_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_analyse_determinepk_post_with_http_info(**kwargs) # noqa: E501 - return data - - def api_analyse_determinepk_post_with_http_info(self, **kwargs): # noqa: E501 - """Determine primary keys # noqa: E501 - - This is a simple API which returns the primary keys + ranking of a (path) csv file # 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_analyse_determinepk_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method api_analyse_determinepk_post" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/analyse/determinepk', 'POST', - 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_analyse/api_client.py b/swagger/api/api_analyse/api_client.py deleted file mode 100644 index dc91c875ac7c2cfcdea210bc1e38fbb74a7b7ea2..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Analyse Service API - - Service that analyses data structures # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_analyse.configuration import Configuration -import api_analyse.models -from api_analyse import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_analyse.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_analyse/configuration.py b/swagger/api/api_analyse/configuration.py deleted file mode 100644 index 2ed7b1c31a17b802901f6874889eeb917cee3d5d..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Analyse Service API - - Service that analyses data structures # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_analyse") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_analyse/models/__init__.py b/swagger/api/api_analyse/models/__init__.py deleted file mode 100644 index 03153d22427f03744d935b877aa146e37f668b0e..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/models/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Analyse Service API - - Service that analyses data structures # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package diff --git a/swagger/api/api_analyse/rest.py b/swagger/api/api_analyse/rest.py deleted file mode 100644 index 9df1490e32a2d33dfdae9d285686fa951b11a8ac..0000000000000000000000000000000000000000 --- a/swagger/api/api_analyse/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Analyse Service API - - Service that analyses data structures # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_authentication/__init__.py b/swagger/api/api_authentication/__init__.py deleted file mode 100644 index ab1243bfe55ba9204fa5a9cd34d7dfc287612d86..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - 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 -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_authentication.api.authentication_endpoint_api import AuthenticationEndpointApi -from api_authentication.api.time_secret_endpoint_api import TimeSecretEndpointApi -from api_authentication.api.token_endpoint_api import TokenEndpointApi -from api_authentication.api.user_endpoint_api import UserEndpointApi -# import ApiClient -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 -from api_authentication.models.database_dto import DatabaseDto -from api_authentication.models.granted_authority_dto import GrantedAuthorityDto -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.jwt_response_dto import JwtResponseDto -from api_authentication.models.license_dto import LicenseDto -from api_authentication.models.login_request_dto import LoginRequestDto -from api_authentication.models.related_identifier_dto import RelatedIdentifierDto -from api_authentication.models.signup_request_dto import SignupRequestDto -from api_authentication.models.table_brief_dto import TableBriefDto -from api_authentication.models.token_brief_dto import TokenBriefDto -from api_authentication.models.token_dto import TokenDto -from api_authentication.models.user_brief_dto import UserBriefDto -from api_authentication.models.user_dto import UserDto -from api_authentication.models.user_email_dto import UserEmailDto -from api_authentication.models.user_forgot_dto import UserForgotDto -from api_authentication.models.user_password_dto import UserPasswordDto -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/__init__.py b/swagger/api/api_authentication/api/__init__.py deleted file mode 100644 index dbe2618cccb80f03c92c3603aa98baf04bcc2f44..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_authentication.api.authentication_endpoint_api import AuthenticationEndpointApi -from api_authentication.api.time_secret_endpoint_api import TimeSecretEndpointApi -from api_authentication.api.token_endpoint_api import TokenEndpointApi -from api_authentication.api.user_endpoint_api import UserEndpointApi diff --git a/swagger/api/api_authentication/api/authentication_endpoint_api.py b/swagger/api/api_authentication/api/authentication_endpoint_api.py deleted file mode 100644 index 00cfea46bf073312505a6577f2a0552993a9c09b..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/api/authentication_endpoint_api.py +++ /dev/null @@ -1,308 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_authentication.api_client import ApiClient - - -class AuthenticationEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def authenticate_user(self, authorization, **kwargs): # noqa: E501 - """Validate authentication token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.authenticate_user(authorization, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str authorization: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.authenticate_user_with_http_info(authorization, **kwargs) # noqa: E501 - else: - (data) = self.authenticate_user_with_http_info(authorization, **kwargs) # noqa: E501 - return data - - def authenticate_user_with_http_info(self, authorization, **kwargs): # noqa: E501 - """Validate authentication token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.authenticate_user_with_http_info(authorization, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str authorization: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['authorization'] # 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 authenticate_user" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'authorization' is set - if ('authorization' not in params or - params['authorization'] is None): - raise ValueError("Missing the required parameter `authorization` when calling `authenticate_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'authorization' in params: - header_params['Authorization'] = params['authorization'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/auth', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # 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 authenticate_user1(self, body, **kwargs): # noqa: E501 - """Create authentication token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.authenticate_user1(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LoginRequestDto body: (required) - :return: JwtResponseDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.authenticate_user1_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.authenticate_user1_with_http_info(body, **kwargs) # noqa: E501 - return data - - def authenticate_user1_with_http_info(self, body, **kwargs): # noqa: E501 - """Create authentication token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.authenticate_user1_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LoginRequestDto body: (required) - :return: JwtResponseDto - 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 authenticate_user1" % 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 `authenticate_user1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/auth', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JwtResponseDto', # 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 re_authenticate_user(self, **kwargs): # noqa: E501 - """Renew authentication token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.re_authenticate_user(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: JwtResponseDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.re_authenticate_user_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.re_authenticate_user_with_http_info(**kwargs) # noqa: E501 - return data - - def re_authenticate_user_with_http_info(self, **kwargs): # noqa: E501 - """Renew authentication token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.re_authenticate_user_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: JwtResponseDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method re_authenticate_user" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/auth/renew', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='JwtResponseDto', # 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_authentication/api/time_secret_endpoint_api.py b/swagger/api/api_authentication/api/time_secret_endpoint_api.py deleted file mode 100644 index b679f9f98694f2b1e6222e1afdfa16befaee7404..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/api/time_secret_endpoint_api.py +++ /dev/null @@ -1,223 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_authentication.api_client import ApiClient - - -class TimeSecretEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def resend(self, body, **kwargs): # noqa: E501 - """resend user token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserForgotDto body: (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.resend_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.resend_with_http_info(body, **kwargs) # noqa: E501 - return data - - def resend_with_http_info(self, body, **kwargs): # noqa: E501 - """resend user token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.resend_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserForgotDto body: (required) - :return: object - 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 resend" % 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 `resend`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user/secret/resend', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - 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'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def verify_email(self, token, **kwargs): # noqa: E501 - """verify user email # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify_email(token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str token: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.verify_email_with_http_info(token, **kwargs) # noqa: E501 - else: - (data) = self.verify_email_with_http_info(token, **kwargs) # noqa: E501 - return data - - def verify_email_with_http_info(self, token, **kwargs): # noqa: E501 - """verify user email # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.verify_email_with_http_info(token, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str token: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['token'] # 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 verify_email" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'token' is set - if ('token' not in params or - params['token'] is None): - raise ValueError("Missing the required parameter `token` when calling `verify_email`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'token' in params: - query_params.append(('token', params['token'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user/secret', 'GET', - 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_authentication/api/token_endpoint_api.py b/swagger/api/api_authentication/api/token_endpoint_api.py deleted file mode 100644 index e2b2c027ff60cb5ba36b7e2c93ea6779d98f343a..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/api/token_endpoint_api.py +++ /dev/null @@ -1,296 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_authentication.api_client import ApiClient - - -class TokenEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, **kwargs): # noqa: E501 - """Create developer token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: TokenDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(**kwargs) # noqa: E501 - return data - - def create_with_http_info(self, **kwargs): # noqa: E501 - """Create developer token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: TokenDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/token', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TokenDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, **kwargs): # noqa: E501 - """Delete developer token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: 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 - else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete developer token # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: object - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/token/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - 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'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list_all(self, **kwargs): # noqa: E501 - """Lists developer tokens for user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_all(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[TokenBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_all_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_all_with_http_info(**kwargs) # noqa: E501 - return data - - def list_all_with_http_info(self, **kwargs): # noqa: E501 - """Lists developer tokens for user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_all_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[TokenBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list_all" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/token', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TokenBriefDto]', # 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_authentication/api/user_endpoint_api.py b/swagger/api/api_authentication/api/user_endpoint_api.py deleted file mode 100644 index 4619f415494f8404199a49ea20fa878a044ed480..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/api/user_endpoint_api.py +++ /dev/null @@ -1,1027 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_authentication.api_client import ApiClient - - -class UserEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def find(self, id, **kwargs): # noqa: E501 - """Find some user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find_with_http_info(self, id, **kwargs): # noqa: E501 - """Find some user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # 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 forgot(self, body, **kwargs): # 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 - >>> thread = api.forgot(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserForgotDto body: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.forgot_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.forgot_with_http_info(body, **kwargs) # noqa: E501 - return data - - def forgot_with_http_info(self, body, **kwargs): # 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 - >>> thread = api.forgot_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserForgotDto body: (required) - :return: UserDto - 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 forgot" % 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 `forgot`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list(self, **kwargs): # noqa: E501 - """List users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[UserBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_with_http_info(**kwargs) # noqa: E501 - return data - - def list_with_http_info(self, **kwargs): # noqa: E501 - """List users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[UserBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UserBriefDto]', # 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 register(self, body, **kwargs): # noqa: E501 - """Create user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SignupRequestDto body: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.register_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.register_with_http_info(body, **kwargs) # noqa: E501 - return data - - def register_with_http_info(self, body, **kwargs): # noqa: E501 - """Create user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.register_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SignupRequestDto body: (required) - :return: UserDto - 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 register" % 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 `register`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # 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 reset(self, body, **kwargs): # 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 - >>> thread = api.reset(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserResetDto body: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.reset_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.reset_with_http_info(body, **kwargs) # noqa: E501 - return data - - def reset_with_http_info(self, body, **kwargs): # 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 - >>> thread = api.reset_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserResetDto body: (required) - :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 reset" % 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 `reset`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user/reset', '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 update(self, body, id, **kwargs): # noqa: E501 - """Update user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserUpdateDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserUpdateDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/user/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_email(self, body, id, **kwargs): # noqa: E501 - """Update user email # 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_email(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserEmailDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_email_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_email_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_email_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update user email # 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_email_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserEmailDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_email" % 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_email`") # 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_email`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/user/{id}/email', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_password(self, body, id, **kwargs): # noqa: E501 - """Update user password # 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_password(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserPasswordDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_password_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_password_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_password_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update user password # 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_password_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserPasswordDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_password" % 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_password`") # 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_password`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/user/{id}/password', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_roles(self, body, id, **kwargs): # noqa: E501 - """Update user roles # 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_roles(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserRolesDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_roles_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_roles_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_roles_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update user roles # 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_roles_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserRolesDto body: (required) - :param int id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_roles" % 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_roles`") # 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_roles`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/user/{id}/roles', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update_theme(self, body, id, **kwargs): # noqa: E501 - """Update user theme # 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_theme(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserThemeSetDto body: (required) - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_theme_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_theme_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_theme_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update user theme # 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_theme_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserThemeSetDto body: (required) - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update_theme" % 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_theme`") # 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_theme`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # 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/user/{id}/theme', '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_authentication/api_client.py b/swagger/api/api_authentication/api_client.py deleted file mode 100644 index de8d2dd6db1dc84a9044893e899af33dd63fda4a..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# 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 -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_authentication.configuration import Configuration -import api_authentication.models -from api_authentication import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_authentication.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_authentication/configuration.py b/swagger/api/api_authentication/configuration.py deleted file mode 100644 index 2638b5e36f20bba23c9228abf90fd54e7d31fd14..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_authentication") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.1.0-alpha\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_authentication/models/__init__.py b/swagger/api/api_authentication/models/__init__.py deleted file mode 100644 index bb944c5423340d6a7766efc8d475c788bb9d33cb..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - 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 -""" - -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 -from api_authentication.models.database_dto import DatabaseDto -from api_authentication.models.granted_authority_dto import GrantedAuthorityDto -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.jwt_response_dto import JwtResponseDto -from api_authentication.models.license_dto import LicenseDto -from api_authentication.models.login_request_dto import LoginRequestDto -from api_authentication.models.related_identifier_dto import RelatedIdentifierDto -from api_authentication.models.signup_request_dto import SignupRequestDto -from api_authentication.models.table_brief_dto import TableBriefDto -from api_authentication.models.token_brief_dto import TokenBriefDto -from api_authentication.models.token_dto import TokenDto -from api_authentication.models.user_brief_dto import UserBriefDto -from api_authentication.models.user_dto import UserDto -from api_authentication.models.user_email_dto import UserEmailDto -from api_authentication.models.user_forgot_dto import UserForgotDto -from api_authentication.models.user_password_dto import UserPasswordDto -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/api_error_dto.py b/swagger/api/api_authentication/models/api_error_dto.py deleted file mode 100644 index ec3987847430c4d71f515142d6ed2dcf1678e3c2..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# 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 ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_authentication/models/column_brief_dto.py b/swagger/api/api_authentication/models/column_brief_dto.py deleted file mode 100644 index 65bfe649f67ae598be6fcc426148720920121a06..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/column_brief_dto.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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 deleted file mode 100644 index b3e26d1fc3649f3578593db44ffd6b8a15e5e492..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/container_dto.py +++ /dev/null @@ -1,381 +0,0 @@ -# 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 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', - 'database': 'DatabaseDto', - 'image': 'ImageBriefDto', - 'port': 'int', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - '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, 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 - self._name = None - self._state = None - self._database = None - self._image = None - self._port = None - self._owner = 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 database is not None: - self.database = database - if image is not None: - 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: - 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 database(self): - """Gets the database of this ContainerDto. # noqa: E501 - - - :return: The database of this ContainerDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerDto. - - - :param database: The database of this ContainerDto. # noqa: E501 - :type: DatabaseDto - """ - - self._database = database - - @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 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 - - - :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_authentication/models/creator_dto.py b/swagger/api/api_authentication/models/creator_dto.py deleted file mode 100644 index 89cce124fe5576e77f2b32f88466a0dba534ac3c..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/creator_dto.py +++ /dev/null @@ -1,269 +0,0 @@ -# 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 CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - 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(CreatorDto, 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, CreatorDto): - 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/database_access_dto.py b/swagger/api/api_authentication/models/database_access_dto.py deleted file mode 100644 index 23a8e1a53efe186098d3d5a8b7419596c4d19ecf..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/database_access_dto.py +++ /dev/null @@ -1,170 +0,0 @@ -# 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 DatabaseAccessDto(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 = { - 'user': 'UserDto', - 'type': 'str', - 'created': 'datetime' - } - - attribute_map = { - 'user': 'user', - 'type': 'type', - 'created': 'created' - } - - def __init__(self, user=None, type=None, created=None): # noqa: E501 - """DatabaseAccessDto - a model defined in Swagger""" # noqa: E501 - self._user = None - self._type = None - self._created = None - self.discriminator = None - self.user = user - self.type = type - if created is not None: - self.created = created - - @property - def user(self): - """Gets the user of this DatabaseAccessDto. # noqa: E501 - - - :return: The user of this DatabaseAccessDto. # noqa: E501 - :rtype: UserDto - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this DatabaseAccessDto. - - - :param user: The user of this DatabaseAccessDto. # noqa: E501 - :type: UserDto - """ - if user is None: - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def type(self): - """Gets the type of this DatabaseAccessDto. # noqa: E501 - - - :return: The type of this DatabaseAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseAccessDto. - - - :param type: The type of this DatabaseAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def created(self): - """Gets the created of this DatabaseAccessDto. # noqa: E501 - - - :return: The created of this DatabaseAccessDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseAccessDto. - - - :param created: The created of this DatabaseAccessDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - 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(DatabaseAccessDto, 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, DatabaseAccessDto): - 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/database_dto.py b/swagger/api/api_authentication/models/database_dto.py deleted file mode 100644 index 5af8e0645ec3863daa0adf68be0c96793ada68e9..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/database_dto.py +++ /dev/null @@ -1,479 +0,0 @@ -# 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 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', - 'creator': 'UserBriefDto', - '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', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'creator': 'creator', - '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, 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 - self._creator = None - 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 - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - 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 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 - 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 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 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 - - - :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 accesses(self): - """Gets the accesses of this DatabaseDto. # noqa: E501 - - - :return: The accesses of this DatabaseDto. # noqa: E501 - :rtype: list[DatabaseAccessDto] - """ - return self._accesses - - @accesses.setter - def accesses(self, accesses): - """Sets the accesses of this DatabaseDto. - - - :param accesses: The accesses of this DatabaseDto. # noqa: E501 - :type: list[DatabaseAccessDto] - """ - - 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 - - - :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 exchange_name(self): - """Gets the exchange_name of this DatabaseDto. # noqa: E501 - - - :return: The exchange_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this DatabaseDto. - - - :param exchange_name: The exchange_name of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange_name is None: - raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 - - self._exchange_name = exchange_name - - @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_authentication/models/granted_authority_dto.py b/swagger/api/api_authentication/models/granted_authority_dto.py deleted file mode 100644 index 27fb59540a7ea4ac0bd308116678bf19638a94f1..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/granted_authority_dto.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 GrantedAuthorityDto(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 = { - 'authority': 'str' - } - - attribute_map = { - 'authority': 'authority' - } - - def __init__(self, authority=None): # noqa: E501 - """GrantedAuthorityDto - a model defined in Swagger""" # noqa: E501 - self._authority = None - self.discriminator = None - if authority is not None: - self.authority = authority - - @property - def authority(self): - """Gets the authority of this GrantedAuthorityDto. # noqa: E501 - - - :return: The authority of this GrantedAuthorityDto. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this GrantedAuthorityDto. - - - :param authority: The authority of this GrantedAuthorityDto. # noqa: E501 - :type: str - """ - - self._authority = authority - - 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(GrantedAuthorityDto, 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, GrantedAuthorityDto): - 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/identifier_dto.py b/swagger/api/api_authentication/models/identifier_dto.py deleted file mode 100644 index 9761fc5b8405a2584edd4a2073dbcbe9f33518ea..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# 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 IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - 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/image_brief_dto.py b/swagger/api/api_authentication/models/image_brief_dto.py deleted file mode 100644 index 3e8c04a8f94e0f9cd7d77ac343616e335116850a..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/image_brief_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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 ImageBriefDto(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' - } - - attribute_map = { - 'id': 'id', - 'repository': 'repository', - 'tag': 'tag' - } - - 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 - self.discriminator = None - self.id = id - self.repository = repository - self.tag = tag - - @property - def id(self): - """Gets the id of this ImageBriefDto. # 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 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. - - - :param repository: The repository of this ImageBriefDto. # 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 ImageBriefDto. # noqa: E501 - - - :return: The tag of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. - - - :param tag: The tag of this ImageBriefDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ImageBriefDto, 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, ImageBriefDto): - 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/image_date_dto.py b/swagger/api/api_authentication/models/image_date_dto.py deleted file mode 100644 index b8f379e2acac1198492fcad960a9961f27566b04..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# 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 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_authentication/models/image_dto.py b/swagger/api/api_authentication/models/image_dto.py deleted file mode 100644 index 2861b641095808a88b1d78e3e20bd508893cc93b..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/image_dto.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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 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', - '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', - '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, 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._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.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 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_authentication/models/image_env_item_dto.py b/swagger/api/api_authentication/models/image_env_item_dto.py deleted file mode 100644 index 0a8089775eddf76cf0fc461d9cc94852246487ff..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/image_env_item_dto.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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 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_authentication/models/jwt_response_dto.py b/swagger/api/api_authentication/models/jwt_response_dto.py deleted file mode 100644 index 1ec439618bdd7247873e016e6e00e310e2d74e24..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/jwt_response_dto.py +++ /dev/null @@ -1,241 +0,0 @@ -# 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 JwtResponseDto(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 = { - 'token': 'str', - 'type': 'str', - 'id': 'int', - 'username': 'str', - 'email': 'str', - 'roles': 'list[str]' - } - - attribute_map = { - 'token': 'token', - 'type': 'type', - 'id': 'id', - 'username': 'username', - 'email': 'email', - 'roles': 'roles' - } - - def __init__(self, token=None, type=None, id=None, username=None, email=None, roles=None): # noqa: E501 - """JwtResponseDto - a model defined in Swagger""" # noqa: E501 - self._token = None - self._type = None - self._id = None - self._username = None - self._email = None - self._roles = None - self.discriminator = None - self.token = token - if type is not None: - self.type = type - if id is not None: - self.id = id - if username is not None: - self.username = username - if email is not None: - self.email = email - if roles is not None: - self.roles = roles - - @property - def token(self): - """Gets the token of this JwtResponseDto. # noqa: E501 - - - :return: The token of this JwtResponseDto. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this JwtResponseDto. - - - :param token: The token of this JwtResponseDto. # noqa: E501 - :type: str - """ - if token is None: - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - @property - def type(self): - """Gets the type of this JwtResponseDto. # noqa: E501 - - - :return: The type of this JwtResponseDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this JwtResponseDto. - - - :param type: The type of this JwtResponseDto. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def id(self): - """Gets the id of this JwtResponseDto. # noqa: E501 - - - :return: The id of this JwtResponseDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this JwtResponseDto. - - - :param id: The id of this JwtResponseDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def username(self): - """Gets the username of this JwtResponseDto. # noqa: E501 - - - :return: The username of this JwtResponseDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this JwtResponseDto. - - - :param username: The username of this JwtResponseDto. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def email(self): - """Gets the email of this JwtResponseDto. # noqa: E501 - - - :return: The email of this JwtResponseDto. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this JwtResponseDto. - - - :param email: The email of this JwtResponseDto. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def roles(self): - """Gets the roles of this JwtResponseDto. # noqa: E501 - - - :return: The roles of this JwtResponseDto. # noqa: E501 - :rtype: list[str] - """ - return self._roles - - @roles.setter - def roles(self, roles): - """Sets the roles of this JwtResponseDto. - - - :param roles: The roles of this JwtResponseDto. # noqa: E501 - :type: list[str] - """ - - self._roles = roles - - 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(JwtResponseDto, 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, JwtResponseDto): - 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/license_dto.py b/swagger/api/api_authentication/models/license_dto.py deleted file mode 100644 index 37ac2e3598a3e1b61081b0c83eca129af89b4ce4..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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 LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - 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/login_request_dto.py b/swagger/api/api_authentication/models/login_request_dto.py deleted file mode 100644 index ffebe690dd07f94409efb3ecbf3e1a4a286b5323..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/login_request_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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 LoginRequestDto(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 = { - 'username': 'str', - 'password': 'str' - } - - attribute_map = { - 'username': 'username', - 'password': 'password' - } - - def __init__(self, username=None, password=None): # noqa: E501 - """LoginRequestDto - a model defined in Swagger""" # noqa: E501 - self._username = None - self._password = None - self.discriminator = None - self.username = username - self.password = password - - @property - def username(self): - """Gets the username of this LoginRequestDto. # noqa: E501 - - - :return: The username of this LoginRequestDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this LoginRequestDto. - - - :param username: The username of this LoginRequestDto. # 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 password(self): - """Gets the password of this LoginRequestDto. # noqa: E501 - - - :return: The password of this LoginRequestDto. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this LoginRequestDto. - - - :param password: The password of this LoginRequestDto. # noqa: E501 - :type: str - """ - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - 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(LoginRequestDto, 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, LoginRequestDto): - 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/related_identifier_dto.py b/swagger/api/api_authentication/models/related_identifier_dto.py deleted file mode 100644 index 1d2c91fe6d69f019bfaaf0f6c5281b2a7552d321..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# 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 RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - 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/signup_request_dto.py b/swagger/api/api_authentication/models/signup_request_dto.py deleted file mode 100644 index e4583703ccabdc602ba73297658b3b96dfe27948..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/signup_request_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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 SignupRequestDto(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 = { - 'username': 'str', - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'username': 'username', - 'email': 'email', - 'password': 'password' - } - - def __init__(self, username=None, email=None, password=None): # noqa: E501 - """SignupRequestDto - a model defined in Swagger""" # noqa: E501 - self._username = None - self._email = None - self._password = None - self.discriminator = None - self.username = username - self.email = email - self.password = password - - @property - def username(self): - """Gets the username of this SignupRequestDto. # noqa: E501 - - - :return: The username of this SignupRequestDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this SignupRequestDto. - - - :param username: The username of this SignupRequestDto. # 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 email(self): - """Gets the email of this SignupRequestDto. # noqa: E501 - - - :return: The email of this SignupRequestDto. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this SignupRequestDto. - - - :param email: The email of this SignupRequestDto. # 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 password(self): - """Gets the password of this SignupRequestDto. # noqa: E501 - - - :return: The password of this SignupRequestDto. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this SignupRequestDto. - - - :param password: The password of this SignupRequestDto. # noqa: E501 - :type: str - """ - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - 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(SignupRequestDto, 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, SignupRequestDto): - 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/table_brief_dto.py b/swagger/api/api_authentication/models/table_brief_dto.py deleted file mode 100644 index 08f477ed3d920b52edb600eba54283681e17098a..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/table_brief_dto.py +++ /dev/null @@ -1,246 +0,0 @@ -# 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 TableBriefDto(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', - 'description': 'str', - 'creator': 'UserBriefDto', - 'columns': 'list[ColumnBriefDto]', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'creator': 'creator', - 'columns': 'columns', - 'internal_name': 'internal_name' - } - - 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 - def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 - - - :return: The id of this TableBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableBriefDto. - - - :param id: The id of this TableBriefDto. # 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 TableBriefDto. # noqa: E501 - - - :return: The name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableBriefDto. - - - :param name: The name of this TableBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableBriefDto. # noqa: E501 - - - :return: The description of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableBriefDto. - - - :param description: The description of this TableBriefDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def creator(self): - """Gets the creator of this TableBriefDto. # noqa: E501 - - - :return: The creator of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this TableBriefDto. - - - :param creator: The creator of this TableBriefDto. # 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 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 - - - :return: The internal_name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. - - - :param internal_name: The internal_name of this TableBriefDto. # 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 - - 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(TableBriefDto, 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, TableBriefDto): - 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/token_brief_dto.py b/swagger/api/api_authentication/models/token_brief_dto.py deleted file mode 100644 index 228505ff88a3c00b4cc348d4b5ea30ec99f29d04..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/token_brief_dto.py +++ /dev/null @@ -1,218 +0,0 @@ -# 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 TokenBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'created': 'datetime', - 'expires': 'datetime', - 'token_hash': 'str', - 'last_used': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'created': 'created', - 'expires': 'expires', - 'token_hash': 'token_hash', - 'last_used': 'last_used' - } - - def __init__(self, id=None, created=None, expires=None, token_hash=None, last_used=None): # noqa: E501 - """TokenBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created = None - self._expires = None - self._token_hash = None - self._last_used = None - self.discriminator = None - self.id = id - self.created = created - self.expires = expires - self.token_hash = token_hash - if last_used is not None: - self.last_used = last_used - - @property - def id(self): - """Gets the id of this TokenBriefDto. # noqa: E501 - - - :return: The id of this TokenBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TokenBriefDto. - - - :param id: The id of this TokenBriefDto. # 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 created(self): - """Gets the created of this TokenBriefDto. # noqa: E501 - - - :return: The created of this TokenBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this TokenBriefDto. - - - :param created: The created of this TokenBriefDto. # 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 expires(self): - """Gets the expires of this TokenBriefDto. # noqa: E501 - - - :return: The expires of this TokenBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._expires - - @expires.setter - def expires(self, expires): - """Sets the expires of this TokenBriefDto. - - - :param expires: The expires of this TokenBriefDto. # noqa: E501 - :type: datetime - """ - if expires is None: - raise ValueError("Invalid value for `expires`, must not be `None`") # noqa: E501 - - self._expires = expires - - @property - def token_hash(self): - """Gets the token_hash of this TokenBriefDto. # noqa: E501 - - - :return: The token_hash of this TokenBriefDto. # noqa: E501 - :rtype: str - """ - return self._token_hash - - @token_hash.setter - def token_hash(self, token_hash): - """Sets the token_hash of this TokenBriefDto. - - - :param token_hash: The token_hash of this TokenBriefDto. # noqa: E501 - :type: str - """ - if token_hash is None: - raise ValueError("Invalid value for `token_hash`, must not be `None`") # noqa: E501 - - self._token_hash = token_hash - - @property - def last_used(self): - """Gets the last_used of this TokenBriefDto. # noqa: E501 - - - :return: The last_used of this TokenBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._last_used - - @last_used.setter - def last_used(self, last_used): - """Sets the last_used of this TokenBriefDto. - - - :param last_used: The last_used of this TokenBriefDto. # noqa: E501 - :type: datetime - """ - - self._last_used = last_used - - 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(TokenBriefDto, 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, TokenBriefDto): - 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/token_dto.py b/swagger/api/api_authentication/models/token_dto.py deleted file mode 100644 index 23f0c9c040d107880fd50a22fe9b50890a903ce5..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/token_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# 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 TokenDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'created': 'datetime', - 'expires': 'datetime', - 'token': 'str', - 'token_hash': 'str', - 'last_used': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'created': 'created', - 'expires': 'expires', - 'token': 'token', - 'token_hash': 'token_hash', - 'last_used': 'last_used' - } - - def __init__(self, id=None, created=None, expires=None, token=None, token_hash=None, last_used=None): # noqa: E501 - """TokenDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created = None - self._expires = None - self._token = None - self._token_hash = None - self._last_used = None - self.discriminator = None - self.id = id - self.created = created - self.expires = expires - self.token = token - self.token_hash = token_hash - if last_used is not None: - self.last_used = last_used - - @property - def id(self): - """Gets the id of this TokenDto. # noqa: E501 - - - :return: The id of this TokenDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TokenDto. - - - :param id: The id of this TokenDto. # 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 created(self): - """Gets the created of this TokenDto. # noqa: E501 - - - :return: The created of this TokenDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this TokenDto. - - - :param created: The created of this TokenDto. # 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 expires(self): - """Gets the expires of this TokenDto. # noqa: E501 - - - :return: The expires of this TokenDto. # noqa: E501 - :rtype: datetime - """ - return self._expires - - @expires.setter - def expires(self, expires): - """Sets the expires of this TokenDto. - - - :param expires: The expires of this TokenDto. # noqa: E501 - :type: datetime - """ - if expires is None: - raise ValueError("Invalid value for `expires`, must not be `None`") # noqa: E501 - - self._expires = expires - - @property - def token(self): - """Gets the token of this TokenDto. # noqa: E501 - - - :return: The token of this TokenDto. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this TokenDto. - - - :param token: The token of this TokenDto. # noqa: E501 - :type: str - """ - if token is None: - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - @property - def token_hash(self): - """Gets the token_hash of this TokenDto. # noqa: E501 - - - :return: The token_hash of this TokenDto. # noqa: E501 - :rtype: str - """ - return self._token_hash - - @token_hash.setter - def token_hash(self, token_hash): - """Sets the token_hash of this TokenDto. - - - :param token_hash: The token_hash of this TokenDto. # noqa: E501 - :type: str - """ - if token_hash is None: - raise ValueError("Invalid value for `token_hash`, must not be `None`") # noqa: E501 - - self._token_hash = token_hash - - @property - def last_used(self): - """Gets the last_used of this TokenDto. # noqa: E501 - - - :return: The last_used of this TokenDto. # noqa: E501 - :rtype: datetime - """ - return self._last_used - - @last_used.setter - def last_used(self, last_used): - """Sets the last_used of this TokenDto. - - - :param last_used: The last_used of this TokenDto. # noqa: E501 - :type: datetime - """ - - self._last_used = last_used - - 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(TokenDto, 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, TokenDto): - 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/user_brief_dto.py b/swagger/api/api_authentication/models/user_brief_dto.py deleted file mode 100644 index 84e3367c2933d3736647fb4babf35ed6f49e8176..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_brief_dto.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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 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', - 'titles_before': 'str', - 'titles_after': 'str', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'roles': 'list[str]', - 'theme_dark': 'bool', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'titles_before': 'titlesBefore', - 'titles_after': 'titlesAfter', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'roles': 'roles', - 'theme_dark': 'themeDark', - 'email_verified': 'emailVerified' - } - - def __init__(self, id=None, username=None, titles_before=None, titles_after=None, firstname=None, lastname=None, affiliation=None, orcid=None, roles=None, theme_dark=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._titles_before = None - self._titles_after = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._roles = None - self._theme_dark = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if titles_before is not None: - self.titles_before = titles_before - if titles_after is not None: - self.titles_after = titles_after - 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 - self.roles = roles - if theme_dark is not None: - self.theme_dark = theme_dark - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: 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 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 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 roles(self): - """Gets the roles of this UserBriefDto. # noqa: E501 - - Roles of the user # noqa: E501 - - :return: The roles of this UserBriefDto. # noqa: E501 - :rtype: list[str] - """ - return self._roles - - @roles.setter - def roles(self, roles): - """Sets the roles of this UserBriefDto. - - Roles of the user # noqa: E501 - - :param roles: The roles of this UserBriefDto. # noqa: E501 - :type: list[str] - """ - if roles is None: - raise ValueError("Invalid value for `roles`, must not be `None`") # noqa: E501 - - self._roles = roles - - @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 - """ - - 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 - """ - - 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_authentication/models/user_dto.py b/swagger/api/api_authentication/models/user_dto.py deleted file mode 100644 index c487ca7c5f19d8a39248b6f0f114c8f5c509dce9..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_dto.py +++ /dev/null @@ -1,510 +0,0 @@ -# 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 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', - 'roles': 'list[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', - 'roles': 'roles', - '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, roles=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._roles = 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 - self.roles = roles - 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 roles(self): - """Gets the roles of this UserDto. # noqa: E501 - - Roles of the user # noqa: E501 - - :return: The roles of this UserDto. # noqa: E501 - :rtype: list[str] - """ - return self._roles - - @roles.setter - def roles(self, roles): - """Sets the roles of this UserDto. - - Roles of the user # noqa: E501 - - :param roles: The roles of this UserDto. # noqa: E501 - :type: list[str] - """ - if roles is None: - raise ValueError("Invalid value for `roles`, must not be `None`") # noqa: E501 - - self._roles = roles - - @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_authentication/models/user_email_dto.py b/swagger/api/api_authentication/models/user_email_dto.py deleted file mode 100644 index 9efba48a1014164d8dc3a89bfeaa6ae7b0152ac5..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_email_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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 UserEmailDto(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 = { - 'email': 'str' - } - - attribute_map = { - 'email': 'email' - } - - def __init__(self, email=None): # noqa: E501 - """UserEmailDto - a model defined in Swagger""" # noqa: E501 - self._email = None - self.discriminator = None - self.email = email - - @property - def email(self): - """Gets the email of this UserEmailDto. # noqa: E501 - - - :return: The email of this UserEmailDto. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserEmailDto. - - - :param email: The email of this UserEmailDto. # noqa: E501 - :type: str - """ - if email is None: - raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 - - self._email = email - - 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(UserEmailDto, 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, UserEmailDto): - 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/user_forgot_dto.py b/swagger/api/api_authentication/models/user_forgot_dto.py deleted file mode 100644 index 33eabd537729470bb50b8a580ee45be724ea7af0..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_forgot_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# 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 UserForgotDto(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 = { - 'username': 'str', - 'email': 'str' - } - - attribute_map = { - 'username': 'username', - 'email': 'email' - } - - def __init__(self, username=None, email=None): # noqa: E501 - """UserForgotDto - a model defined in Swagger""" # noqa: E501 - self._username = None - self._email = None - self.discriminator = None - if username is not None: - self.username = username - if email is not None: - self.email = email - - @property - def username(self): - """Gets the username of this UserForgotDto. # noqa: E501 - - - :return: The username of this UserForgotDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserForgotDto. - - - :param username: The username of this UserForgotDto. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def email(self): - """Gets the email of this UserForgotDto. # noqa: E501 - - - :return: The email of this UserForgotDto. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this UserForgotDto. - - - :param email: The email of this UserForgotDto. # noqa: E501 - :type: str - """ - - self._email = email - - 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(UserForgotDto, 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, UserForgotDto): - 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/user_password_dto.py b/swagger/api/api_authentication/models/user_password_dto.py deleted file mode 100644 index 1c501d6e8f0e45cc43df5ef1985dc7a5298e46eb..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_password_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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 UserPasswordDto(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 = { - 'password': 'str' - } - - attribute_map = { - 'password': 'password' - } - - def __init__(self, password=None): # noqa: E501 - """UserPasswordDto - a model defined in Swagger""" # noqa: E501 - self._password = None - self.discriminator = None - self.password = password - - @property - def password(self): - """Gets the password of this UserPasswordDto. # noqa: E501 - - - :return: The password of this UserPasswordDto. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this UserPasswordDto. - - - :param password: The password of this UserPasswordDto. # noqa: E501 - :type: str - """ - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - 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(UserPasswordDto, 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, UserPasswordDto): - 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/user_reset_dto.py b/swagger/api/api_authentication/models/user_reset_dto.py deleted file mode 100644 index 6eae81a67ed15dd60d3a5c8adc2ec51a570bcfbc..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_reset_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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 UserResetDto(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 = { - 'password': 'str', - 'token': 'str' - } - - attribute_map = { - 'password': 'password', - 'token': 'token' - } - - def __init__(self, password=None, token=None): # noqa: E501 - """UserResetDto - a model defined in Swagger""" # noqa: E501 - self._password = None - self._token = None - self.discriminator = None - self.password = password - self.token = token - - @property - def password(self): - """Gets the password of this UserResetDto. # noqa: E501 - - - :return: The password of this UserResetDto. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this UserResetDto. - - - :param password: The password of this UserResetDto. # noqa: E501 - :type: str - """ - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - @property - def token(self): - """Gets the token of this UserResetDto. # noqa: E501 - - - :return: The token of this UserResetDto. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this UserResetDto. - - - :param token: The token of this UserResetDto. # noqa: E501 - :type: str - """ - if token is None: - raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 - - self._token = token - - 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(UserResetDto, 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, UserResetDto): - 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/user_roles_dto.py b/swagger/api/api_authentication/models/user_roles_dto.py deleted file mode 100644 index 79a1384dfb15df54584e2030a3fe14de5af16c57..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_roles_dto.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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 UserRolesDto(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 = { - 'roles': 'list[str]' - } - - attribute_map = { - 'roles': 'roles' - } - - def __init__(self, roles=None): # noqa: E501 - """UserRolesDto - a model defined in Swagger""" # noqa: E501 - self._roles = None - self.discriminator = None - self.roles = roles - - @property - def roles(self): - """Gets the roles of this UserRolesDto. # noqa: E501 - - - :return: The roles of this UserRolesDto. # noqa: E501 - :rtype: list[str] - """ - return self._roles - - @roles.setter - def roles(self, roles): - """Sets the roles of this UserRolesDto. - - - :param roles: The roles of this UserRolesDto. # noqa: E501 - :type: list[str] - """ - if roles is None: - raise ValueError("Invalid value for `roles`, must not be `None`") # noqa: E501 - allowed_values = ["researcher", "developer", "data_steward"] # noqa: E501 - if not set(roles).issubset(set(allowed_values)): - raise ValueError( - "Invalid values for `roles` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(roles) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - - self._roles = roles - - 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(UserRolesDto, 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, UserRolesDto): - 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/user_theme_set_dto.py b/swagger/api/api_authentication/models/user_theme_set_dto.py deleted file mode 100644 index 3735201576f28934bc7f4ac2c87a3b1b61a778b0..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_theme_set_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# 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 UserThemeSetDto(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 = { - 'theme_dark': 'bool' - } - - attribute_map = { - 'theme_dark': 'theme_dark' - } - - def __init__(self, theme_dark=None): # noqa: E501 - """UserThemeSetDto - a model defined in Swagger""" # noqa: E501 - self._theme_dark = None - self.discriminator = None - self.theme_dark = theme_dark - - @property - def theme_dark(self): - """Gets the theme_dark of this UserThemeSetDto. # noqa: E501 - - - :return: The theme_dark of this UserThemeSetDto. # noqa: E501 - :rtype: bool - """ - return self._theme_dark - - @theme_dark.setter - def theme_dark(self, theme_dark): - """Sets the theme_dark of this UserThemeSetDto. - - - :param theme_dark: The theme_dark of this UserThemeSetDto. # 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 - - 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(UserThemeSetDto, 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, UserThemeSetDto): - 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/user_update_dto.py b/swagger/api/api_authentication/models/user_update_dto.py deleted file mode 100644 index 24d66d8517df6bcb925bf669f6e2976a563472c5..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/user_update_dto.py +++ /dev/null @@ -1,240 +0,0 @@ -# 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 UserUpdateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'titles_before': 'str', - 'titles_after': 'str' - } - - attribute_map = { - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'titles_before': 'titles_before', - 'titles_after': 'titles_after' - } - - def __init__(self, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None): # noqa: E501 - """UserUpdateDto - a model defined in Swagger""" # noqa: E501 - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._titles_before = None - self._titles_after = None - self.discriminator = None - if firstname is not None: - self.firstname = firstname - 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 - - @property - def firstname(self): - """Gets the firstname of this UserUpdateDto. # noqa: E501 - - - :return: The firstname of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserUpdateDto. - - - :param firstname: The firstname of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this UserUpdateDto. # noqa: E501 - - - :return: The lastname of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserUpdateDto. - - - :param lastname: The lastname of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this UserUpdateDto. # noqa: E501 - - - :return: The affiliation of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this UserUpdateDto. - - - :param affiliation: The affiliation of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this UserUpdateDto. # noqa: E501 - - - :return: The orcid of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserUpdateDto. - - - :param orcid: The orcid of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def titles_before(self): - """Gets the titles_before of this UserUpdateDto. # noqa: E501 - - - :return: The titles_before of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._titles_before - - @titles_before.setter - def titles_before(self, titles_before): - """Sets the titles_before of this UserUpdateDto. - - - :param titles_before: The titles_before of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._titles_before = titles_before - - @property - def titles_after(self): - """Gets the titles_after of this UserUpdateDto. # noqa: E501 - - - :return: The titles_after of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._titles_after - - @titles_after.setter - def titles_after(self, titles_after): - """Sets the titles_after of this UserUpdateDto. - - - :param titles_after: The titles_after of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._titles_after = titles_after - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - 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(UserUpdateDto, 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, UserUpdateDto): - 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/view_brief_dto.py b/swagger/api/api_authentication/models/view_brief_dto.py deleted file mode 100644 index cc5435d4d89c55193343266ca59035235a0a57d9..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/models/view_brief_dto.py +++ /dev/null @@ -1,353 +0,0 @@ -# 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_authentication/rest.py b/swagger/api/api_authentication/rest.py deleted file mode 100644 index fc46df7c0293982201996d273d0d234057f987f0..0000000000000000000000000000000000000000 --- a/swagger/api/api_authentication/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_broker/BrokerServiceClient.py b/swagger/api/api_broker/BrokerServiceClient.py deleted file mode 100644 index 7f1d8ba49f2882390f05f397b4d0c0ea862cebe2..0000000000000000000000000000000000000000 --- a/swagger/api/api_broker/BrokerServiceClient.py +++ /dev/null @@ -1,25 +0,0 @@ -import json -from pika import BlockingConnection, ConnectionParameters -from pika.credentials import PlainCredentials - - -class BrokerServiceClient: - - def __init__(self, exchange, routing_key, host, username, password): - self.exchange = exchange - self.routing_key = routing_key - self.host = host - self.username = username - self.password = password - self.connection = BlockingConnection(ConnectionParameters(self.host, - credentials=PlainCredentials( - username=self.username, - password=self.password))) - - def send(self, payload): - channel = self.connection.channel() - print("... sending tuple {}".format(payload)) - channel.basic_publish(exchange=self.exchange, routing_key=self.routing_key, - body=bytes(payload, encoding='utf8')) - print("... sent tuple") - channel.close() diff --git a/swagger/api/api_broker/__init__.py b/swagger/api/api_broker/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/swagger/api/api_container/__init__.py b/swagger/api/api_container/__init__.py deleted file mode 100644 index 90a1b9142e8b8cff785423e525b1e7d49a402947..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/__init__.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_container.api.container_endpoint_api import ContainerEndpointApi -from api_container.api.image_endpoint_api import ImageEndpointApi -# import ApiClient -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.constraints import Constraints -from api_container.models.container import Container -from api_container.models.container_brief_dto import ContainerBriefDto -from api_container.models.container_change_dto import ContainerChangeDto -from api_container.models.container_create_request_dto import ContainerCreateRequestDto -from api_container.models.container_dto import ContainerDto -from api_container.models.container_image import ContainerImage -from api_container.models.container_image_date import ContainerImageDate -from api_container.models.container_image_environment_item import ContainerImageEnvironmentItem -from api_container.models.creator import Creator -from api_container.models.creator_brief_dto import CreatorBriefDto -from api_container.models.creator_dto import CreatorDto -from api_container.models.credential import Credential -from api_container.models.database import Database -from api_container.models.database_access_dto import DatabaseAccessDto -from api_container.models.database_brief_dto import DatabaseBriefDto -from api_container.models.database_dto import DatabaseDto -from api_container.models.foreign_key import ForeignKey -from api_container.models.foreign_key_reference import ForeignKeyReference -from api_container.models.identifier import Identifier -from api_container.models.identifier_brief_dto import IdentifierBriefDto -from api_container.models.identifier_dto import IdentifierDto -from api_container.models.image_brief_dto import ImageBriefDto -from api_container.models.image_change_dto import ImageChangeDto -from api_container.models.image_create_dto import ImageCreateDto -from api_container.models.image_date_dto import ImageDateDto -from api_container.models.image_dto import ImageDto -from api_container.models.image_env_item_dto import ImageEnvItemDto -from api_container.models.license import License -from api_container.models.license_dto import LicenseDto -from api_container.models.related_identifier import RelatedIdentifier -from api_container.models.related_identifier_dto import RelatedIdentifierDto -from api_container.models.role import Role -from api_container.models.table import Table -from api_container.models.table_brief_dto import TableBriefDto -from api_container.models.table_column import TableColumn -from api_container.models.table_column_concept import TableColumnConcept -from api_container.models.table_column_unit import TableColumnUnit -from api_container.models.unique import Unique -from api_container.models.user import User -from api_container.models.user_attribute import UserAttribute -from api_container.models.user_attribute_dto import UserAttributeDto -from api_container.models.user_brief_dto import UserBriefDto -from api_container.models.user_dto import UserDto -from api_container.models.view import View -from api_container.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_container/api/__init__.py b/swagger/api/api_container/api/__init__.py deleted file mode 100644 index 7810aa4adb6e794e46610086f52a7fb684e6dea9..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from swagger_client.api.container_endpoint_api import ContainerEndpointApi -from swagger_client.api.image_endpoint_api import ImageEndpointApi diff --git a/swagger/api/api_container/api/container_endpoint_api.py b/swagger/api/api_container/api/container_endpoint_api.py deleted file mode 100644 index fc3c0d65bff4ea999d6f265874633e171ef01ca9..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/api/container_endpoint_api.py +++ /dev/null @@ -1,510 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from swagger_client.api_client import ApiClient - - -class ContainerEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create1(self, body, **kwargs): # noqa: E501 - """Create container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create1(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ContainerCreateRequestDto body: (required) - :return: ContainerBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create1_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create1_with_http_info(body, **kwargs) # noqa: E501 - return data - - def create1_with_http_info(self, body, **kwargs): # noqa: E501 - """Create container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create1_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ContainerCreateRequestDto body: (required) - :return: ContainerBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ContainerBriefDto', # 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 delete1(self, id, **kwargs): # noqa: E501 - """Delete some container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete1(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete1_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.delete1_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete1_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete some container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete1_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all1(self, **kwargs): # noqa: E501 - """Find all containers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all1(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int limit: - :return: list[ContainerBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all1_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.find_all1_with_http_info(**kwargs) # noqa: E501 - return data - - def find_all1_with_http_info(self, **kwargs): # noqa: E501 - """Find all containers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all1_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int limit: - :return: list[ContainerBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['limit'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all1" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/container', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ContainerBriefDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_by_id1(self, id, **kwargs): # noqa: E501 - """Find some container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_by_id1(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: ContainerDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_by_id1_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find_by_id1_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find_by_id1_with_http_info(self, id, **kwargs): # noqa: E501 - """Find some container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_by_id1_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: ContainerDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_by_id1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find_by_id1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ContainerDto', # 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 modify(self, body, id, **kwargs): # noqa: E501 - """Modify some container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ContainerChangeDto body: (required) - :param int id: (required) - :return: ContainerBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.modify_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.modify_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def modify_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Modify some container # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ContainerChangeDto body: (required) - :param int id: (required) - :return: ContainerBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method modify" % 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 `modify`") # 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 `modify`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ContainerBriefDto', # 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_container/api/image_endpoint_api.py b/swagger/api/api_container/api/image_endpoint_api.py deleted file mode 100644 index 0e466e7aa2ad2963431a108eda66051d7bf9d1e3..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/api/image_endpoint_api.py +++ /dev/null @@ -1,506 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from swagger_client.api_client import ApiClient - - -class ImageEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, body, **kwargs): # noqa: E501 - """Create 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.create(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ImageCreateDto body: (required) - :return: ImageDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, **kwargs): # noqa: E501 - """Create 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.create_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ImageCreateDto body: (required) - :return: ImageDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/image', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ImageDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, **kwargs): # noqa: E501 - """Delete 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) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete some 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) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/image/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all(self, **kwargs): # noqa: E501 - """Find all images # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[ContainerImage] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.find_all_with_http_info(**kwargs) # noqa: E501 - return data - - def find_all_with_http_info(self, **kwargs): # noqa: E501 - """Find all images # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[ContainerImage] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/image', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ContainerImage]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_by_id(self, id, **kwargs): # noqa: E501 - """Find 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.find_by_id(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: ImageDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_by_id_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find_by_id_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find_by_id_with_http_info(self, id, **kwargs): # noqa: E501 - """Find 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.find_by_id_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: ImageDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_by_id" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find_by_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/image/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ImageDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update(self, body, id, **kwargs): # noqa: E501 - """Update some 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.update(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ImageChangeDto body: (required) - :param int id: (required) - :return: ImageDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update some 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.update_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ImageChangeDto body: (required) - :param int id: (required) - :return: ImageDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/image/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ImageDto', # 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_container/api_client.py b/swagger/api/api_container/api_client.py deleted file mode 100644 index aa09b0b677bbf40dd9c04ad704ff333ac966f825..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_container.configuration import Configuration -import api_container.models -from api_container import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_container.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_container/configuration.py b/swagger/api/api_container/configuration.py deleted file mode 100644 index 6d2b6c2479ae22b6418161d883bacbc676b69ebd..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9092" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("swagger_client") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_container/models/__init__.py b/swagger/api/api_container/models/__init__.py deleted file mode 100644 index fb5bfe35109838f995827602cfd1bc73ac1ab79c..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/__init__.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from api_container.models.api_error_dto import ApiErrorDto -from api_container.models.column_brief_dto import ColumnBriefDto -from api_container.models.constraints import Constraints -from api_container.models.container import Container -from api_container.models.container_brief_dto import ContainerBriefDto -from api_container.models.container_change_dto import ContainerChangeDto -from api_container.models.container_create_request_dto import ContainerCreateRequestDto -from api_container.models.container_dto import ContainerDto -from api_container.models.container_image import ContainerImage -from api_container.models.container_image_date import ContainerImageDate -from api_container.models.container_image_environment_item import ContainerImageEnvironmentItem -from api_container.models.creator import Creator -from api_container.models.creator_brief_dto import CreatorBriefDto -from api_container.models.creator_dto import CreatorDto -from api_container.models.credential import Credential -from api_container.models.database import Database -from api_container.models.database_access_dto import DatabaseAccessDto -from api_container.models.database_brief_dto import DatabaseBriefDto -from api_container.models.database_dto import DatabaseDto -from api_container.models.foreign_key import ForeignKey -from api_container.models.foreign_key_reference import ForeignKeyReference -from api_container.models.identifier import Identifier -from api_container.models.identifier_brief_dto import IdentifierBriefDto -from api_container.models.identifier_dto import IdentifierDto -from api_container.models.image_brief_dto import ImageBriefDto -from api_container.models.image_change_dto import ImageChangeDto -from api_container.models.image_create_dto import ImageCreateDto -from api_container.models.image_date_dto import ImageDateDto -from api_container.models.image_dto import ImageDto -from api_container.models.image_env_item_dto import ImageEnvItemDto -from api_container.models.license import License -from api_container.models.license_dto import LicenseDto -from api_container.models.related_identifier import RelatedIdentifier -from api_container.models.related_identifier_dto import RelatedIdentifierDto -from api_container.models.role import Role -from api_container.models.table import Table -from api_container.models.table_brief_dto import TableBriefDto -from api_container.models.table_column import TableColumn -from api_container.models.table_column_concept import TableColumnConcept -from api_container.models.table_column_unit import TableColumnUnit -from api_container.models.unique import Unique -from api_container.models.user import User -from api_container.models.user_attribute import UserAttribute -from api_container.models.user_attribute_dto import UserAttributeDto -from api_container.models.user_brief_dto import UserBriefDto -from api_container.models.user_dto import UserDto -from api_container.models.view import View -from api_container.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_container/models/api_error_dto.py b/swagger/api/api_container/models/api_error_dto.py deleted file mode 100644 index e22a8c60d95f4a8f0079fb03e49e3fd026934137..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/column_brief_dto.py b/swagger/api/api_container/models/column_brief_dto.py deleted file mode 100644 index 7d1a1a4b68fbabd1dd2ef590da24b3fb5c6befea..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/column_brief_dto.py +++ /dev/null @@ -1,252 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'database_id': 'int', - 'table_id': 'int', - 'internal_name': 'str', - 'column_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'database_id': 'database_id', - 'table_id': 'table_id', - 'internal_name': 'internal_name', - 'column_type': 'column_type' - } - - def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 - """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._database_id = None - self._table_id = None - self._internal_name = None - self._column_type = None - self.discriminator = None - self.id = id - self.name = name - self.database_id = database_id - self.table_id = table_id - self.internal_name = internal_name - self.column_type = column_type - - @property - def id(self): - """Gets the id of this ColumnBriefDto. # noqa: E501 - - - :return: The id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnBriefDto. - - - :param id: The id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this ColumnBriefDto. # noqa: E501 - - - :return: The name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnBriefDto. - - - :param name: The name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def database_id(self): - """Gets the database_id of this ColumnBriefDto. # noqa: E501 - - - :return: The database_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this ColumnBriefDto. - - - :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this ColumnBriefDto. # noqa: E501 - - - :return: The table_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this ColumnBriefDto. - - - :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def internal_name(self): - """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - - - :return: The internal_name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnBriefDto. - - - :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if internal_name is None: - raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - - self._internal_name = internal_name - - @property - def column_type(self): - """Gets the column_type of this ColumnBriefDto. # noqa: E501 - - - :return: The column_type of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnBriefDto. - - - :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if column_type is None: - raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ColumnBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ColumnBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/constraints.py b/swagger/api/api_container/models/constraints.py deleted file mode 100644 index b78bb7b305256d612b3ce8d26f5312876679e46f..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/constraints.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Constraints(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uniques': 'list[Unique]', - 'foreign_keys': 'list[ForeignKey]', - 'checks': 'list[str]' - } - - attribute_map = { - 'uniques': 'uniques', - 'foreign_keys': 'foreignKeys', - 'checks': 'checks' - } - - def __init__(self, uniques=None, foreign_keys=None, checks=None): # noqa: E501 - """Constraints - a model defined in Swagger""" # noqa: E501 - self._uniques = None - self._foreign_keys = None - self._checks = None - self.discriminator = None - if uniques is not None: - self.uniques = uniques - if foreign_keys is not None: - self.foreign_keys = foreign_keys - if checks is not None: - self.checks = checks - - @property - def uniques(self): - """Gets the uniques of this Constraints. # noqa: E501 - - - :return: The uniques of this Constraints. # noqa: E501 - :rtype: list[Unique] - """ - return self._uniques - - @uniques.setter - def uniques(self, uniques): - """Sets the uniques of this Constraints. - - - :param uniques: The uniques of this Constraints. # noqa: E501 - :type: list[Unique] - """ - - self._uniques = uniques - - @property - def foreign_keys(self): - """Gets the foreign_keys of this Constraints. # noqa: E501 - - - :return: The foreign_keys of this Constraints. # noqa: E501 - :rtype: list[ForeignKey] - """ - return self._foreign_keys - - @foreign_keys.setter - def foreign_keys(self, foreign_keys): - """Sets the foreign_keys of this Constraints. - - - :param foreign_keys: The foreign_keys of this Constraints. # noqa: E501 - :type: list[ForeignKey] - """ - - self._foreign_keys = foreign_keys - - @property - def checks(self): - """Gets the checks of this Constraints. # noqa: E501 - - - :return: The checks of this Constraints. # noqa: E501 - :rtype: list[str] - """ - return self._checks - - @checks.setter - def checks(self, checks): - """Sets the checks of this Constraints. - - - :param checks: The checks of this Constraints. # noqa: E501 - :type: list[str] - """ - - self._checks = checks - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Constraints, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Constraints): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/container.py b/swagger/api/api_container/models/container.py deleted file mode 100644 index 9a1ebac4f05de3ac9fef464b5593f38ebade52d9..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container.py +++ /dev/null @@ -1,474 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Container(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'created_by': 'str', - 'creator': 'User', - 'owned_by': 'str', - 'owner': 'User', - 'name': 'str', - 'internal_name': 'str', - 'hash': 'str', - 'image_id': 'int', - 'port': 'int', - 'database': 'Database', - 'image': 'ContainerImage', - 'ip_address': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'created_by': 'createdBy', - 'creator': 'creator', - 'owned_by': 'ownedBy', - 'owner': 'owner', - 'name': 'name', - 'internal_name': 'internalName', - 'hash': 'hash', - 'image_id': 'imageId', - 'port': 'port', - 'database': 'database', - 'image': 'image', - 'ip_address': 'ipAddress', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, created_by=None, creator=None, owned_by=None, owner=None, name=None, internal_name=None, hash=None, image_id=None, port=None, database=None, image=None, ip_address=None, created=None, last_modified=None): # noqa: E501 - """Container - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_by = None - self._creator = None - self._owned_by = None - self._owner = None - self._name = None - self._internal_name = None - self._hash = None - self._image_id = None - self._port = None - self._database = None - self._image = None - self._ip_address = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if created_by is not None: - self.created_by = created_by - if creator is not None: - self.creator = creator - if owned_by is not None: - self.owned_by = owned_by - if owner is not None: - self.owner = owner - if name is not None: - self.name = name - if internal_name is not None: - self.internal_name = internal_name - if hash is not None: - self.hash = hash - if image_id is not None: - self.image_id = image_id - if port is not None: - self.port = port - if database is not None: - self.database = database - if image is not None: - self.image = image - if ip_address is not None: - self.ip_address = ip_address - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this Container. # noqa: E501 - - - :return: The id of this Container. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Container. - - - :param id: The id of this Container. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def created_by(self): - """Gets the created_by of this Container. # noqa: E501 - - - :return: The created_by of this Container. # noqa: E501 - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this Container. - - - :param created_by: The created_by of this Container. # noqa: E501 - :type: str - """ - - self._created_by = created_by - - @property - def creator(self): - """Gets the creator of this Container. # noqa: E501 - - - :return: The creator of this Container. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this Container. - - - :param creator: The creator of this Container. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def owned_by(self): - """Gets the owned_by of this Container. # noqa: E501 - - - :return: The owned_by of this Container. # noqa: E501 - :rtype: str - """ - return self._owned_by - - @owned_by.setter - def owned_by(self, owned_by): - """Sets the owned_by of this Container. - - - :param owned_by: The owned_by of this Container. # noqa: E501 - :type: str - """ - - self._owned_by = owned_by - - @property - def owner(self): - """Gets the owner of this Container. # noqa: E501 - - - :return: The owner of this Container. # noqa: E501 - :rtype: User - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this Container. - - - :param owner: The owner of this Container. # noqa: E501 - :type: User - """ - - self._owner = owner - - @property - def name(self): - """Gets the name of this Container. # noqa: E501 - - - :return: The name of this Container. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Container. - - - :param name: The name of this Container. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def internal_name(self): - """Gets the internal_name of this Container. # noqa: E501 - - - :return: The internal_name of this Container. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this Container. - - - :param internal_name: The internal_name of this Container. # noqa: E501 - :type: str - """ - - self._internal_name = internal_name - - @property - def hash(self): - """Gets the hash of this Container. # noqa: E501 - - - :return: The hash of this Container. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this Container. - - - :param hash: The hash of this Container. # noqa: E501 - :type: str - """ - - self._hash = hash - - @property - def image_id(self): - """Gets the image_id of this Container. # noqa: E501 - - - :return: The image_id of this Container. # noqa: E501 - :rtype: int - """ - return self._image_id - - @image_id.setter - def image_id(self, image_id): - """Sets the image_id of this Container. - - - :param image_id: The image_id of this Container. # noqa: E501 - :type: int - """ - - self._image_id = image_id - - @property - def port(self): - """Gets the port of this Container. # noqa: E501 - - - :return: The port of this Container. # noqa: E501 - :rtype: int - """ - return self._port - - @port.setter - def port(self, port): - """Sets the port of this Container. - - - :param port: The port of this Container. # noqa: E501 - :type: int - """ - - self._port = port - - @property - def database(self): - """Gets the database of this Container. # noqa: E501 - - - :return: The database of this Container. # noqa: E501 - :rtype: Database - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this Container. - - - :param database: The database of this Container. # noqa: E501 - :type: Database - """ - - self._database = database - - @property - def image(self): - """Gets the image of this Container. # noqa: E501 - - - :return: The image of this Container. # noqa: E501 - :rtype: ContainerImage - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this Container. - - - :param image: The image of this Container. # noqa: E501 - :type: ContainerImage - """ - - self._image = image - - @property - def ip_address(self): - """Gets the ip_address of this Container. # noqa: E501 - - - :return: The ip_address of this Container. # noqa: E501 - :rtype: str - """ - return self._ip_address - - @ip_address.setter - def ip_address(self, ip_address): - """Sets the ip_address of this Container. - - - :param ip_address: The ip_address of this Container. # noqa: E501 - :type: str - """ - - self._ip_address = ip_address - - @property - def created(self): - """Gets the created of this Container. # noqa: E501 - - - :return: The created of this Container. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Container. - - - :param created: The created of this Container. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this Container. # noqa: E501 - - - :return: The last_modified of this Container. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this Container. - - - :param last_modified: The last_modified of this Container. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Container, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Container): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/container_brief_dto.py b/swagger/api/api_container/models/container_brief_dto.py deleted file mode 100644 index 648a44733f809a24cc85539bbdb47075254afc50..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_brief_dto.py +++ /dev/null @@ -1,298 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerBriefDto(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', - 'creator': 'UserBriefDto', - 'running': 'bool', - 'database': 'DatabaseBriefDto', - 'created': 'datetime', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'creator': 'creator', - 'running': 'running', - 'database': 'database', - 'created': 'created', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, hash=None, name=None, creator=None, running=None, database=None, created=None, internal_name=None): # noqa: E501 - """ContainerBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._hash = None - self._name = None - self._creator = None - self._running = None - self._database = None - self._created = None - self._internal_name = None - self.discriminator = None - self.id = id - self.hash = hash - self.name = name - self.creator = creator - self.running = running - if database is not None: - self.database = database - if created is not None: - self.created = created - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this ContainerBriefDto. # noqa: E501 - - - :return: The id of this ContainerBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ContainerBriefDto. - - - :param id: The id of this ContainerBriefDto. # 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 ContainerBriefDto. # noqa: E501 - - - :return: The hash of this ContainerBriefDto. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this ContainerBriefDto. - - - :param hash: The hash of this ContainerBriefDto. # 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 ContainerBriefDto. # noqa: E501 - - - :return: The name of this ContainerBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ContainerBriefDto. - - - :param name: The name of this ContainerBriefDto. # 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 creator(self): - """Gets the creator of this ContainerBriefDto. # noqa: E501 - - - :return: The creator of this ContainerBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this ContainerBriefDto. - - - :param creator: The creator of this ContainerBriefDto. # 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 running(self): - """Gets the running of this ContainerBriefDto. # noqa: E501 - - - :return: The running of this ContainerBriefDto. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this ContainerBriefDto. - - - :param running: The running of this ContainerBriefDto. # noqa: E501 - :type: bool - """ - if running is None: - raise ValueError("Invalid value for `running`, must not be `None`") # noqa: E501 - - self._running = running - - @property - def database(self): - """Gets the database of this ContainerBriefDto. # noqa: E501 - - - :return: The database of this ContainerBriefDto. # noqa: E501 - :rtype: DatabaseBriefDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerBriefDto. - - - :param database: The database of this ContainerBriefDto. # noqa: E501 - :type: DatabaseBriefDto - """ - - self._database = database - - @property - def created(self): - """Gets the created of this ContainerBriefDto. # noqa: E501 - - - :return: The created of this ContainerBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ContainerBriefDto. - - - :param created: The created of this ContainerBriefDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def internal_name(self): - """Gets the internal_name of this ContainerBriefDto. # noqa: E501 - - - :return: The internal_name of this ContainerBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ContainerBriefDto. - - - :param internal_name: The internal_name of this ContainerBriefDto. # 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 - - 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(ContainerBriefDto, 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, ContainerBriefDto): - 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_change_dto.py b/swagger/api/api_container/models/container_change_dto.py deleted file mode 100644 index 83749a1fb7ecc8a0756bf4ae189bc48cd755f8ee..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_change_dto.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerChangeDto(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 = { - 'action': 'str' - } - - attribute_map = { - 'action': 'action' - } - - def __init__(self, action=None): # noqa: E501 - """ContainerChangeDto - a model defined in Swagger""" # noqa: E501 - self._action = None - self.discriminator = None - self.action = action - - @property - def action(self): - """Gets the action of this ContainerChangeDto. # noqa: E501 - - - :return: The action of this ContainerChangeDto. # noqa: E501 - :rtype: str - """ - return self._action - - @action.setter - def action(self, action): - """Sets the action of this ContainerChangeDto. - - - :param action: The action of this ContainerChangeDto. # noqa: E501 - :type: str - """ - if action is None: - raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 - allowed_values = ["start", "stop"] # noqa: E501 - if action not in allowed_values: - raise ValueError( - "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 - .format(action, allowed_values) - ) - - self._action = action - - 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(ContainerChangeDto, 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, ContainerChangeDto): - 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_create_request_dto.py b/swagger/api/api_container/models/container_create_request_dto.py deleted file mode 100644 index 954168415dcb06514035247c59baf03e33a550aa..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_create_request_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerCreateRequestDto(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', - 'repository': 'str', - 'tag': 'str' - } - - attribute_map = { - 'name': 'name', - 'repository': 'repository', - 'tag': 'tag' - } - - def __init__(self, name=None, repository=None, tag=None): # noqa: E501 - """ContainerCreateRequestDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._repository = None - self._tag = None - self.discriminator = None - self.name = name - self.repository = repository - self.tag = tag - - @property - def name(self): - """Gets the name of this ContainerCreateRequestDto. # noqa: E501 - - - :return: The name of this ContainerCreateRequestDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ContainerCreateRequestDto. - - - :param name: The name of this ContainerCreateRequestDto. # 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 repository(self): - """Gets the repository of this ContainerCreateRequestDto. # noqa: E501 - - - :return: The repository of this ContainerCreateRequestDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ContainerCreateRequestDto. - - - :param repository: The repository of this ContainerCreateRequestDto. # 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 ContainerCreateRequestDto. # noqa: E501 - - - :return: The tag of this ContainerCreateRequestDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ContainerCreateRequestDto. - - - :param tag: The tag of this ContainerCreateRequestDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ContainerCreateRequestDto, 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, ContainerCreateRequestDto): - 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 deleted file mode 100644 index d62a8eeb5035b9ec402d0180e60ac223a4f7717b..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_dto.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'database': 'DatabaseDto', - 'running': 'bool', - 'image': 'ImageBriefDto', - 'port': 'int', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - 'database': 'database', - 'running': 'running', - '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, running=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 - self._name = None - self._state = None - self._database = None - self._running = None - self._image = None - self._port = None - self._owner = 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 database is not None: - self.database = database - self.running = running - if image is not None: - 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: - 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 database(self): - """Gets the database of this ContainerDto. # noqa: E501 - - - :return: The database of this ContainerDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerDto. - - - :param database: The database of this ContainerDto. # noqa: E501 - :type: DatabaseDto - """ - - self._database = database - - @property - def running(self): - """Gets the running of this ContainerDto. # noqa: E501 - - - :return: The running of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this ContainerDto. - - - :param running: The running of this ContainerDto. # noqa: E501 - :type: bool - """ - if running is None: - raise ValueError("Invalid value for `running`, must not be `None`") # noqa: E501 - - self._running = running - - @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 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 - - - :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_container/models/container_image.py b/swagger/api/api_container/models/container_image.py deleted file mode 100644 index d6291d303e8b15e66220283832db454dad6d7f82..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_image.py +++ /dev/null @@ -1,500 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerImage(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'repository': 'str', - 'registry': 'str', - 'tag': 'str', - 'driver_class': 'str', - 'dialect': 'str', - 'jdbc_method': 'str', - 'hash': 'str', - 'compiled': 'datetime', - 'size': 'int', - 'default_port': 'int', - 'environment': 'list[ContainerImageEnvironmentItem]', - 'date_formats': 'list[ContainerImageDate]', - 'containers': 'list[Container]', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'repository': 'repository', - 'registry': 'registry', - 'tag': 'tag', - 'driver_class': 'driverClass', - 'dialect': 'dialect', - 'jdbc_method': 'jdbcMethod', - 'hash': 'hash', - 'compiled': 'compiled', - 'size': 'size', - 'default_port': 'defaultPort', - 'environment': 'environment', - 'date_formats': 'dateFormats', - 'containers': 'containers', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, repository=None, registry=None, tag=None, driver_class=None, dialect=None, jdbc_method=None, hash=None, compiled=None, size=None, default_port=None, environment=None, date_formats=None, containers=None, created=None, last_modified=None): # noqa: E501 - """ContainerImage - a model defined in Swagger""" # noqa: E501 - self._id = None - self._repository = None - self._registry = None - self._tag = None - self._driver_class = None - self._dialect = None - self._jdbc_method = None - self._hash = None - self._compiled = None - self._size = None - self._default_port = None - self._environment = None - self._date_formats = None - self._containers = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if repository is not None: - self.repository = repository - if registry is not None: - self.registry = registry - if tag is not None: - self.tag = tag - if driver_class is not None: - self.driver_class = driver_class - if dialect is not None: - self.dialect = dialect - if jdbc_method is not None: - self.jdbc_method = jdbc_method - if hash is not None: - self.hash = hash - if compiled is not None: - self.compiled = compiled - if size is not None: - self.size = size - if default_port is not None: - self.default_port = default_port - if environment is not None: - self.environment = environment - if date_formats is not None: - self.date_formats = date_formats - if containers is not None: - self.containers = containers - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this ContainerImage. # noqa: E501 - - - :return: The id of this ContainerImage. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ContainerImage. - - - :param id: The id of this ContainerImage. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def repository(self): - """Gets the repository of this ContainerImage. # noqa: E501 - - - :return: The repository of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ContainerImage. - - - :param repository: The repository of this ContainerImage. # noqa: E501 - :type: str - """ - - self._repository = repository - - @property - def registry(self): - """Gets the registry of this ContainerImage. # noqa: E501 - - - :return: The registry of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ContainerImage. - - - :param registry: The registry of this ContainerImage. # noqa: E501 - :type: str - """ - - self._registry = registry - - @property - def tag(self): - """Gets the tag of this ContainerImage. # noqa: E501 - - - :return: The tag of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ContainerImage. - - - :param tag: The tag of this ContainerImage. # noqa: E501 - :type: str - """ - - self._tag = tag - - @property - def driver_class(self): - """Gets the driver_class of this ContainerImage. # noqa: E501 - - - :return: The driver_class of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._driver_class - - @driver_class.setter - def driver_class(self, driver_class): - """Sets the driver_class of this ContainerImage. - - - :param driver_class: The driver_class of this ContainerImage. # noqa: E501 - :type: str - """ - - self._driver_class = driver_class - - @property - def dialect(self): - """Gets the dialect of this ContainerImage. # noqa: E501 - - - :return: The dialect of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._dialect - - @dialect.setter - def dialect(self, dialect): - """Sets the dialect of this ContainerImage. - - - :param dialect: The dialect of this ContainerImage. # noqa: E501 - :type: str - """ - - self._dialect = dialect - - @property - def jdbc_method(self): - """Gets the jdbc_method of this ContainerImage. # noqa: E501 - - - :return: The jdbc_method of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._jdbc_method - - @jdbc_method.setter - def jdbc_method(self, jdbc_method): - """Sets the jdbc_method of this ContainerImage. - - - :param jdbc_method: The jdbc_method of this ContainerImage. # noqa: E501 - :type: str - """ - - self._jdbc_method = jdbc_method - - @property - def hash(self): - """Gets the hash of this ContainerImage. # noqa: E501 - - - :return: The hash of this ContainerImage. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this ContainerImage. - - - :param hash: The hash of this ContainerImage. # noqa: E501 - :type: str - """ - - self._hash = hash - - @property - def compiled(self): - """Gets the compiled of this ContainerImage. # noqa: E501 - - - :return: The compiled of this ContainerImage. # noqa: E501 - :rtype: datetime - """ - return self._compiled - - @compiled.setter - def compiled(self, compiled): - """Sets the compiled of this ContainerImage. - - - :param compiled: The compiled of this ContainerImage. # noqa: E501 - :type: datetime - """ - - self._compiled = compiled - - @property - def size(self): - """Gets the size of this ContainerImage. # noqa: E501 - - - :return: The size of this ContainerImage. # noqa: E501 - :rtype: int - """ - return self._size - - @size.setter - def size(self, size): - """Sets the size of this ContainerImage. - - - :param size: The size of this ContainerImage. # noqa: E501 - :type: int - """ - - self._size = size - - @property - def default_port(self): - """Gets the default_port of this ContainerImage. # noqa: E501 - - - :return: The default_port of this ContainerImage. # noqa: E501 - :rtype: int - """ - return self._default_port - - @default_port.setter - def default_port(self, default_port): - """Sets the default_port of this ContainerImage. - - - :param default_port: The default_port of this ContainerImage. # noqa: E501 - :type: int - """ - - self._default_port = default_port - - @property - def environment(self): - """Gets the environment of this ContainerImage. # noqa: E501 - - - :return: The environment of this ContainerImage. # noqa: E501 - :rtype: list[ContainerImageEnvironmentItem] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ContainerImage. - - - :param environment: The environment of this ContainerImage. # noqa: E501 - :type: list[ContainerImageEnvironmentItem] - """ - - self._environment = environment - - @property - def date_formats(self): - """Gets the date_formats of this ContainerImage. # noqa: E501 - - - :return: The date_formats of this ContainerImage. # noqa: E501 - :rtype: list[ContainerImageDate] - """ - return self._date_formats - - @date_formats.setter - def date_formats(self, date_formats): - """Sets the date_formats of this ContainerImage. - - - :param date_formats: The date_formats of this ContainerImage. # noqa: E501 - :type: list[ContainerImageDate] - """ - - self._date_formats = date_formats - - @property - def containers(self): - """Gets the containers of this ContainerImage. # noqa: E501 - - - :return: The containers of this ContainerImage. # noqa: E501 - :rtype: list[Container] - """ - return self._containers - - @containers.setter - def containers(self, containers): - """Sets the containers of this ContainerImage. - - - :param containers: The containers of this ContainerImage. # noqa: E501 - :type: list[Container] - """ - - self._containers = containers - - @property - def created(self): - """Gets the created of this ContainerImage. # noqa: E501 - - - :return: The created of this ContainerImage. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ContainerImage. - - - :param created: The created of this ContainerImage. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this ContainerImage. # noqa: E501 - - - :return: The last_modified of this ContainerImage. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this ContainerImage. - - - :param last_modified: The last_modified of this ContainerImage. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ContainerImage, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ContainerImage): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/container_image_date.py b/swagger/api/api_container/models/container_image_date.py deleted file mode 100644 index 45fc8ac3b96619312b23fbfb0f801f983c887487..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_image_date.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerImageDate(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'iid': 'int', - 'image': 'ContainerImage', - 'example': 'str', - 'has_time': 'bool', - 'database_format': 'str', - 'unix_format': 'str', - 'created_at': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'iid': 'iid', - 'image': 'image', - 'example': 'example', - 'has_time': 'hasTime', - 'database_format': 'databaseFormat', - 'unix_format': 'unixFormat', - 'created_at': 'createdAt' - } - - def __init__(self, id=None, iid=None, image=None, example=None, has_time=None, database_format=None, unix_format=None, created_at=None): # noqa: E501 - """ContainerImageDate - a model defined in Swagger""" # noqa: E501 - self._id = None - self._iid = None - self._image = None - self._example = None - self._has_time = None - self._database_format = None - self._unix_format = None - self._created_at = None - self.discriminator = None - if id is not None: - self.id = id - if iid is not None: - self.iid = iid - if image is not None: - self.image = image - if example is not None: - self.example = example - if has_time is not None: - self.has_time = has_time - if database_format is not None: - self.database_format = database_format - if unix_format is not None: - self.unix_format = unix_format - if created_at is not None: - self.created_at = created_at - - @property - def id(self): - """Gets the id of this ContainerImageDate. # noqa: E501 - - - :return: The id of this ContainerImageDate. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ContainerImageDate. - - - :param id: The id of this ContainerImageDate. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def iid(self): - """Gets the iid of this ContainerImageDate. # noqa: E501 - - - :return: The iid of this ContainerImageDate. # noqa: E501 - :rtype: int - """ - return self._iid - - @iid.setter - def iid(self, iid): - """Sets the iid of this ContainerImageDate. - - - :param iid: The iid of this ContainerImageDate. # noqa: E501 - :type: int - """ - - self._iid = iid - - @property - def image(self): - """Gets the image of this ContainerImageDate. # noqa: E501 - - - :return: The image of this ContainerImageDate. # noqa: E501 - :rtype: ContainerImage - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this ContainerImageDate. - - - :param image: The image of this ContainerImageDate. # noqa: E501 - :type: ContainerImage - """ - - self._image = image - - @property - def example(self): - """Gets the example of this ContainerImageDate. # noqa: E501 - - - :return: The example of this ContainerImageDate. # noqa: E501 - :rtype: str - """ - return self._example - - @example.setter - def example(self, example): - """Sets the example of this ContainerImageDate. - - - :param example: The example of this ContainerImageDate. # noqa: E501 - :type: str - """ - - self._example = example - - @property - def has_time(self): - """Gets the has_time of this ContainerImageDate. # noqa: E501 - - - :return: The has_time of this ContainerImageDate. # noqa: E501 - :rtype: bool - """ - return self._has_time - - @has_time.setter - def has_time(self, has_time): - """Sets the has_time of this ContainerImageDate. - - - :param has_time: The has_time of this ContainerImageDate. # noqa: E501 - :type: bool - """ - - self._has_time = has_time - - @property - def database_format(self): - """Gets the database_format of this ContainerImageDate. # noqa: E501 - - - :return: The database_format of this ContainerImageDate. # noqa: E501 - :rtype: str - """ - return self._database_format - - @database_format.setter - def database_format(self, database_format): - """Sets the database_format of this ContainerImageDate. - - - :param database_format: The database_format of this ContainerImageDate. # noqa: E501 - :type: str - """ - - self._database_format = database_format - - @property - def unix_format(self): - """Gets the unix_format of this ContainerImageDate. # noqa: E501 - - - :return: The unix_format of this ContainerImageDate. # noqa: E501 - :rtype: str - """ - return self._unix_format - - @unix_format.setter - def unix_format(self, unix_format): - """Sets the unix_format of this ContainerImageDate. - - - :param unix_format: The unix_format of this ContainerImageDate. # noqa: E501 - :type: str - """ - - self._unix_format = unix_format - - @property - def created_at(self): - """Gets the created_at of this ContainerImageDate. # noqa: E501 - - - :return: The created_at of this ContainerImageDate. # noqa: E501 - :rtype: datetime - """ - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Sets the created_at of this ContainerImageDate. - - - :param created_at: The created_at of this ContainerImageDate. # noqa: E501 - :type: datetime - """ - - self._created_at = created_at - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ContainerImageDate, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ContainerImageDate): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/container_image_environment_item.py b/swagger/api/api_container/models/container_image_environment_item.py deleted file mode 100644 index ce7e88c8fe13166906f1512c757cd16518f58625..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/container_image_environment_item.py +++ /dev/null @@ -1,298 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerImageEnvironmentItem(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'iid': 'int', - 'key': 'str', - 'value': 'str', - 'type': 'str', - 'image': 'ContainerImage', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'iid': 'iid', - 'key': 'key', - 'value': 'value', - 'type': 'type', - 'image': 'image', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, iid=None, key=None, value=None, type=None, image=None, created=None, last_modified=None): # noqa: E501 - """ContainerImageEnvironmentItem - a model defined in Swagger""" # noqa: E501 - self._id = None - self._iid = None - self._key = None - self._value = None - self._type = None - self._image = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if iid is not None: - self.iid = iid - if key is not None: - self.key = key - if value is not None: - self.value = value - if type is not None: - self.type = type - if image is not None: - self.image = image - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The id of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ContainerImageEnvironmentItem. - - - :param id: The id of this ContainerImageEnvironmentItem. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def iid(self): - """Gets the iid of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The iid of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: int - """ - return self._iid - - @iid.setter - def iid(self, iid): - """Sets the iid of this ContainerImageEnvironmentItem. - - - :param iid: The iid of this ContainerImageEnvironmentItem. # noqa: E501 - :type: int - """ - - self._iid = iid - - @property - def key(self): - """Gets the key of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The key of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: str - """ - return self._key - - @key.setter - def key(self, key): - """Sets the key of this ContainerImageEnvironmentItem. - - - :param key: The key of this ContainerImageEnvironmentItem. # noqa: E501 - :type: str - """ - - self._key = key - - @property - def value(self): - """Gets the value of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The value of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this ContainerImageEnvironmentItem. - - - :param value: The value of this ContainerImageEnvironmentItem. # noqa: E501 - :type: str - """ - - self._value = value - - @property - def type(self): - """Gets the type of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The type of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ContainerImageEnvironmentItem. - - - :param type: The type of this ContainerImageEnvironmentItem. # noqa: E501 - :type: str - """ - allowed_values = ["USERNAME", "PASSWORD", "PRIVILEGED_USERNAME", "PRIVILEGED_PASSWORD"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def image(self): - """Gets the image of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The image of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: ContainerImage - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this ContainerImageEnvironmentItem. - - - :param image: The image of this ContainerImageEnvironmentItem. # noqa: E501 - :type: ContainerImage - """ - - self._image = image - - @property - def created(self): - """Gets the created of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The created of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ContainerImageEnvironmentItem. - - - :param created: The created of this ContainerImageEnvironmentItem. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this ContainerImageEnvironmentItem. # noqa: E501 - - - :return: The last_modified of this ContainerImageEnvironmentItem. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this ContainerImageEnvironmentItem. - - - :param last_modified: The last_modified of this ContainerImageEnvironmentItem. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ContainerImageEnvironmentItem, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ContainerImageEnvironmentItem): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/creator.py b/swagger/api/api_container/models/creator.py deleted file mode 100644 index ba0c726b493a01a7b77cbfd786a7f8f7e3b05465..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/creator.py +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Creator(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'pid': 'int', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'identifier': 'Identifier', - 'created': 'datetime', - 'creator': 'User', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'pid': 'pid', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'identifier': 'identifier', - 'created': 'created', - 'creator': 'creator', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, pid=None, firstname=None, lastname=None, affiliation=None, orcid=None, identifier=None, created=None, creator=None, last_modified=None): # noqa: E501 - """Creator - a model defined in Swagger""" # noqa: E501 - self._id = None - self._pid = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._identifier = None - self._created = None - self._creator = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if pid is not None: - self.pid = pid - if firstname is not None: - self.firstname = firstname - if lastname is not None: - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - if identifier is not None: - self.identifier = identifier - if created is not None: - self.created = created - if creator is not None: - self.creator = creator - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this Creator. # noqa: E501 - - - :return: The id of this Creator. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Creator. - - - :param id: The id of this Creator. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def pid(self): - """Gets the pid of this Creator. # noqa: E501 - - - :return: The pid of this Creator. # noqa: E501 - :rtype: int - """ - return self._pid - - @pid.setter - def pid(self, pid): - """Sets the pid of this Creator. - - - :param pid: The pid of this Creator. # noqa: E501 - :type: int - """ - - self._pid = pid - - @property - def firstname(self): - """Gets the firstname of this Creator. # noqa: E501 - - - :return: The firstname of this Creator. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this Creator. - - - :param firstname: The firstname of this Creator. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this Creator. # noqa: E501 - - - :return: The lastname of this Creator. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this Creator. - - - :param lastname: The lastname of this Creator. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this Creator. # noqa: E501 - - - :return: The affiliation of this Creator. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this Creator. - - - :param affiliation: The affiliation of this Creator. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this Creator. # noqa: E501 - - - :return: The orcid of this Creator. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this Creator. - - - :param orcid: The orcid of this Creator. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def identifier(self): - """Gets the identifier of this Creator. # noqa: E501 - - - :return: The identifier of this Creator. # noqa: E501 - :rtype: Identifier - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this Creator. - - - :param identifier: The identifier of this Creator. # noqa: E501 - :type: Identifier - """ - - self._identifier = identifier - - @property - def created(self): - """Gets the created of this Creator. # noqa: E501 - - - :return: The created of this Creator. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Creator. - - - :param created: The created of this Creator. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def creator(self): - """Gets the creator of this Creator. # noqa: E501 - - - :return: The creator of this Creator. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this Creator. - - - :param creator: The creator of this Creator. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def last_modified(self): - """Gets the last_modified of this Creator. # noqa: E501 - - - :return: The last_modified of this Creator. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this Creator. - - - :param last_modified: The last_modified of this Creator. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Creator, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Creator): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/creator_brief_dto.py b/swagger/api/api_container/models/creator_brief_dto.py deleted file mode 100644 index 1aedb2d652f7b7cd8544afcb265dc0bebce2b8e3..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/creator_brief_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str' - } - - attribute_map = { - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation' - } - - def __init__(self, firstname=None, lastname=None, affiliation=None): # noqa: E501 - """CreatorBriefDto - a model defined in Swagger""" # noqa: E501 - self._firstname = None - self._lastname = None - self._affiliation = None - self.discriminator = None - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - - @property - def firstname(self): - """Gets the firstname of this CreatorBriefDto. # noqa: E501 - - - :return: The firstname of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorBriefDto. - - - :param firstname: The firstname of this CreatorBriefDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorBriefDto. # noqa: E501 - - - :return: The lastname of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorBriefDto. - - - :param lastname: The lastname of this CreatorBriefDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorBriefDto. # noqa: E501 - - - :return: The affiliation of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorBriefDto. - - - :param affiliation: The affiliation of this CreatorBriefDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CreatorBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatorBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/creator_dto.py b/swagger/api/api_container/models/creator_dto.py deleted file mode 100644 index 57e8c6bc25f4d56ec623a0d5a68e065ba03ed6ac..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/creator_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(CreatorDto, 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, CreatorDto): - 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/credential.py b/swagger/api/api_container/models/credential.py deleted file mode 100644 index 57ed256f019690412d8768faab7bbc901858c836..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/credential.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Credential(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'type': 'str', - 'user_id': 'str', - 'created_date': 'int', - 'secret_data': 'str', - 'credential_data': 'str', - 'priority': 'int', - 'user': 'User' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'user_id': 'userId', - 'created_date': 'createdDate', - 'secret_data': 'secretData', - 'credential_data': 'credentialData', - 'priority': 'priority', - 'user': 'user' - } - - def __init__(self, id=None, type=None, user_id=None, created_date=None, secret_data=None, credential_data=None, priority=None, user=None): # noqa: E501 - """Credential - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._user_id = None - self._created_date = None - self._secret_data = None - self._credential_data = None - self._priority = None - self._user = None - self.discriminator = None - if id is not None: - self.id = id - if type is not None: - self.type = type - if user_id is not None: - self.user_id = user_id - if created_date is not None: - self.created_date = created_date - if secret_data is not None: - self.secret_data = secret_data - if credential_data is not None: - self.credential_data = credential_data - if priority is not None: - self.priority = priority - if user is not None: - self.user = user - - @property - def id(self): - """Gets the id of this Credential. # noqa: E501 - - - :return: The id of this Credential. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Credential. - - - :param id: The id of this Credential. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def type(self): - """Gets the type of this Credential. # noqa: E501 - - - :return: The type of this Credential. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Credential. - - - :param type: The type of this Credential. # noqa: E501 - :type: str - """ - - self._type = type - - @property - def user_id(self): - """Gets the user_id of this Credential. # noqa: E501 - - - :return: The user_id of this Credential. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this Credential. - - - :param user_id: The user_id of this Credential. # noqa: E501 - :type: str - """ - - self._user_id = user_id - - @property - def created_date(self): - """Gets the created_date of this Credential. # noqa: E501 - - - :return: The created_date of this Credential. # noqa: E501 - :rtype: int - """ - return self._created_date - - @created_date.setter - def created_date(self, created_date): - """Sets the created_date of this Credential. - - - :param created_date: The created_date of this Credential. # noqa: E501 - :type: int - """ - - self._created_date = created_date - - @property - def secret_data(self): - """Gets the secret_data of this Credential. # noqa: E501 - - - :return: The secret_data of this Credential. # noqa: E501 - :rtype: str - """ - return self._secret_data - - @secret_data.setter - def secret_data(self, secret_data): - """Sets the secret_data of this Credential. - - - :param secret_data: The secret_data of this Credential. # noqa: E501 - :type: str - """ - - self._secret_data = secret_data - - @property - def credential_data(self): - """Gets the credential_data of this Credential. # noqa: E501 - - - :return: The credential_data of this Credential. # noqa: E501 - :rtype: str - """ - return self._credential_data - - @credential_data.setter - def credential_data(self, credential_data): - """Sets the credential_data of this Credential. - - - :param credential_data: The credential_data of this Credential. # noqa: E501 - :type: str - """ - - self._credential_data = credential_data - - @property - def priority(self): - """Gets the priority of this Credential. # noqa: E501 - - - :return: The priority of this Credential. # noqa: E501 - :rtype: int - """ - return self._priority - - @priority.setter - def priority(self, priority): - """Sets the priority of this Credential. - - - :param priority: The priority of this Credential. # noqa: E501 - :type: int - """ - - self._priority = priority - - @property - def user(self): - """Gets the user of this Credential. # noqa: E501 - - - :return: The user of this Credential. # noqa: E501 - :rtype: User - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this Credential. - - - :param user: The user of this Credential. # noqa: E501 - :type: User - """ - - self._user = user - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Credential, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Credential): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/database.py b/swagger/api/api_container/models/database.py deleted file mode 100644 index e1d36089614fbf672de93c3565677fcd4140f92e..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/database.py +++ /dev/null @@ -1,552 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Database(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'created_by': 'str', - 'creator': 'User', - 'owned_by': 'str', - 'owner': 'User', - 'container': 'Container', - 'name': 'str', - 'internal_name': 'str', - 'exchange_name': 'str', - 'description': 'str', - 'contact_person': 'str', - 'contact': 'User', - 'identifier': 'Identifier', - 'tables': 'list[Table]', - 'views': 'list[View]', - 'is_public': 'bool', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'created_by': 'createdBy', - 'creator': 'creator', - 'owned_by': 'ownedBy', - 'owner': 'owner', - 'container': 'container', - 'name': 'name', - 'internal_name': 'internalName', - 'exchange_name': 'exchangeName', - 'description': 'description', - 'contact_person': 'contactPerson', - 'contact': 'contact', - 'identifier': 'identifier', - 'tables': 'tables', - 'views': 'views', - 'is_public': 'isPublic', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, created_by=None, creator=None, owned_by=None, owner=None, container=None, name=None, internal_name=None, exchange_name=None, description=None, contact_person=None, contact=None, identifier=None, tables=None, views=None, is_public=None, created=None, last_modified=None): # noqa: E501 - """Database - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_by = None - self._creator = None - self._owned_by = None - self._owner = None - self._container = None - self._name = None - self._internal_name = None - self._exchange_name = None - self._description = None - self._contact_person = None - self._contact = None - self._identifier = None - self._tables = None - self._views = None - self._is_public = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if created_by is not None: - self.created_by = created_by - if creator is not None: - self.creator = creator - if owned_by is not None: - self.owned_by = owned_by - if owner is not None: - self.owner = owner - if container is not None: - self.container = container - if name is not None: - self.name = name - if internal_name is not None: - self.internal_name = internal_name - if exchange_name is not None: - self.exchange_name = exchange_name - if description is not None: - self.description = description - if contact_person is not None: - self.contact_person = contact_person - if contact is not None: - self.contact = contact - if identifier is not None: - self.identifier = identifier - if tables is not None: - self.tables = tables - if views is not None: - self.views = views - if is_public is not None: - self.is_public = is_public - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this Database. # noqa: E501 - - - :return: The id of this Database. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Database. - - - :param id: The id of this Database. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def created_by(self): - """Gets the created_by of this Database. # noqa: E501 - - - :return: The created_by of this Database. # noqa: E501 - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this Database. - - - :param created_by: The created_by of this Database. # noqa: E501 - :type: str - """ - - self._created_by = created_by - - @property - def creator(self): - """Gets the creator of this Database. # noqa: E501 - - - :return: The creator of this Database. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this Database. - - - :param creator: The creator of this Database. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def owned_by(self): - """Gets the owned_by of this Database. # noqa: E501 - - - :return: The owned_by of this Database. # noqa: E501 - :rtype: str - """ - return self._owned_by - - @owned_by.setter - def owned_by(self, owned_by): - """Sets the owned_by of this Database. - - - :param owned_by: The owned_by of this Database. # noqa: E501 - :type: str - """ - - self._owned_by = owned_by - - @property - def owner(self): - """Gets the owner of this Database. # noqa: E501 - - - :return: The owner of this Database. # noqa: E501 - :rtype: User - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this Database. - - - :param owner: The owner of this Database. # noqa: E501 - :type: User - """ - - self._owner = owner - - @property - def container(self): - """Gets the container of this Database. # noqa: E501 - - - :return: The container of this Database. # noqa: E501 - :rtype: Container - """ - return self._container - - @container.setter - def container(self, container): - """Sets the container of this Database. - - - :param container: The container of this Database. # noqa: E501 - :type: Container - """ - - self._container = container - - @property - def name(self): - """Gets the name of this Database. # noqa: E501 - - - :return: The name of this Database. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Database. - - - :param name: The name of this Database. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def internal_name(self): - """Gets the internal_name of this Database. # noqa: E501 - - - :return: The internal_name of this Database. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this Database. - - - :param internal_name: The internal_name of this Database. # noqa: E501 - :type: str - """ - - self._internal_name = internal_name - - @property - def exchange_name(self): - """Gets the exchange_name of this Database. # noqa: E501 - - - :return: The exchange_name of this Database. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this Database. - - - :param exchange_name: The exchange_name of this Database. # noqa: E501 - :type: str - """ - - self._exchange_name = exchange_name - - @property - def description(self): - """Gets the description of this Database. # noqa: E501 - - - :return: The description of this Database. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Database. - - - :param description: The description of this Database. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def contact_person(self): - """Gets the contact_person of this Database. # noqa: E501 - - - :return: The contact_person of this Database. # noqa: E501 - :rtype: str - """ - return self._contact_person - - @contact_person.setter - def contact_person(self, contact_person): - """Sets the contact_person of this Database. - - - :param contact_person: The contact_person of this Database. # noqa: E501 - :type: str - """ - - self._contact_person = contact_person - - @property - def contact(self): - """Gets the contact of this Database. # noqa: E501 - - - :return: The contact of this Database. # noqa: E501 - :rtype: User - """ - return self._contact - - @contact.setter - def contact(self, contact): - """Sets the contact of this Database. - - - :param contact: The contact of this Database. # noqa: E501 - :type: User - """ - - self._contact = contact - - @property - def identifier(self): - """Gets the identifier of this Database. # noqa: E501 - - - :return: The identifier of this Database. # noqa: E501 - :rtype: Identifier - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this Database. - - - :param identifier: The identifier of this Database. # noqa: E501 - :type: Identifier - """ - - self._identifier = identifier - - @property - def tables(self): - """Gets the tables of this Database. # noqa: E501 - - - :return: The tables of this Database. # noqa: E501 - :rtype: list[Table] - """ - return self._tables - - @tables.setter - def tables(self, tables): - """Sets the tables of this Database. - - - :param tables: The tables of this Database. # noqa: E501 - :type: list[Table] - """ - - self._tables = tables - - @property - def views(self): - """Gets the views of this Database. # noqa: E501 - - - :return: The views of this Database. # noqa: E501 - :rtype: list[View] - """ - return self._views - - @views.setter - def views(self, views): - """Sets the views of this Database. - - - :param views: The views of this Database. # noqa: E501 - :type: list[View] - """ - - self._views = views - - @property - def is_public(self): - """Gets the is_public of this Database. # noqa: E501 - - - :return: The is_public of this Database. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this Database. - - - :param is_public: The is_public of this Database. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - - @property - def created(self): - """Gets the created of this Database. # noqa: E501 - - - :return: The created of this Database. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Database. - - - :param created: The created of this Database. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this Database. # noqa: E501 - - - :return: The last_modified of this Database. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this Database. - - - :param last_modified: The last_modified of this Database. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Database, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Database): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/database_access_dto.py b/swagger/api/api_container/models/database_access_dto.py deleted file mode 100644 index a834f675633781463c163aed30b55713122b32c5..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/database_access_dto.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseAccessDto(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 = { - 'user': 'UserDto', - 'type': 'str', - 'created': 'datetime' - } - - attribute_map = { - 'user': 'user', - 'type': 'type', - 'created': 'created' - } - - def __init__(self, user=None, type=None, created=None): # noqa: E501 - """DatabaseAccessDto - a model defined in Swagger""" # noqa: E501 - self._user = None - self._type = None - self._created = None - self.discriminator = None - self.user = user - self.type = type - if created is not None: - self.created = created - - @property - def user(self): - """Gets the user of this DatabaseAccessDto. # noqa: E501 - - - :return: The user of this DatabaseAccessDto. # noqa: E501 - :rtype: UserDto - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this DatabaseAccessDto. - - - :param user: The user of this DatabaseAccessDto. # noqa: E501 - :type: UserDto - """ - if user is None: - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def type(self): - """Gets the type of this DatabaseAccessDto. # noqa: E501 - - - :return: The type of this DatabaseAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseAccessDto. - - - :param type: The type of this DatabaseAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def created(self): - """Gets the created of this DatabaseAccessDto. # noqa: E501 - - - :return: The created of this DatabaseAccessDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseAccessDto. - - - :param created: The created of this DatabaseAccessDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - 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(DatabaseAccessDto, 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, DatabaseAccessDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/database_brief_dto.py b/swagger/api/api_container/models/database_brief_dto.py deleted file mode 100644 index 4c8b547798896e0b8da4a266acf896b6732e2a19..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/database_brief_dto.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseBriefDto(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', - 'description': 'str', - 'identifier': 'IdentifierBriefDto', - 'engine': 'str', - 'owner': 'UserBriefDto', - 'container': 'ContainerBriefDto', - 'creator': 'UserBriefDto', - 'created': 'datetime', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'identifier': 'identifier', - 'engine': 'engine', - 'owner': 'owner', - 'container': 'container', - 'creator': 'creator', - 'created': 'created', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, description=None, identifier=None, engine=None, owner=None, container=None, creator=None, created=None, is_public=None): # noqa: E501 - """DatabaseBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._identifier = None - self._engine = None - self._owner = None - self._container = None - self._creator = None - self._created = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - if description is not None: - self.description = description - if identifier is not None: - self.identifier = identifier - if engine is not None: - self.engine = engine - self.owner = owner - if container is not None: - self.container = container - if creator is not None: - self.creator = creator - if created is not None: - self.created = created - if is_public is not None: - self.is_public = is_public - - @property - def id(self): - """Gets the id of this DatabaseBriefDto. # noqa: E501 - - - :return: The id of this DatabaseBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DatabaseBriefDto. - - - :param id: The id of this DatabaseBriefDto. # 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 DatabaseBriefDto. # noqa: E501 - - - :return: The name of this DatabaseBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DatabaseBriefDto. - - - :param name: The name of this DatabaseBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this DatabaseBriefDto. # noqa: E501 - - - :return: The description of this DatabaseBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this DatabaseBriefDto. - - - :param description: The description of this DatabaseBriefDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def identifier(self): - """Gets the identifier of this DatabaseBriefDto. # noqa: E501 - - - :return: The identifier of this DatabaseBriefDto. # noqa: E501 - :rtype: IdentifierBriefDto - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this DatabaseBriefDto. - - - :param identifier: The identifier of this DatabaseBriefDto. # noqa: E501 - :type: IdentifierBriefDto - """ - - self._identifier = identifier - - @property - def engine(self): - """Gets the engine of this DatabaseBriefDto. # noqa: E501 - - - :return: The engine of this DatabaseBriefDto. # noqa: E501 - :rtype: str - """ - return self._engine - - @engine.setter - def engine(self, engine): - """Sets the engine of this DatabaseBriefDto. - - - :param engine: The engine of this DatabaseBriefDto. # noqa: E501 - :type: str - """ - - self._engine = engine - - @property - def owner(self): - """Gets the owner of this DatabaseBriefDto. # noqa: E501 - - - :return: The owner of this DatabaseBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this DatabaseBriefDto. - - - :param owner: The owner of this DatabaseBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def container(self): - """Gets the container of this DatabaseBriefDto. # noqa: E501 - - - :return: The container of this DatabaseBriefDto. # noqa: E501 - :rtype: ContainerBriefDto - """ - return self._container - - @container.setter - def container(self, container): - """Sets the container of this DatabaseBriefDto. - - - :param container: The container of this DatabaseBriefDto. # noqa: E501 - :type: ContainerBriefDto - """ - - self._container = container - - @property - def creator(self): - """Gets the creator of this DatabaseBriefDto. # noqa: E501 - - - :return: The creator of this DatabaseBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseBriefDto. - - - :param creator: The creator of this DatabaseBriefDto. # noqa: E501 - :type: UserBriefDto - """ - - self._creator = creator - - @property - def created(self): - """Gets the created of this DatabaseBriefDto. # noqa: E501 - - - :return: The created of this DatabaseBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseBriefDto. - - - :param created: The created of this DatabaseBriefDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def is_public(self): - """Gets the is_public of this DatabaseBriefDto. # noqa: E501 - - - :return: The is_public of this DatabaseBriefDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseBriefDto. - - - :param is_public: The is_public of this DatabaseBriefDto. # 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(DatabaseBriefDto, 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, DatabaseBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/database_dto.py b/swagger/api/api_container/models/database_dto.py deleted file mode 100644 index 54e25befc0878e4b57d7da61fc5aa3c591a059b7..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/database_dto.py +++ /dev/null @@ -1,480 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'identifier': 'IdentifierDto', - 'description': 'str', - 'tables': 'list[TableBriefDto]', - 'views': 'list[ViewBriefDto]', - 'image': 'ImageDto', - 'container': 'ContainerDto', - 'accesses': 'list[DatabaseAccessDto]', - 'creator': 'UserBriefDto', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'exchange_name': 'str', - 'internal_name': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'identifier': 'identifier', - 'description': 'description', - 'tables': 'tables', - 'views': 'views', - 'image': 'image', - 'container': 'container', - 'accesses': 'accesses', - 'creator': 'creator', - 'owner': 'owner', - 'created': 'created', - 'exchange_name': 'exchange_name', - 'internal_name': 'internal_name', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, creator=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 - self._identifier = None - self._description = None - self._tables = None - self._views = None - self._image = None - self._container = None - self._accesses = None - self._creator = None - self._owner = None - self._created = None - self._exchange_name = None - self._internal_name = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - 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 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 - self.creator = creator - self.owner = owner - if created is not None: - self.created = created - self.exchange_name = exchange_name - 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 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 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 - - - :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 accesses(self): - """Gets the accesses of this DatabaseDto. # noqa: E501 - - - :return: The accesses of this DatabaseDto. # noqa: E501 - :rtype: list[DatabaseAccessDto] - """ - return self._accesses - - @accesses.setter - def accesses(self, accesses): - """Sets the accesses of this DatabaseDto. - - - :param accesses: The accesses of this DatabaseDto. # noqa: E501 - :type: list[DatabaseAccessDto] - """ - - self._accesses = accesses - - @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 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 - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @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 exchange_name(self): - """Gets the exchange_name of this DatabaseDto. # noqa: E501 - - - :return: The exchange_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this DatabaseDto. - - - :param exchange_name: The exchange_name of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange_name is None: - raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 - - self._exchange_name = exchange_name - - @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_container/models/foreign_key.py b/swagger/api/api_container/models/foreign_key.py deleted file mode 100644 index 865db8e7e7878ab3b41c7efe49ffe1a6e80d5e05..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/foreign_key.py +++ /dev/null @@ -1,356 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ForeignKey(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'fkid': 'int', - 'tid': 'int', - 'tdbid': 'int', - 'table': 'Table', - 'rtid': 'int', - 'rtdbid': 'int', - 'referenced_table': 'Table', - 'references': 'list[ForeignKeyReference]', - 'on_update': 'str', - 'on_delete': 'str' - } - - attribute_map = { - 'fkid': 'fkid', - 'tid': 'tid', - 'tdbid': 'tdbid', - 'table': 'table', - 'rtid': 'rtid', - 'rtdbid': 'rtdbid', - 'referenced_table': 'referencedTable', - 'references': 'references', - 'on_update': 'onUpdate', - 'on_delete': 'onDelete' - } - - def __init__(self, fkid=None, tid=None, tdbid=None, table=None, rtid=None, rtdbid=None, referenced_table=None, references=None, on_update=None, on_delete=None): # noqa: E501 - """ForeignKey - a model defined in Swagger""" # noqa: E501 - self._fkid = None - self._tid = None - self._tdbid = None - self._table = None - self._rtid = None - self._rtdbid = None - self._referenced_table = None - self._references = None - self._on_update = None - self._on_delete = None - self.discriminator = None - if fkid is not None: - self.fkid = fkid - if tid is not None: - self.tid = tid - if tdbid is not None: - self.tdbid = tdbid - if table is not None: - self.table = table - if rtid is not None: - self.rtid = rtid - if rtdbid is not None: - self.rtdbid = rtdbid - if referenced_table is not None: - self.referenced_table = referenced_table - if references is not None: - self.references = references - if on_update is not None: - self.on_update = on_update - if on_delete is not None: - self.on_delete = on_delete - - @property - def fkid(self): - """Gets the fkid of this ForeignKey. # noqa: E501 - - - :return: The fkid of this ForeignKey. # noqa: E501 - :rtype: int - """ - return self._fkid - - @fkid.setter - def fkid(self, fkid): - """Sets the fkid of this ForeignKey. - - - :param fkid: The fkid of this ForeignKey. # noqa: E501 - :type: int - """ - - self._fkid = fkid - - @property - def tid(self): - """Gets the tid of this ForeignKey. # noqa: E501 - - - :return: The tid of this ForeignKey. # noqa: E501 - :rtype: int - """ - return self._tid - - @tid.setter - def tid(self, tid): - """Sets the tid of this ForeignKey. - - - :param tid: The tid of this ForeignKey. # noqa: E501 - :type: int - """ - - self._tid = tid - - @property - def tdbid(self): - """Gets the tdbid of this ForeignKey. # noqa: E501 - - - :return: The tdbid of this ForeignKey. # noqa: E501 - :rtype: int - """ - return self._tdbid - - @tdbid.setter - def tdbid(self, tdbid): - """Sets the tdbid of this ForeignKey. - - - :param tdbid: The tdbid of this ForeignKey. # noqa: E501 - :type: int - """ - - self._tdbid = tdbid - - @property - def table(self): - """Gets the table of this ForeignKey. # noqa: E501 - - - :return: The table of this ForeignKey. # noqa: E501 - :rtype: Table - """ - return self._table - - @table.setter - def table(self, table): - """Sets the table of this ForeignKey. - - - :param table: The table of this ForeignKey. # noqa: E501 - :type: Table - """ - - self._table = table - - @property - def rtid(self): - """Gets the rtid of this ForeignKey. # noqa: E501 - - - :return: The rtid of this ForeignKey. # noqa: E501 - :rtype: int - """ - return self._rtid - - @rtid.setter - def rtid(self, rtid): - """Sets the rtid of this ForeignKey. - - - :param rtid: The rtid of this ForeignKey. # noqa: E501 - :type: int - """ - - self._rtid = rtid - - @property - def rtdbid(self): - """Gets the rtdbid of this ForeignKey. # noqa: E501 - - - :return: The rtdbid of this ForeignKey. # noqa: E501 - :rtype: int - """ - return self._rtdbid - - @rtdbid.setter - def rtdbid(self, rtdbid): - """Sets the rtdbid of this ForeignKey. - - - :param rtdbid: The rtdbid of this ForeignKey. # noqa: E501 - :type: int - """ - - self._rtdbid = rtdbid - - @property - def referenced_table(self): - """Gets the referenced_table of this ForeignKey. # noqa: E501 - - - :return: The referenced_table of this ForeignKey. # noqa: E501 - :rtype: Table - """ - return self._referenced_table - - @referenced_table.setter - def referenced_table(self, referenced_table): - """Sets the referenced_table of this ForeignKey. - - - :param referenced_table: The referenced_table of this ForeignKey. # noqa: E501 - :type: Table - """ - - self._referenced_table = referenced_table - - @property - def references(self): - """Gets the references of this ForeignKey. # noqa: E501 - - - :return: The references of this ForeignKey. # noqa: E501 - :rtype: list[ForeignKeyReference] - """ - return self._references - - @references.setter - def references(self, references): - """Sets the references of this ForeignKey. - - - :param references: The references of this ForeignKey. # noqa: E501 - :type: list[ForeignKeyReference] - """ - - self._references = references - - @property - def on_update(self): - """Gets the on_update of this ForeignKey. # noqa: E501 - - - :return: The on_update of this ForeignKey. # noqa: E501 - :rtype: str - """ - return self._on_update - - @on_update.setter - def on_update(self, on_update): - """Sets the on_update of this ForeignKey. - - - :param on_update: The on_update of this ForeignKey. # noqa: E501 - :type: str - """ - allowed_values = ["ReferenceType.RESTRICT", "ReferenceType.CASCADE", "ReferenceType.SET_NULL", "ReferenceType.NO_ACTION", "ReferenceType.SET_DEFAULT"] # noqa: E501 - if on_update not in allowed_values: - raise ValueError( - "Invalid value for `on_update` ({0}), must be one of {1}" # noqa: E501 - .format(on_update, allowed_values) - ) - - self._on_update = on_update - - @property - def on_delete(self): - """Gets the on_delete of this ForeignKey. # noqa: E501 - - - :return: The on_delete of this ForeignKey. # noqa: E501 - :rtype: str - """ - return self._on_delete - - @on_delete.setter - def on_delete(self, on_delete): - """Sets the on_delete of this ForeignKey. - - - :param on_delete: The on_delete of this ForeignKey. # noqa: E501 - :type: str - """ - allowed_values = ["ReferenceType.RESTRICT", "ReferenceType.CASCADE", "ReferenceType.SET_NULL", "ReferenceType.NO_ACTION", "ReferenceType.SET_DEFAULT"] # noqa: E501 - if on_delete not in allowed_values: - raise ValueError( - "Invalid value for `on_delete` ({0}), must be one of {1}" # noqa: E501 - .format(on_delete, allowed_values) - ) - - self._on_delete = on_delete - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ForeignKey, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ForeignKey): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/foreign_key_reference.py b/swagger/api/api_container/models/foreign_key_reference.py deleted file mode 100644 index 9789412be9daf8e6590de905e5c76b9a11925e65..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/foreign_key_reference.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ForeignKeyReference(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'foreign_key': 'ForeignKey', - 'column': 'TableColumn', - 'referenced_column': 'TableColumn' - } - - attribute_map = { - 'id': 'id', - 'foreign_key': 'foreignKey', - 'column': 'column', - 'referenced_column': 'referencedColumn' - } - - def __init__(self, id=None, foreign_key=None, column=None, referenced_column=None): # noqa: E501 - """ForeignKeyReference - a model defined in Swagger""" # noqa: E501 - self._id = None - self._foreign_key = None - self._column = None - self._referenced_column = None - self.discriminator = None - if id is not None: - self.id = id - if foreign_key is not None: - self.foreign_key = foreign_key - if column is not None: - self.column = column - if referenced_column is not None: - self.referenced_column = referenced_column - - @property - def id(self): - """Gets the id of this ForeignKeyReference. # noqa: E501 - - - :return: The id of this ForeignKeyReference. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ForeignKeyReference. - - - :param id: The id of this ForeignKeyReference. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def foreign_key(self): - """Gets the foreign_key of this ForeignKeyReference. # noqa: E501 - - - :return: The foreign_key of this ForeignKeyReference. # noqa: E501 - :rtype: ForeignKey - """ - return self._foreign_key - - @foreign_key.setter - def foreign_key(self, foreign_key): - """Sets the foreign_key of this ForeignKeyReference. - - - :param foreign_key: The foreign_key of this ForeignKeyReference. # noqa: E501 - :type: ForeignKey - """ - - self._foreign_key = foreign_key - - @property - def column(self): - """Gets the column of this ForeignKeyReference. # noqa: E501 - - - :return: The column of this ForeignKeyReference. # noqa: E501 - :rtype: TableColumn - """ - return self._column - - @column.setter - def column(self, column): - """Sets the column of this ForeignKeyReference. - - - :param column: The column of this ForeignKeyReference. # noqa: E501 - :type: TableColumn - """ - - self._column = column - - @property - def referenced_column(self): - """Gets the referenced_column of this ForeignKeyReference. # noqa: E501 - - - :return: The referenced_column of this ForeignKeyReference. # noqa: E501 - :rtype: TableColumn - """ - return self._referenced_column - - @referenced_column.setter - def referenced_column(self, referenced_column): - """Sets the referenced_column of this ForeignKeyReference. - - - :param referenced_column: The referenced_column of this ForeignKeyReference. # noqa: E501 - :type: TableColumn - """ - - self._referenced_column = referenced_column - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ForeignKeyReference, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ForeignKeyReference): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/granted_authority_dto.py b/swagger/api/api_container/models/granted_authority_dto.py deleted file mode 100644 index 90e4f275324e10027d0498536655ae32339007c0..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/granted_authority_dto.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 GrantedAuthorityDto(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 = { - 'authority': 'str' - } - - attribute_map = { - 'authority': 'authority' - } - - def __init__(self, authority=None): # noqa: E501 - """GrantedAuthorityDto - a model defined in Swagger""" # noqa: E501 - self._authority = None - self.discriminator = None - if authority is not None: - self.authority = authority - - @property - def authority(self): - """Gets the authority of this GrantedAuthorityDto. # noqa: E501 - - - :return: The authority of this GrantedAuthorityDto. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this GrantedAuthorityDto. - - - :param authority: The authority of this GrantedAuthorityDto. # noqa: E501 - :type: str - """ - - self._authority = authority - - 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(GrantedAuthorityDto, 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, GrantedAuthorityDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/identifier.py b/swagger/api/api_container/models/identifier.py deleted file mode 100644 index fcfc55f59f85afc887dcba77e13ec5d9a5bf0ad3..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/identifier.py +++ /dev/null @@ -1,805 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Identifier(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'creator': 'User', - 'title': 'str', - 'description': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'License', - 'type': 'str', - 'query': 'str', - 'query_normalized': 'str', - 'query_hash': 'str', - 'result_hash': 'str', - 'execution': 'datetime', - 'result_number': 'int', - 'publication_year': 'int', - 'publication_month': 'int', - 'publication_day': 'int', - 'visibility': 'str', - 'database': 'Database', - 'related': 'list[RelatedIdentifier]', - 'doi': 'str', - 'creators': 'list[Creator]', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'container_id': 'containerId', - 'database_id': 'databaseId', - 'query_id': 'queryId', - 'creator': 'creator', - 'title': 'title', - 'description': 'description', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'type': 'type', - 'query': 'query', - 'query_normalized': 'queryNormalized', - 'query_hash': 'queryHash', - 'result_hash': 'resultHash', - 'execution': 'execution', - 'result_number': 'resultNumber', - 'publication_year': 'publicationYear', - 'publication_month': 'publicationMonth', - 'publication_day': 'publicationDay', - 'visibility': 'visibility', - 'database': 'database', - 'related': 'related', - 'doi': 'doi', - 'creators': 'creators', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, container_id=None, database_id=None, query_id=None, creator=None, title=None, description=None, publisher=None, language=None, license=None, type=None, query=None, query_normalized=None, query_hash=None, result_hash=None, execution=None, result_number=None, publication_year=None, publication_month=None, publication_day=None, visibility=None, database=None, related=None, doi=None, creators=None, created=None, last_modified=None): # noqa: E501 - """Identifier - a model defined in Swagger""" # noqa: E501 - self._id = None - self._container_id = None - self._database_id = None - self._query_id = None - self._creator = None - self._title = None - self._description = None - self._publisher = None - self._language = None - self._license = None - self._type = None - self._query = None - self._query_normalized = None - self._query_hash = None - self._result_hash = None - self._execution = None - self._result_number = None - self._publication_year = None - self._publication_month = None - self._publication_day = None - self._visibility = None - self._database = None - self._related = None - self._doi = None - self._creators = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if container_id is not None: - self.container_id = container_id - if database_id is not None: - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - if creator is not None: - self.creator = creator - if title is not None: - self.title = title - if description is not None: - self.description = description - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - if type is not None: - self.type = type - if query is not None: - self.query = query - if query_normalized is not None: - self.query_normalized = query_normalized - if query_hash is not None: - self.query_hash = query_hash - if result_hash is not None: - self.result_hash = result_hash - if execution is not None: - self.execution = execution - if result_number is not None: - self.result_number = result_number - if publication_year is not None: - self.publication_year = publication_year - if publication_month is not None: - self.publication_month = publication_month - if publication_day is not None: - self.publication_day = publication_day - if visibility is not None: - self.visibility = visibility - if database is not None: - self.database = database - if related is not None: - self.related = related - if doi is not None: - self.doi = doi - if creators is not None: - self.creators = creators - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this Identifier. # noqa: E501 - - - :return: The id of this Identifier. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Identifier. - - - :param id: The id of this Identifier. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def container_id(self): - """Gets the container_id of this Identifier. # noqa: E501 - - - :return: The container_id of this Identifier. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this Identifier. - - - :param container_id: The container_id of this Identifier. # noqa: E501 - :type: int - """ - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this Identifier. # noqa: E501 - - - :return: The database_id of this Identifier. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this Identifier. - - - :param database_id: The database_id of this Identifier. # noqa: E501 - :type: int - """ - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this Identifier. # noqa: E501 - - - :return: The query_id of this Identifier. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this Identifier. - - - :param query_id: The query_id of this Identifier. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def creator(self): - """Gets the creator of this Identifier. # noqa: E501 - - - :return: The creator of this Identifier. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this Identifier. - - - :param creator: The creator of this Identifier. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def title(self): - """Gets the title of this Identifier. # noqa: E501 - - - :return: The title of this Identifier. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this Identifier. - - - :param title: The title of this Identifier. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def description(self): - """Gets the description of this Identifier. # noqa: E501 - - - :return: The description of this Identifier. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Identifier. - - - :param description: The description of this Identifier. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def publisher(self): - """Gets the publisher of this Identifier. # noqa: E501 - - - :return: The publisher of this Identifier. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this Identifier. - - - :param publisher: The publisher of this Identifier. # noqa: E501 - :type: str - """ - if publisher is None: - raise ValueError("Invalid value for `publisher`, must not be `None`") # noqa: E501 - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this Identifier. # noqa: E501 - - - :return: The language of this Identifier. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this Identifier. - - - :param language: The language of this Identifier. # noqa: E501 - :type: str - """ - allowed_values = ["LanguageType.AB", "LanguageType.AA", "LanguageType.AF", "LanguageType.AK", "LanguageType.SQ", "LanguageType.AM", "LanguageType.AR", "LanguageType.AN", "LanguageType.HY", "LanguageType.AS", "LanguageType.AV", "LanguageType.AE", "LanguageType.AY", "LanguageType.AZ", "LanguageType.BM", "LanguageType.BA", "LanguageType.EU", "LanguageType.BE", "LanguageType.BN", "LanguageType.BH", "LanguageType.BI", "LanguageType.BS", "LanguageType.BR", "LanguageType.BG", "LanguageType.MY", "LanguageType.CA", "LanguageType.KM", "LanguageType.CH", "LanguageType.CE", "LanguageType.NY", "LanguageType.ZH", "LanguageType.CU", "LanguageType.CV", "LanguageType.KW", "LanguageType.CO", "LanguageType.CR", "LanguageType.HR", "LanguageType.CS", "LanguageType.DA", "LanguageType.DV", "LanguageType.NL", "LanguageType.DZ", "LanguageType.EN", "LanguageType.EO", "LanguageType.ET", "LanguageType.EE", "LanguageType.FO", "LanguageType.FJ", "LanguageType.FI", "LanguageType.FR", "LanguageType.FF", "LanguageType.GD", "LanguageType.GL", "LanguageType.LG", "LanguageType.KA", "LanguageType.DE", "LanguageType.KI", "LanguageType.EL", "LanguageType.KL", "LanguageType.GN", "LanguageType.GU", "LanguageType.HT", "LanguageType.HA", "LanguageType.HE", "LanguageType.HZ", "LanguageType.HI", "LanguageType.HO", "LanguageType.HU", "LanguageType.IS", "LanguageType.IO", "LanguageType.IG", "LanguageType.ID", "LanguageType.IA", "LanguageType.IE", "LanguageType.IU", "LanguageType.IK", "LanguageType.GA", "LanguageType.IT", "LanguageType.JA", "LanguageType.JV", "LanguageType.KN", "LanguageType.KR", "LanguageType.KS", "LanguageType.KK", "LanguageType.RW", "LanguageType.KV", "LanguageType.KG", "LanguageType.KO", "LanguageType.KJ", "LanguageType.KU", "LanguageType.KY", "LanguageType.LO", "LanguageType.LA", "LanguageType.LV", "LanguageType.LB", "LanguageType.LI", "LanguageType.LN", "LanguageType.LT", "LanguageType.LU", "LanguageType.MK", "LanguageType.MG", "LanguageType.MS", "LanguageType.ML", "LanguageType.MT", "LanguageType.GV", "LanguageType.MI", "LanguageType.MR", "LanguageType.MH", "LanguageType.RO", "LanguageType.MN", "LanguageType.NA", "LanguageType.NV", "LanguageType.ND", "LanguageType.NG", "LanguageType.NE", "LanguageType.SE", "LanguageType.NO", "LanguageType.NB", "LanguageType.NN", "LanguageType.II", "LanguageType.OC", "LanguageType.OJ", "LanguageType.OR", "LanguageType.OM", "LanguageType.OS", "LanguageType.PI", "LanguageType.PA", "LanguageType.PS", "LanguageType.FA", "LanguageType.PL", "LanguageType.PT", "LanguageType.QU", "LanguageType.RM", "LanguageType.RN", "LanguageType.RU", "LanguageType.SM", "LanguageType.SG", "LanguageType.SA", "LanguageType.SC", "LanguageType.SR", "LanguageType.SN", "LanguageType.SD", "LanguageType.SI", "LanguageType.SK", "LanguageType.SL", "LanguageType.SO", "LanguageType.ST", "LanguageType.NR", "LanguageType.ES", "LanguageType.SU", "LanguageType.SW", "LanguageType.SS", "LanguageType.SV", "LanguageType.TL", "LanguageType.TY", "LanguageType.TG", "LanguageType.TA", "LanguageType.TT", "LanguageType.TE", "LanguageType.TH", "LanguageType.BO", "LanguageType.TI", "LanguageType.TO", "LanguageType.TS", "LanguageType.TN", "LanguageType.TR", "LanguageType.TK", "LanguageType.TW", "LanguageType.UG", "LanguageType.UK", "LanguageType.UR", "LanguageType.UZ", "LanguageType.VE", "LanguageType.VI", "LanguageType.VO", "LanguageType.WA", "LanguageType.CY", "LanguageType.FY", "LanguageType.WO", "LanguageType.XH", "LanguageType.YI", "LanguageType.YO", "LanguageType.ZA", "LanguageType.ZU"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this Identifier. # noqa: E501 - - - :return: The license of this Identifier. # noqa: E501 - :rtype: License - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this Identifier. - - - :param license: The license of this Identifier. # noqa: E501 - :type: License - """ - - self._license = license - - @property - def type(self): - """Gets the type of this Identifier. # noqa: E501 - - - :return: The type of this Identifier. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this Identifier. - - - :param type: The type of this Identifier. # noqa: E501 - :type: str - """ - allowed_values = ["DATABASE", "SUBSET"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def query(self): - """Gets the query of this Identifier. # noqa: E501 - - - :return: The query of this Identifier. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this Identifier. - - - :param query: The query of this Identifier. # noqa: E501 - :type: str - """ - - self._query = query - - @property - def query_normalized(self): - """Gets the query_normalized of this Identifier. # noqa: E501 - - - :return: The query_normalized of this Identifier. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this Identifier. - - - :param query_normalized: The query_normalized of this Identifier. # noqa: E501 - :type: str - """ - - self._query_normalized = query_normalized - - @property - def query_hash(self): - """Gets the query_hash of this Identifier. # noqa: E501 - - - :return: The query_hash of this Identifier. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this Identifier. - - - :param query_hash: The query_hash of this Identifier. # noqa: E501 - :type: str - """ - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this Identifier. # noqa: E501 - - - :return: The result_hash of this Identifier. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this Identifier. - - - :param result_hash: The result_hash of this Identifier. # noqa: E501 - :type: str - """ - - self._result_hash = result_hash - - @property - def execution(self): - """Gets the execution of this Identifier. # noqa: E501 - - - :return: The execution of this Identifier. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this Identifier. - - - :param execution: The execution of this Identifier. # noqa: E501 - :type: datetime - """ - - self._execution = execution - - @property - def result_number(self): - """Gets the result_number of this Identifier. # noqa: E501 - - - :return: The result_number of this Identifier. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this Identifier. - - - :param result_number: The result_number of this Identifier. # noqa: E501 - :type: int - """ - - self._result_number = result_number - - @property - def publication_year(self): - """Gets the publication_year of this Identifier. # noqa: E501 - - - :return: The publication_year of this Identifier. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this Identifier. - - - :param publication_year: The publication_year of this Identifier. # noqa: E501 - :type: int - """ - - self._publication_year = publication_year - - @property - def publication_month(self): - """Gets the publication_month of this Identifier. # noqa: E501 - - - :return: The publication_month of this Identifier. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this Identifier. - - - :param publication_month: The publication_month of this Identifier. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_day(self): - """Gets the publication_day of this Identifier. # noqa: E501 - - - :return: The publication_day of this Identifier. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this Identifier. - - - :param publication_day: The publication_day of this Identifier. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def visibility(self): - """Gets the visibility of this Identifier. # noqa: E501 - - - :return: The visibility of this Identifier. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this Identifier. - - - :param visibility: The visibility of this Identifier. # noqa: E501 - :type: str - """ - allowed_values = ["VisibilityType.EVERYONE", "VisibilityType.SELF"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def database(self): - """Gets the database of this Identifier. # noqa: E501 - - - :return: The database of this Identifier. # noqa: E501 - :rtype: Database - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this Identifier. - - - :param database: The database of this Identifier. # noqa: E501 - :type: Database - """ - - self._database = database - - @property - def related(self): - """Gets the related of this Identifier. # noqa: E501 - - - :return: The related of this Identifier. # noqa: E501 - :rtype: list[RelatedIdentifier] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this Identifier. - - - :param related: The related of this Identifier. # noqa: E501 - :type: list[RelatedIdentifier] - """ - - self._related = related - - @property - def doi(self): - """Gets the doi of this Identifier. # noqa: E501 - - - :return: The doi of this Identifier. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this Identifier. - - - :param doi: The doi of this Identifier. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def creators(self): - """Gets the creators of this Identifier. # noqa: E501 - - - :return: The creators of this Identifier. # noqa: E501 - :rtype: list[Creator] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this Identifier. - - - :param creators: The creators of this Identifier. # noqa: E501 - :type: list[Creator] - """ - - self._creators = creators - - @property - def created(self): - """Gets the created of this Identifier. # noqa: E501 - - - :return: The created of this Identifier. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Identifier. - - - :param created: The created of this Identifier. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this Identifier. # noqa: E501 - - - :return: The last_modified of this Identifier. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this Identifier. - - - :param last_modified: The last_modified of this Identifier. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Identifier, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Identifier): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/identifier_brief_dto.py b/swagger/api/api_container/models/identifier_brief_dto.py deleted file mode 100644 index c0dcdfe9c5ffe24efe93e4fac28091cc323b9019..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/identifier_brief_dto.py +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierBriefDto(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', - 'title': 'str', - 'type': 'str', - 'doi': 'str', - 'publisher': 'str', - 'creators': 'list[CreatorBriefDto]', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'publication_year': 'int' - } - - attribute_map = { - 'id': 'id', - 'title': 'title', - 'type': 'type', - 'doi': 'doi', - 'publisher': 'publisher', - 'creators': 'creators', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'publication_year': 'publication_year' - } - - def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 - """IdentifierBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._title = None - self._type = None - self._doi = None - self._publisher = None - self._creators = None - self._container_id = None - self._database_id = None - self._query_id = None - self._publication_year = None - self.discriminator = None - self.id = id - self.title = title - self.type = type - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - self.creators = creators - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.publication_year = publication_year - - @property - def id(self): - """Gets the id of this IdentifierBriefDto. # noqa: E501 - - - :return: The id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierBriefDto. - - - :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 - - @property - def title(self): - """Gets the title of this IdentifierBriefDto. # noqa: E501 - - - :return: The title of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierBriefDto. - - - :param title: The title of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def type(self): - """Gets the type of this IdentifierBriefDto. # noqa: E501 - - - :return: The type of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierBriefDto. - - - :param type: The type of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def doi(self): - """Gets the doi of this IdentifierBriefDto. # noqa: E501 - - - :return: The doi of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierBriefDto. - - - :param doi: The doi of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierBriefDto. # noqa: E501 - - - :return: The publisher of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierBriefDto. - - - :param publisher: The publisher of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def creators(self): - """Gets the creators of this IdentifierBriefDto. # noqa: E501 - - - :return: The creators of this IdentifierBriefDto. # noqa: E501 - :rtype: list[CreatorBriefDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierBriefDto. - - - :param creators: The creators of this IdentifierBriefDto. # noqa: E501 - :type: list[CreatorBriefDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def container_id(self): - """Gets the container_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The container_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierBriefDto. - - - :param container_id: The container_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The database_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierBriefDto. - - - :param database_id: The database_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The query_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierBriefDto. - - - :param query_id: The query_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierBriefDto. # noqa: E501 - - - :return: The publication_year of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierBriefDto. - - - :param publication_year: The publication_year of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - 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(IdentifierBriefDto, 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, IdentifierBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/identifier_dto.py b/swagger/api/api_container/models/identifier_dto.py deleted file mode 100644 index 0c9814454863d0a828c051cecaf8c43edec017dd..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - 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/image_brief_dto.py b/swagger/api/api_container/models/image_brief_dto.py deleted file mode 100644 index 91a8205bb820b2d546986bc6c96f76e2f18255dd..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/image_brief_dto.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImageBriefDto(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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 - """ImageBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self.discriminator = None - self.id = id - self.registry = registry - self.repository = repository - self.tag = tag - - @property - def id(self): - """Gets the id of this ImageBriefDto. # 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 registry(self): - """Gets the registry of this ImageBriefDto. # noqa: E501 - - - :return: The registry of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageBriefDto. - - - :param registry: The registry of this ImageBriefDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageBriefDto. # noqa: E501 - - - :return: The repository of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. - - - :param repository: The repository of this ImageBriefDto. # 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 ImageBriefDto. # noqa: E501 - - - :return: The tag of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. - - - :param tag: The tag of this ImageBriefDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ImageBriefDto, 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, ImageBriefDto): - 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/image_change_dto.py b/swagger/api/api_container/models/image_change_dto.py deleted file mode 100644 index d418e30265634fb9b0dec71aa3d815a9d390a517..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/image_change_dto.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImageChangeDto(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 = { - 'registry': 'str', - 'default_port': 'int', - 'environment': 'list[ImageEnvItemDto]', - 'dialect': 'str', - 'driver_class': 'str', - 'jdbc_method': 'str' - } - - attribute_map = { - 'registry': 'registry', - 'default_port': 'defaultPort', - 'environment': 'environment', - 'dialect': 'dialect', - 'driver_class': 'driver_class', - 'jdbc_method': 'jdbc_method' - } - - def __init__(self, registry=None, default_port=None, environment=None, dialect=None, driver_class=None, jdbc_method=None): # noqa: E501 - """ImageChangeDto - a model defined in Swagger""" # noqa: E501 - self._registry = None - self._default_port = None - self._environment = None - self._dialect = None - self._driver_class = None - self._jdbc_method = None - self.discriminator = None - self.registry = registry - if default_port is not None: - self.default_port = default_port - if environment is not None: - self.environment = environment - self.dialect = dialect - self.driver_class = driver_class - self.jdbc_method = jdbc_method - - @property - def registry(self): - """Gets the registry of this ImageChangeDto. # noqa: E501 - - - :return: The registry of this ImageChangeDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageChangeDto. - - - :param registry: The registry of this ImageChangeDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def default_port(self): - """Gets the default_port of this ImageChangeDto. # noqa: E501 - - - :return: The default_port of this ImageChangeDto. # noqa: E501 - :rtype: int - """ - return self._default_port - - @default_port.setter - def default_port(self, default_port): - """Sets the default_port of this ImageChangeDto. - - - :param default_port: The default_port of this ImageChangeDto. # noqa: E501 - :type: int - """ - - self._default_port = default_port - - @property - def environment(self): - """Gets the environment of this ImageChangeDto. # noqa: E501 - - - :return: The environment of this ImageChangeDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageChangeDto. - - - :param environment: The environment of this ImageChangeDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - - self._environment = environment - - @property - def dialect(self): - """Gets the dialect of this ImageChangeDto. # noqa: E501 - - - :return: The dialect of this ImageChangeDto. # noqa: E501 - :rtype: str - """ - return self._dialect - - @dialect.setter - def dialect(self, dialect): - """Sets the dialect of this ImageChangeDto. - - - :param dialect: The dialect of this ImageChangeDto. # 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 driver_class(self): - """Gets the driver_class of this ImageChangeDto. # noqa: E501 - - - :return: The driver_class of this ImageChangeDto. # noqa: E501 - :rtype: str - """ - return self._driver_class - - @driver_class.setter - def driver_class(self, driver_class): - """Sets the driver_class of this ImageChangeDto. - - - :param driver_class: The driver_class of this ImageChangeDto. # 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 jdbc_method(self): - """Gets the jdbc_method of this ImageChangeDto. # noqa: E501 - - - :return: The jdbc_method of this ImageChangeDto. # noqa: E501 - :rtype: str - """ - return self._jdbc_method - - @jdbc_method.setter - def jdbc_method(self, jdbc_method): - """Sets the jdbc_method of this ImageChangeDto. - - - :param jdbc_method: The jdbc_method of this ImageChangeDto. # 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 - - 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(ImageChangeDto, 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, ImageChangeDto): - 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/image_create_dto.py b/swagger/api/api_container/models/image_create_dto.py deleted file mode 100644 index 0488e10128fc1bc46fd2a48455254279c3099eb3..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/image_create_dto.py +++ /dev/null @@ -1,299 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImageCreateDto(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 = { - 'registry': 'str', - 'repository': 'str', - 'tag': 'str', - 'dialect': 'str', - 'environment': 'list[ImageEnvItemDto]', - 'driver_class': 'str', - 'jdbc_method': 'str', - 'default_port': 'int' - } - - attribute_map = { - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag', - 'dialect': 'dialect', - 'environment': 'environment', - 'driver_class': 'driver_class', - 'jdbc_method': 'jdbc_method', - 'default_port': 'default_port' - } - - def __init__(self, registry=None, repository=None, tag=None, dialect=None, environment=None, driver_class=None, jdbc_method=None, default_port=None): # noqa: E501 - """ImageCreateDto - a model defined in Swagger""" # noqa: E501 - self._registry = None - self._repository = None - self._tag = None - self._dialect = None - self._environment = None - self._driver_class = None - self._jdbc_method = None - self._default_port = None - self.discriminator = None - self.registry = registry - self.repository = repository - self.tag = tag - self.dialect = dialect - if environment is not None: - self.environment = environment - self.driver_class = driver_class - self.jdbc_method = jdbc_method - self.default_port = default_port - - @property - def registry(self): - """Gets the registry of this ImageCreateDto. # noqa: E501 - - - :return: The registry of this ImageCreateDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageCreateDto. - - - :param registry: The registry of this ImageCreateDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageCreateDto. # noqa: E501 - - - :return: The repository of this ImageCreateDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageCreateDto. - - - :param repository: The repository of this ImageCreateDto. # 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 ImageCreateDto. # noqa: E501 - - - :return: The tag of this ImageCreateDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageCreateDto. - - - :param tag: The tag of this ImageCreateDto. # 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 ImageCreateDto. # noqa: E501 - - - :return: The dialect of this ImageCreateDto. # noqa: E501 - :rtype: str - """ - return self._dialect - - @dialect.setter - def dialect(self, dialect): - """Sets the dialect of this ImageCreateDto. - - - :param dialect: The dialect of this ImageCreateDto. # 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 environment(self): - """Gets the environment of this ImageCreateDto. # noqa: E501 - - - :return: The environment of this ImageCreateDto. # noqa: E501 - :rtype: list[ImageEnvItemDto] - """ - return self._environment - - @environment.setter - def environment(self, environment): - """Sets the environment of this ImageCreateDto. - - - :param environment: The environment of this ImageCreateDto. # noqa: E501 - :type: list[ImageEnvItemDto] - """ - - self._environment = environment - - @property - def driver_class(self): - """Gets the driver_class of this ImageCreateDto. # noqa: E501 - - - :return: The driver_class of this ImageCreateDto. # noqa: E501 - :rtype: str - """ - return self._driver_class - - @driver_class.setter - def driver_class(self, driver_class): - """Sets the driver_class of this ImageCreateDto. - - - :param driver_class: The driver_class of this ImageCreateDto. # 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 jdbc_method(self): - """Gets the jdbc_method of this ImageCreateDto. # noqa: E501 - - - :return: The jdbc_method of this ImageCreateDto. # noqa: E501 - :rtype: str - """ - return self._jdbc_method - - @jdbc_method.setter - def jdbc_method(self, jdbc_method): - """Sets the jdbc_method of this ImageCreateDto. - - - :param jdbc_method: The jdbc_method of this ImageCreateDto. # 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 ImageCreateDto. # noqa: E501 - - - :return: The default_port of this ImageCreateDto. # noqa: E501 - :rtype: int - """ - return self._default_port - - @default_port.setter - def default_port(self, default_port): - """Sets the default_port of this ImageCreateDto. - - - :param default_port: The default_port of this ImageCreateDto. # 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(ImageCreateDto, 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, ImageCreateDto): - 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/image_date_dto.py b/swagger/api/api_container/models/image_date_dto.py deleted file mode 100644 index 65b133d1c99fafed154f13e7376f36f3ce80f812..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_container/models/image_dto.py b/swagger/api/api_container/models/image_dto.py deleted file mode 100644 index c3beb2d423a36ae8bf33564be457cdfdf1ae6b4d..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/image_dto.py +++ /dev/null @@ -1,404 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str', - 'dialect': 'str', - 'hash': 'str', - 'compiled': 'datetime', - 'size': 'int', - 'driver_class': 'str', - 'date_formats': 'list[ImageDateDto]', - 'jdbc_method': 'str', - 'default_port': 'int' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag', - 'dialect': 'dialect', - 'hash': 'hash', - 'compiled': 'compiled', - 'size': 'size', - 'driver_class': 'driver_class', - 'date_formats': 'date_formats', - 'jdbc_method': 'jdbc_method', - 'default_port': 'default_port' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 - """ImageDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self._dialect = None - self._hash = None - self._compiled = None - self._size = None - self._driver_class = None - self._date_formats = None - self._jdbc_method = None - self._default_port = None - self.discriminator = None - self.id = id - self.registry = registry - 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.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 registry(self): - """Gets the registry of this ImageDto. # noqa: E501 - - - :return: The registry of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageDto. - - - :param registry: The registry of this ImageDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageDto. # noqa: E501 - - - :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 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_container/models/image_env_item_dto.py b/swagger/api/api_container/models/image_env_item_dto.py deleted file mode 100644 index 89ae2822020631454ec748bc1c730602a515b439..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/image_env_item_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'type': 'str' - } - - attribute_map = { - 'iid': 'iid', - 'key': 'key', - 'type': 'type' - } - - 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._type = None - self.discriminator = None - self.iid = iid - self.key = key - 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 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_container/models/license.py b/swagger/api/api_container/models/license.py deleted file mode 100644 index 79b289884022e5f45ba22b238389a9b83b549049..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/license.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class License(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """License - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - if identifier is not None: - self.identifier = identifier - if uri is not None: - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this License. # noqa: E501 - - - :return: The identifier of this License. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this License. - - - :param identifier: The identifier of this License. # noqa: E501 - :type: str - """ - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this License. # noqa: E501 - - - :return: The uri of this License. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this License. - - - :param uri: The uri of this License. # noqa: E501 - :type: str - """ - - self._uri = uri - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(License, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, License): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/license_dto.py b/swagger/api/api_container/models/license_dto.py deleted file mode 100644 index 17fc98e25005c165c9b9f4962ad33625b8d212bb..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/related_identifier.py b/swagger/api/api_container/models/related_identifier.py deleted file mode 100644 index f14313fbef8379dc9f6a013fb1de13fe299f2854..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/related_identifier.py +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifier(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'iid': 'int', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'creator': 'User', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'iid': 'iid', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'creator': 'creator', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, iid=None, value=None, type=None, relation=None, creator=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifier - a model defined in Swagger""" # noqa: E501 - self._id = None - self._iid = None - self._value = None - self._type = None - self._relation = None - self._creator = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if iid is not None: - self.iid = iid - if value is not None: - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - if creator is not None: - self.creator = creator - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifier. # noqa: E501 - - - :return: The id of this RelatedIdentifier. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifier. - - - :param id: The id of this RelatedIdentifier. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def iid(self): - """Gets the iid of this RelatedIdentifier. # noqa: E501 - - - :return: The iid of this RelatedIdentifier. # noqa: E501 - :rtype: int - """ - return self._iid - - @iid.setter - def iid(self, iid): - """Sets the iid of this RelatedIdentifier. - - - :param iid: The iid of this RelatedIdentifier. # noqa: E501 - :type: int - """ - - self._iid = iid - - @property - def value(self): - """Gets the value of this RelatedIdentifier. # noqa: E501 - - - :return: The value of this RelatedIdentifier. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifier. - - - :param value: The value of this RelatedIdentifier. # noqa: E501 - :type: str - """ - - self._value = value - - @property - def type(self): - """Gets the type of this RelatedIdentifier. # noqa: E501 - - - :return: The type of this RelatedIdentifier. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifier. - - - :param type: The type of this RelatedIdentifier. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifier. # noqa: E501 - - - :return: The relation of this RelatedIdentifier. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifier. - - - :param relation: The relation of this RelatedIdentifier. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def creator(self): - """Gets the creator of this RelatedIdentifier. # noqa: E501 - - - :return: The creator of this RelatedIdentifier. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this RelatedIdentifier. - - - :param creator: The creator of this RelatedIdentifier. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def created(self): - """Gets the created of this RelatedIdentifier. # noqa: E501 - - - :return: The created of this RelatedIdentifier. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifier. - - - :param created: The created of this RelatedIdentifier. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this RelatedIdentifier. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifier. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifier. - - - :param last_modified: The last_modified of this RelatedIdentifier. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(RelatedIdentifier, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RelatedIdentifier): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/related_identifier_dto.py b/swagger/api/api_container/models/related_identifier_dto.py deleted file mode 100644 index 4de35041aeaf508290092aaf88def93058f449e9..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/role.py b/swagger/api/api_container/models/role.py deleted file mode 100644 index cdecfc5bd0cc97a51aaf2716dd2f5ba236c3da4c..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/role.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Role(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'name': 'str', - 'realm_id': 'str', - 'users': 'list[User]' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'realm_id': 'realmId', - 'users': 'users' - } - - def __init__(self, id=None, name=None, realm_id=None, users=None): # noqa: E501 - """Role - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._realm_id = None - self._users = None - self.discriminator = None - if id is not None: - self.id = id - if name is not None: - self.name = name - if realm_id is not None: - self.realm_id = realm_id - if users is not None: - self.users = users - - @property - def id(self): - """Gets the id of this Role. # noqa: E501 - - - :return: The id of this Role. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Role. - - - :param id: The id of this Role. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def name(self): - """Gets the name of this Role. # noqa: E501 - - - :return: The name of this Role. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Role. - - - :param name: The name of this Role. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def realm_id(self): - """Gets the realm_id of this Role. # noqa: E501 - - - :return: The realm_id of this Role. # noqa: E501 - :rtype: str - """ - return self._realm_id - - @realm_id.setter - def realm_id(self, realm_id): - """Sets the realm_id of this Role. - - - :param realm_id: The realm_id of this Role. # noqa: E501 - :type: str - """ - - self._realm_id = realm_id - - @property - def users(self): - """Gets the users of this Role. # noqa: E501 - - - :return: The users of this Role. # noqa: E501 - :rtype: list[User] - """ - return self._users - - @users.setter - def users(self, users): - """Sets the users of this Role. - - - :param users: The users of this Role. # noqa: E501 - :type: list[User] - """ - - self._users = users - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Role, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Role): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/table.py b/swagger/api/api_container/models/table.py deleted file mode 100644 index 6a60176585bd6229ad8bdb321e5c863a9d4cb393..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/table.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Table(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'tdbid': 'int', - 'creator': 'User', - 'owner': 'User', - 'name': 'str', - 'internal_name': 'str', - 'queue_name': 'str', - 'routing_key': 'str', - 'description': 'str', - 'database': 'Database', - 'columns': 'list[TableColumn]', - 'constraints': 'Constraints', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'tdbid': 'tdbid', - 'creator': 'creator', - 'owner': 'owner', - 'name': 'name', - 'internal_name': 'internalName', - 'queue_name': 'queueName', - 'routing_key': 'routingKey', - 'description': 'description', - 'database': 'database', - 'columns': 'columns', - 'constraints': 'constraints', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, tdbid=None, creator=None, owner=None, name=None, internal_name=None, queue_name=None, routing_key=None, description=None, database=None, columns=None, constraints=None, created=None, last_modified=None): # noqa: E501 - """Table - a model defined in Swagger""" # noqa: E501 - self._id = None - self._tdbid = None - self._creator = None - self._owner = None - self._name = None - self._internal_name = None - self._queue_name = None - self._routing_key = None - self._description = None - self._database = None - self._columns = None - self._constraints = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if tdbid is not None: - self.tdbid = tdbid - if creator is not None: - self.creator = creator - if owner is not None: - self.owner = owner - if name is not None: - self.name = name - if internal_name is not None: - self.internal_name = internal_name - if queue_name is not None: - self.queue_name = queue_name - if routing_key is not None: - self.routing_key = routing_key - if description is not None: - self.description = description - if database is not None: - self.database = database - if columns is not None: - self.columns = columns - if constraints is not None: - self.constraints = constraints - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this Table. # noqa: E501 - - - :return: The id of this Table. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Table. - - - :param id: The id of this Table. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def tdbid(self): - """Gets the tdbid of this Table. # noqa: E501 - - - :return: The tdbid of this Table. # noqa: E501 - :rtype: int - """ - return self._tdbid - - @tdbid.setter - def tdbid(self, tdbid): - """Sets the tdbid of this Table. - - - :param tdbid: The tdbid of this Table. # noqa: E501 - :type: int - """ - - self._tdbid = tdbid - - @property - def creator(self): - """Gets the creator of this Table. # noqa: E501 - - - :return: The creator of this Table. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this Table. - - - :param creator: The creator of this Table. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def owner(self): - """Gets the owner of this Table. # noqa: E501 - - - :return: The owner of this Table. # noqa: E501 - :rtype: User - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this Table. - - - :param owner: The owner of this Table. # noqa: E501 - :type: User - """ - - self._owner = owner - - @property - def name(self): - """Gets the name of this Table. # noqa: E501 - - - :return: The name of this Table. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Table. - - - :param name: The name of this Table. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def internal_name(self): - """Gets the internal_name of this Table. # noqa: E501 - - - :return: The internal_name of this Table. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this Table. - - - :param internal_name: The internal_name of this Table. # noqa: E501 - :type: str - """ - - self._internal_name = internal_name - - @property - def queue_name(self): - """Gets the queue_name of this Table. # noqa: E501 - - - :return: The queue_name of this Table. # noqa: E501 - :rtype: str - """ - return self._queue_name - - @queue_name.setter - def queue_name(self, queue_name): - """Sets the queue_name of this Table. - - - :param queue_name: The queue_name of this Table. # noqa: E501 - :type: str - """ - - self._queue_name = queue_name - - @property - def routing_key(self): - """Gets the routing_key of this Table. # noqa: E501 - - - :return: The routing_key of this Table. # noqa: E501 - :rtype: str - """ - return self._routing_key - - @routing_key.setter - def routing_key(self, routing_key): - """Sets the routing_key of this Table. - - - :param routing_key: The routing_key of this Table. # noqa: E501 - :type: str - """ - - self._routing_key = routing_key - - @property - def description(self): - """Gets the description of this Table. # noqa: E501 - - - :return: The description of this Table. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this Table. - - - :param description: The description of this Table. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def database(self): - """Gets the database of this Table. # noqa: E501 - - - :return: The database of this Table. # noqa: E501 - :rtype: Database - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this Table. - - - :param database: The database of this Table. # noqa: E501 - :type: Database - """ - - self._database = database - - @property - def columns(self): - """Gets the columns of this Table. # noqa: E501 - - - :return: The columns of this Table. # noqa: E501 - :rtype: list[TableColumn] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this Table. - - - :param columns: The columns of this Table. # noqa: E501 - :type: list[TableColumn] - """ - - self._columns = columns - - @property - def constraints(self): - """Gets the constraints of this Table. # noqa: E501 - - - :return: The constraints of this Table. # noqa: E501 - :rtype: Constraints - """ - return self._constraints - - @constraints.setter - def constraints(self, constraints): - """Sets the constraints of this Table. - - - :param constraints: The constraints of this Table. # noqa: E501 - :type: Constraints - """ - - self._constraints = constraints - - @property - def created(self): - """Gets the created of this Table. # noqa: E501 - - - :return: The created of this Table. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this Table. - - - :param created: The created of this Table. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this Table. # noqa: E501 - - - :return: The last_modified of this Table. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this Table. - - - :param last_modified: The last_modified of this Table. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Table, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Table): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/table_brief_dto.py b/swagger/api/api_container/models/table_brief_dto.py deleted file mode 100644 index 34b45ce00f789c9103d7d0d5e7b1f1e3de92f18f..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/table_brief_dto.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableBriefDto(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', - 'description': 'str', - 'owner': 'UserBriefDto', - 'columns': 'list[ColumnBriefDto]', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'owner': 'owner', - 'columns': 'columns', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 - """TableBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._owner = None - self._columns = None - self._internal_name = None - self.discriminator = None - self.id = id - self.name = name - self.description = description - self.owner = owner - self.columns = columns - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 - - - :return: The id of this TableBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableBriefDto. - - - :param id: The id of this TableBriefDto. # 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 TableBriefDto. # noqa: E501 - - - :return: The name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableBriefDto. - - - :param name: The name of this TableBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableBriefDto. # noqa: E501 - - - :return: The description of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableBriefDto. - - - :param description: The description of this TableBriefDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def owner(self): - """Gets the owner of this TableBriefDto. # noqa: E501 - - - :return: The owner of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this TableBriefDto. - - - :param owner: The owner of this TableBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def 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 - - - :return: The internal_name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. - - - :param internal_name: The internal_name of this TableBriefDto. # 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 - - 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(TableBriefDto, 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, TableBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/table_column.py b/swagger/api/api_container/models/table_column.py deleted file mode 100644 index bfed7ffd841afc474d035697bbbc538d8988a5a3..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/table_column.py +++ /dev/null @@ -1,688 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableColumn(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'tid': 'int', - 'cdbid': 'int', - 'dfid': 'int', - 'date_format': 'ContainerImageDate', - 'table': 'Table', - 'view': 'View', - 'creator': 'User', - 'name': 'str', - 'auto_generated': 'bool', - 'internal_name': 'str', - 'is_primary_key': 'bool', - 'index_length': 'int', - 'alias': 'str', - 'column_type': 'str', - 'length': 'int', - 'is_null_allowed': 'bool', - 'enum_values': 'list[str]', - 'ordinal_position': 'int', - 'created': 'datetime', - 'concept': 'TableColumnConcept', - 'unit': 'TableColumnUnit', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'tid': 'tid', - 'cdbid': 'cdbid', - 'dfid': 'dfid', - 'date_format': 'dateFormat', - 'table': 'table', - 'view': 'view', - 'creator': 'creator', - 'name': 'name', - 'auto_generated': 'autoGenerated', - 'internal_name': 'internalName', - 'is_primary_key': 'isPrimaryKey', - 'index_length': 'indexLength', - 'alias': 'alias', - 'column_type': 'columnType', - 'length': 'length', - 'is_null_allowed': 'isNullAllowed', - 'enum_values': 'enumValues', - 'ordinal_position': 'ordinalPosition', - 'created': 'created', - 'concept': 'concept', - 'unit': 'unit', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, tid=None, cdbid=None, dfid=None, date_format=None, table=None, view=None, creator=None, name=None, auto_generated=None, internal_name=None, is_primary_key=None, index_length=None, alias=None, column_type=None, length=None, is_null_allowed=None, enum_values=None, ordinal_position=None, created=None, concept=None, unit=None, last_modified=None): # noqa: E501 - """TableColumn - a model defined in Swagger""" # noqa: E501 - self._id = None - self._tid = None - self._cdbid = None - self._dfid = None - self._date_format = None - self._table = None - self._view = None - self._creator = None - self._name = None - self._auto_generated = None - self._internal_name = None - self._is_primary_key = None - self._index_length = None - self._alias = None - self._column_type = None - self._length = None - self._is_null_allowed = None - self._enum_values = None - self._ordinal_position = None - self._created = None - self._concept = None - self._unit = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if tid is not None: - self.tid = tid - if cdbid is not None: - self.cdbid = cdbid - if dfid is not None: - self.dfid = dfid - if date_format is not None: - self.date_format = date_format - if table is not None: - self.table = table - if view is not None: - self.view = view - if creator is not None: - self.creator = creator - if name is not None: - self.name = name - if auto_generated is not None: - self.auto_generated = auto_generated - if internal_name is not None: - self.internal_name = internal_name - if is_primary_key is not None: - self.is_primary_key = is_primary_key - if index_length is not None: - self.index_length = index_length - if alias is not None: - self.alias = alias - if column_type is not None: - self.column_type = column_type - if length is not None: - self.length = length - if is_null_allowed is not None: - self.is_null_allowed = is_null_allowed - if enum_values is not None: - self.enum_values = enum_values - if ordinal_position is not None: - self.ordinal_position = ordinal_position - if created is not None: - self.created = created - if concept is not None: - self.concept = concept - if unit is not None: - self.unit = unit - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this TableColumn. # noqa: E501 - - - :return: The id of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableColumn. - - - :param id: The id of this TableColumn. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def tid(self): - """Gets the tid of this TableColumn. # noqa: E501 - - - :return: The tid of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._tid - - @tid.setter - def tid(self, tid): - """Sets the tid of this TableColumn. - - - :param tid: The tid of this TableColumn. # noqa: E501 - :type: int - """ - - self._tid = tid - - @property - def cdbid(self): - """Gets the cdbid of this TableColumn. # noqa: E501 - - - :return: The cdbid of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._cdbid - - @cdbid.setter - def cdbid(self, cdbid): - """Sets the cdbid of this TableColumn. - - - :param cdbid: The cdbid of this TableColumn. # noqa: E501 - :type: int - """ - - self._cdbid = cdbid - - @property - def dfid(self): - """Gets the dfid of this TableColumn. # noqa: E501 - - - :return: The dfid of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._dfid - - @dfid.setter - def dfid(self, dfid): - """Sets the dfid of this TableColumn. - - - :param dfid: The dfid of this TableColumn. # noqa: E501 - :type: int - """ - - self._dfid = dfid - - @property - def date_format(self): - """Gets the date_format of this TableColumn. # noqa: E501 - - - :return: The date_format of this TableColumn. # noqa: E501 - :rtype: ContainerImageDate - """ - return self._date_format - - @date_format.setter - def date_format(self, date_format): - """Sets the date_format of this TableColumn. - - - :param date_format: The date_format of this TableColumn. # noqa: E501 - :type: ContainerImageDate - """ - - self._date_format = date_format - - @property - def table(self): - """Gets the table of this TableColumn. # noqa: E501 - - - :return: The table of this TableColumn. # noqa: E501 - :rtype: Table - """ - return self._table - - @table.setter - def table(self, table): - """Sets the table of this TableColumn. - - - :param table: The table of this TableColumn. # noqa: E501 - :type: Table - """ - - self._table = table - - @property - def view(self): - """Gets the view of this TableColumn. # noqa: E501 - - - :return: The view of this TableColumn. # noqa: E501 - :rtype: View - """ - return self._view - - @view.setter - def view(self, view): - """Sets the view of this TableColumn. - - - :param view: The view of this TableColumn. # noqa: E501 - :type: View - """ - - self._view = view - - @property - def creator(self): - """Gets the creator of this TableColumn. # noqa: E501 - - - :return: The creator of this TableColumn. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this TableColumn. - - - :param creator: The creator of this TableColumn. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def name(self): - """Gets the name of this TableColumn. # noqa: E501 - - - :return: The name of this TableColumn. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableColumn. - - - :param name: The name of this TableColumn. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def auto_generated(self): - """Gets the auto_generated of this TableColumn. # noqa: E501 - - - :return: The auto_generated of this TableColumn. # noqa: E501 - :rtype: bool - """ - return self._auto_generated - - @auto_generated.setter - def auto_generated(self, auto_generated): - """Sets the auto_generated of this TableColumn. - - - :param auto_generated: The auto_generated of this TableColumn. # noqa: E501 - :type: bool - """ - - self._auto_generated = auto_generated - - @property - def internal_name(self): - """Gets the internal_name of this TableColumn. # noqa: E501 - - - :return: The internal_name of this TableColumn. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableColumn. - - - :param internal_name: The internal_name of this TableColumn. # noqa: E501 - :type: str - """ - - self._internal_name = internal_name - - @property - def is_primary_key(self): - """Gets the is_primary_key of this TableColumn. # noqa: E501 - - - :return: The is_primary_key of this TableColumn. # noqa: E501 - :rtype: bool - """ - return self._is_primary_key - - @is_primary_key.setter - def is_primary_key(self, is_primary_key): - """Sets the is_primary_key of this TableColumn. - - - :param is_primary_key: The is_primary_key of this TableColumn. # noqa: E501 - :type: bool - """ - - self._is_primary_key = is_primary_key - - @property - def index_length(self): - """Gets the index_length of this TableColumn. # noqa: E501 - - - :return: The index_length of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._index_length - - @index_length.setter - def index_length(self, index_length): - """Sets the index_length of this TableColumn. - - - :param index_length: The index_length of this TableColumn. # noqa: E501 - :type: int - """ - - self._index_length = index_length - - @property - def alias(self): - """Gets the alias of this TableColumn. # noqa: E501 - - - :return: The alias of this TableColumn. # noqa: E501 - :rtype: str - """ - return self._alias - - @alias.setter - def alias(self, alias): - """Sets the alias of this TableColumn. - - - :param alias: The alias of this TableColumn. # noqa: E501 - :type: str - """ - - self._alias = alias - - @property - def column_type(self): - """Gets the column_type of this TableColumn. # noqa: E501 - - - :return: The column_type of this TableColumn. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this TableColumn. - - - :param column_type: The column_type of this TableColumn. # noqa: E501 - :type: str - """ - allowed_values = ["TableColumnType.ENUM", "TableColumnType.NUMBER", "TableColumnType.DECIMAL", "TableColumnType.STRING", "TableColumnType.TEXT", "TableColumnType.BOOLEAN", "TableColumnType.DATE", "TableColumnType.TIMESTAMP", "TableColumnType.BLOB"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - @property - def length(self): - """Gets the length of this TableColumn. # noqa: E501 - - - :return: The length of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._length - - @length.setter - def length(self, length): - """Sets the length of this TableColumn. - - - :param length: The length of this TableColumn. # noqa: E501 - :type: int - """ - - self._length = length - - @property - def is_null_allowed(self): - """Gets the is_null_allowed of this TableColumn. # noqa: E501 - - - :return: The is_null_allowed of this TableColumn. # noqa: E501 - :rtype: bool - """ - return self._is_null_allowed - - @is_null_allowed.setter - def is_null_allowed(self, is_null_allowed): - """Sets the is_null_allowed of this TableColumn. - - - :param is_null_allowed: The is_null_allowed of this TableColumn. # noqa: E501 - :type: bool - """ - - self._is_null_allowed = is_null_allowed - - @property - def enum_values(self): - """Gets the enum_values of this TableColumn. # noqa: E501 - - - :return: The enum_values of this TableColumn. # noqa: E501 - :rtype: list[str] - """ - return self._enum_values - - @enum_values.setter - def enum_values(self, enum_values): - """Sets the enum_values of this TableColumn. - - - :param enum_values: The enum_values of this TableColumn. # noqa: E501 - :type: list[str] - """ - - self._enum_values = enum_values - - @property - def ordinal_position(self): - """Gets the ordinal_position of this TableColumn. # noqa: E501 - - - :return: The ordinal_position of this TableColumn. # noqa: E501 - :rtype: int - """ - return self._ordinal_position - - @ordinal_position.setter - def ordinal_position(self, ordinal_position): - """Sets the ordinal_position of this TableColumn. - - - :param ordinal_position: The ordinal_position of this TableColumn. # noqa: E501 - :type: int - """ - - self._ordinal_position = ordinal_position - - @property - def created(self): - """Gets the created of this TableColumn. # noqa: E501 - - - :return: The created of this TableColumn. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this TableColumn. - - - :param created: The created of this TableColumn. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def concept(self): - """Gets the concept of this TableColumn. # noqa: E501 - - - :return: The concept of this TableColumn. # noqa: E501 - :rtype: TableColumnConcept - """ - return self._concept - - @concept.setter - def concept(self, concept): - """Sets the concept of this TableColumn. - - - :param concept: The concept of this TableColumn. # noqa: E501 - :type: TableColumnConcept - """ - - self._concept = concept - - @property - def unit(self): - """Gets the unit of this TableColumn. # noqa: E501 - - - :return: The unit of this TableColumn. # noqa: E501 - :rtype: TableColumnUnit - """ - return self._unit - - @unit.setter - def unit(self, unit): - """Sets the unit of this TableColumn. - - - :param unit: The unit of this TableColumn. # noqa: E501 - :type: TableColumnUnit - """ - - self._unit = unit - - @property - def last_modified(self): - """Gets the last_modified of this TableColumn. # noqa: E501 - - - :return: The last_modified of this TableColumn. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this TableColumn. - - - :param last_modified: The last_modified of this TableColumn. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(TableColumn, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TableColumn): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/table_column_concept.py b/swagger/api/api_container/models/table_column_concept.py deleted file mode 100644 index 6ebfb1d1260461da36990e764588a85fefef1fc5..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/table_column_concept.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableColumnConcept(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[TableColumn]' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description', - 'created': 'created', - 'columns': 'columns' - } - - def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 - """TableColumnConcept - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self._created = None - self._columns = None - self.discriminator = None - if uri is not None: - self.uri = uri - if name is not None: - self.name = name - if description is not None: - self.description = description - if created is not None: - self.created = created - if columns is not None: - self.columns = columns - - @property - def uri(self): - """Gets the uri of this TableColumnConcept. # noqa: E501 - - - :return: The uri of this TableColumnConcept. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this TableColumnConcept. - - - :param uri: The uri of this TableColumnConcept. # noqa: E501 - :type: str - """ - - self._uri = uri - - @property - def name(self): - """Gets the name of this TableColumnConcept. # noqa: E501 - - - :return: The name of this TableColumnConcept. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableColumnConcept. - - - :param name: The name of this TableColumnConcept. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this TableColumnConcept. # noqa: E501 - - - :return: The description of this TableColumnConcept. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableColumnConcept. - - - :param description: The description of this TableColumnConcept. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def created(self): - """Gets the created of this TableColumnConcept. # noqa: E501 - - - :return: The created of this TableColumnConcept. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this TableColumnConcept. - - - :param created: The created of this TableColumnConcept. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def columns(self): - """Gets the columns of this TableColumnConcept. # noqa: E501 - - - :return: The columns of this TableColumnConcept. # noqa: E501 - :rtype: list[TableColumn] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this TableColumnConcept. - - - :param columns: The columns of this TableColumnConcept. # noqa: E501 - :type: list[TableColumn] - """ - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(TableColumnConcept, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TableColumnConcept): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/table_column_unit.py b/swagger/api/api_container/models/table_column_unit.py deleted file mode 100644 index eca05a2d47f4fa87534bd6fe0df73fe5a2159895..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/table_column_unit.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableColumnUnit(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[TableColumn]' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description', - 'created': 'created', - 'columns': 'columns' - } - - def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 - """TableColumnUnit - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self._created = None - self._columns = None - self.discriminator = None - if uri is not None: - self.uri = uri - if name is not None: - self.name = name - if description is not None: - self.description = description - if created is not None: - self.created = created - if columns is not None: - self.columns = columns - - @property - def uri(self): - """Gets the uri of this TableColumnUnit. # noqa: E501 - - - :return: The uri of this TableColumnUnit. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this TableColumnUnit. - - - :param uri: The uri of this TableColumnUnit. # noqa: E501 - :type: str - """ - - self._uri = uri - - @property - def name(self): - """Gets the name of this TableColumnUnit. # noqa: E501 - - - :return: The name of this TableColumnUnit. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableColumnUnit. - - - :param name: The name of this TableColumnUnit. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this TableColumnUnit. # noqa: E501 - - - :return: The description of this TableColumnUnit. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableColumnUnit. - - - :param description: The description of this TableColumnUnit. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def created(self): - """Gets the created of this TableColumnUnit. # noqa: E501 - - - :return: The created of this TableColumnUnit. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this TableColumnUnit. - - - :param created: The created of this TableColumnUnit. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def columns(self): - """Gets the columns of this TableColumnUnit. # noqa: E501 - - - :return: The columns of this TableColumnUnit. # noqa: E501 - :rtype: list[TableColumn] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this TableColumnUnit. - - - :param columns: The columns of this TableColumnUnit. # noqa: E501 - :type: list[TableColumn] - """ - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(TableColumnUnit, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TableColumnUnit): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/unique.py b/swagger/api/api_container/models/unique.py deleted file mode 100644 index 495f2582c6f990ccce248c2b7e262cdefa476e73..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/unique.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Unique(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uid': 'int', - 'tid': 'int', - 'tdbid': 'int', - 'table': 'Table', - 'columns': 'list[TableColumn]' - } - - attribute_map = { - 'uid': 'uid', - 'tid': 'tid', - 'tdbid': 'tdbid', - 'table': 'table', - 'columns': 'columns' - } - - def __init__(self, uid=None, tid=None, tdbid=None, table=None, columns=None): # noqa: E501 - """Unique - a model defined in Swagger""" # noqa: E501 - self._uid = None - self._tid = None - self._tdbid = None - self._table = None - self._columns = None - self.discriminator = None - if uid is not None: - self.uid = uid - if tid is not None: - self.tid = tid - if tdbid is not None: - self.tdbid = tdbid - if table is not None: - self.table = table - if columns is not None: - self.columns = columns - - @property - def uid(self): - """Gets the uid of this Unique. # noqa: E501 - - - :return: The uid of this Unique. # noqa: E501 - :rtype: int - """ - return self._uid - - @uid.setter - def uid(self, uid): - """Sets the uid of this Unique. - - - :param uid: The uid of this Unique. # noqa: E501 - :type: int - """ - - self._uid = uid - - @property - def tid(self): - """Gets the tid of this Unique. # noqa: E501 - - - :return: The tid of this Unique. # noqa: E501 - :rtype: int - """ - return self._tid - - @tid.setter - def tid(self, tid): - """Sets the tid of this Unique. - - - :param tid: The tid of this Unique. # noqa: E501 - :type: int - """ - - self._tid = tid - - @property - def tdbid(self): - """Gets the tdbid of this Unique. # noqa: E501 - - - :return: The tdbid of this Unique. # noqa: E501 - :rtype: int - """ - return self._tdbid - - @tdbid.setter - def tdbid(self, tdbid): - """Sets the tdbid of this Unique. - - - :param tdbid: The tdbid of this Unique. # noqa: E501 - :type: int - """ - - self._tdbid = tdbid - - @property - def table(self): - """Gets the table of this Unique. # noqa: E501 - - - :return: The table of this Unique. # noqa: E501 - :rtype: Table - """ - return self._table - - @table.setter - def table(self, table): - """Sets the table of this Unique. - - - :param table: The table of this Unique. # noqa: E501 - :type: Table - """ - - self._table = table - - @property - def columns(self): - """Gets the columns of this Unique. # noqa: E501 - - - :return: The columns of this Unique. # noqa: E501 - :rtype: list[TableColumn] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this Unique. - - - :param columns: The columns of this Unique. # noqa: E501 - :type: list[TableColumn] - """ - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(Unique, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Unique): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/user.py b/swagger/api/api_container/models/user.py deleted file mode 100644 index ed602c9d7f83e926b272f13e7a29a7ac1869a0f3..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/user.py +++ /dev/null @@ -1,526 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class User(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'firstname': 'str', - 'lastname': 'str', - 'realm_id': 'str', - 'email': 'str', - 'email_verified': 'bool', - 'enabled': 'bool', - 'created_timestamp': 'int', - 'database_password': 'str', - 'attributes': 'list[UserAttribute]', - 'credentials': 'list[Credential]', - 'containers': 'list[Container]', - 'databases': 'list[Database]', - 'identifiers': 'list[Identifier]', - 'roles': 'list[Role]', - 'tables': 'list[Table]' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'realm_id': 'realmId', - 'email': 'email', - 'email_verified': 'emailVerified', - 'enabled': 'enabled', - 'created_timestamp': 'createdTimestamp', - 'database_password': 'databasePassword', - 'attributes': 'attributes', - 'credentials': 'credentials', - 'containers': 'containers', - 'databases': 'databases', - 'identifiers': 'identifiers', - 'roles': 'roles', - 'tables': 'tables' - } - - def __init__(self, id=None, username=None, firstname=None, lastname=None, realm_id=None, email=None, email_verified=None, enabled=None, created_timestamp=None, database_password=None, attributes=None, credentials=None, containers=None, databases=None, identifiers=None, roles=None, tables=None): # noqa: E501 - """User - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._firstname = None - self._lastname = None - self._realm_id = None - self._email = None - self._email_verified = None - self._enabled = None - self._created_timestamp = None - self._database_password = None - self._attributes = None - self._credentials = None - self._containers = None - self._databases = None - self._identifiers = None - self._roles = None - self._tables = None - self.discriminator = None - if id is not None: - self.id = id - if username is not None: - self.username = username - if firstname is not None: - self.firstname = firstname - if lastname is not None: - self.lastname = lastname - if realm_id is not None: - self.realm_id = realm_id - if email is not None: - self.email = email - if email_verified is not None: - self.email_verified = email_verified - if enabled is not None: - self.enabled = enabled - if created_timestamp is not None: - self.created_timestamp = created_timestamp - if database_password is not None: - self.database_password = database_password - if attributes is not None: - self.attributes = attributes - if credentials is not None: - self.credentials = credentials - if containers is not None: - self.containers = containers - if databases is not None: - self.databases = databases - if identifiers is not None: - self.identifiers = identifiers - if roles is not None: - self.roles = roles - if tables is not None: - self.tables = tables - - @property - def id(self): - """Gets the id of this User. # noqa: E501 - - - :return: The id of this User. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this User. - - - :param id: The id of this User. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def username(self): - """Gets the username of this User. # noqa: E501 - - - :return: The username of this User. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this User. - - - :param username: The username of this User. # noqa: E501 - :type: str - """ - - self._username = username - - @property - def firstname(self): - """Gets the firstname of this User. # noqa: E501 - - - :return: The firstname of this User. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this User. - - - :param firstname: The firstname of this User. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this User. # noqa: E501 - - - :return: The lastname of this User. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this User. - - - :param lastname: The lastname of this User. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def realm_id(self): - """Gets the realm_id of this User. # noqa: E501 - - - :return: The realm_id of this User. # noqa: E501 - :rtype: str - """ - return self._realm_id - - @realm_id.setter - def realm_id(self, realm_id): - """Sets the realm_id of this User. - - - :param realm_id: The realm_id of this User. # noqa: E501 - :type: str - """ - - self._realm_id = realm_id - - @property - def email(self): - """Gets the email of this User. # noqa: E501 - - - :return: The email of this User. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this User. - - - :param email: The email of this User. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def email_verified(self): - """Gets the email_verified of this User. # noqa: E501 - - - :return: The email_verified of this User. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this User. - - - :param email_verified: The email_verified of this User. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - @property - def enabled(self): - """Gets the enabled of this User. # noqa: E501 - - - :return: The enabled of this User. # noqa: E501 - :rtype: bool - """ - return self._enabled - - @enabled.setter - def enabled(self, enabled): - """Sets the enabled of this User. - - - :param enabled: The enabled of this User. # noqa: E501 - :type: bool - """ - - self._enabled = enabled - - @property - def created_timestamp(self): - """Gets the created_timestamp of this User. # noqa: E501 - - - :return: The created_timestamp of this User. # noqa: E501 - :rtype: int - """ - return self._created_timestamp - - @created_timestamp.setter - def created_timestamp(self, created_timestamp): - """Sets the created_timestamp of this User. - - - :param created_timestamp: The created_timestamp of this User. # noqa: E501 - :type: int - """ - - self._created_timestamp = created_timestamp - - @property - def database_password(self): - """Gets the database_password of this User. # noqa: E501 - - - :return: The database_password of this User. # noqa: E501 - :rtype: str - """ - return self._database_password - - @database_password.setter - def database_password(self, database_password): - """Sets the database_password of this User. - - - :param database_password: The database_password of this User. # noqa: E501 - :type: str - """ - - self._database_password = database_password - - @property - def attributes(self): - """Gets the attributes of this User. # noqa: E501 - - - :return: The attributes of this User. # noqa: E501 - :rtype: list[UserAttribute] - """ - return self._attributes - - @attributes.setter - def attributes(self, attributes): - """Sets the attributes of this User. - - - :param attributes: The attributes of this User. # noqa: E501 - :type: list[UserAttribute] - """ - - self._attributes = attributes - - @property - def credentials(self): - """Gets the credentials of this User. # noqa: E501 - - - :return: The credentials of this User. # noqa: E501 - :rtype: list[Credential] - """ - return self._credentials - - @credentials.setter - def credentials(self, credentials): - """Sets the credentials of this User. - - - :param credentials: The credentials of this User. # noqa: E501 - :type: list[Credential] - """ - - self._credentials = credentials - - @property - def containers(self): - """Gets the containers of this User. # noqa: E501 - - - :return: The containers of this User. # noqa: E501 - :rtype: list[Container] - """ - return self._containers - - @containers.setter - def containers(self, containers): - """Sets the containers of this User. - - - :param containers: The containers of this User. # noqa: E501 - :type: list[Container] - """ - - self._containers = containers - - @property - def databases(self): - """Gets the databases of this User. # noqa: E501 - - - :return: The databases of this User. # noqa: E501 - :rtype: list[Database] - """ - return self._databases - - @databases.setter - def databases(self, databases): - """Sets the databases of this User. - - - :param databases: The databases of this User. # noqa: E501 - :type: list[Database] - """ - - self._databases = databases - - @property - def identifiers(self): - """Gets the identifiers of this User. # noqa: E501 - - - :return: The identifiers of this User. # noqa: E501 - :rtype: list[Identifier] - """ - return self._identifiers - - @identifiers.setter - def identifiers(self, identifiers): - """Sets the identifiers of this User. - - - :param identifiers: The identifiers of this User. # noqa: E501 - :type: list[Identifier] - """ - - self._identifiers = identifiers - - @property - def roles(self): - """Gets the roles of this User. # noqa: E501 - - - :return: The roles of this User. # noqa: E501 - :rtype: list[Role] - """ - return self._roles - - @roles.setter - def roles(self, roles): - """Sets the roles of this User. - - - :param roles: The roles of this User. # noqa: E501 - :type: list[Role] - """ - - self._roles = roles - - @property - def tables(self): - """Gets the tables of this User. # noqa: E501 - - - :return: The tables of this User. # noqa: E501 - :rtype: list[Table] - """ - return self._tables - - @tables.setter - def tables(self, tables): - """Sets the tables of this User. - - - :param tables: The tables of this User. # noqa: E501 - :type: list[Table] - """ - - self._tables = tables - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(User, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, User): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/user_attribute.py b/swagger/api/api_container/models/user_attribute.py deleted file mode 100644 index f497a5e06c774c3f1779cdefc7d29ce3a82211e0..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/user_attribute.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserAttribute(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'user_id': 'str', - 'name': 'str', - 'value': 'str', - 'user': 'User' - } - - attribute_map = { - 'id': 'id', - 'user_id': 'userId', - 'name': 'name', - 'value': 'value', - 'user': 'user' - } - - def __init__(self, id=None, user_id=None, name=None, value=None, user=None): # noqa: E501 - """UserAttribute - a model defined in Swagger""" # noqa: E501 - self._id = None - self._user_id = None - self._name = None - self._value = None - self._user = None - self.discriminator = None - if id is not None: - self.id = id - if user_id is not None: - self.user_id = user_id - if name is not None: - self.name = name - if value is not None: - self.value = value - if user is not None: - self.user = user - - @property - def id(self): - """Gets the id of this UserAttribute. # noqa: E501 - - - :return: The id of this UserAttribute. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserAttribute. - - - :param id: The id of this UserAttribute. # noqa: E501 - :type: str - """ - - self._id = id - - @property - def user_id(self): - """Gets the user_id of this UserAttribute. # noqa: E501 - - - :return: The user_id of this UserAttribute. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this UserAttribute. - - - :param user_id: The user_id of this UserAttribute. # noqa: E501 - :type: str - """ - - self._user_id = user_id - - @property - def name(self): - """Gets the name of this UserAttribute. # noqa: E501 - - - :return: The name of this UserAttribute. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserAttribute. - - - :param name: The name of this UserAttribute. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def value(self): - """Gets the value of this UserAttribute. # noqa: E501 - - - :return: The value of this UserAttribute. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this UserAttribute. - - - :param value: The value of this UserAttribute. # noqa: E501 - :type: str - """ - - self._value = value - - @property - def user(self): - """Gets the user of this UserAttribute. # noqa: E501 - - - :return: The user of this UserAttribute. # noqa: E501 - :rtype: User - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this UserAttribute. - - - :param user: The user of this UserAttribute. # noqa: E501 - :type: User - """ - - self._user = user - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserAttribute, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserAttribute): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/user_attribute_dto.py b/swagger/api/api_container/models/user_attribute_dto.py deleted file mode 100644 index 9dfb3505ef20001bcb4e88f9849e5eca610c85a4..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/user_attribute_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserAttributeDto(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', - 'value': 'str' - } - - attribute_map = { - 'name': 'name', - 'value': 'value' - } - - def __init__(self, name=None, value=None): # noqa: E501 - """UserAttributeDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._value = None - self.discriminator = None - if name is not None: - self.name = name - if value is not None: - self.value = value - - @property - def name(self): - """Gets the name of this UserAttributeDto. # noqa: E501 - - - :return: The name of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserAttributeDto. - - - :param name: The name of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def value(self): - """Gets the value of this UserAttributeDto. # noqa: E501 - - - :return: The value of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this UserAttributeDto. - - - :param value: The value of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._value = value - - 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(UserAttributeDto, 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, UserAttributeDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/user_brief_dto.py b/swagger/api/api_container/models/user_brief_dto.py deleted file mode 100644 index 1ee3568ca3e5a449fc7e7a590e0bb355970c3309..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/user_brief_dto.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBriefDto. - - - :param id: The id of this UserBriefDto. # noqa: E501 - :type: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this UserBriefDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBriefDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserBriefDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def name(self): - """Gets the name of this UserBriefDto. # noqa: E501 - - - :return: The name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBriefDto. - - - :param name: The name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def orcid(self): - """Gets the orcid of this UserBriefDto. # noqa: E501 - - - :return: The orcid of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserBriefDto. - - - :param orcid: The orcid of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def given_name(self): - """Gets the given_name of this UserBriefDto. # noqa: E501 - - - :return: The given_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserBriefDto. - - - :param given_name: The given_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserBriefDto. # noqa: E501 - - - :return: The family_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserBriefDto. - - - :param family_name: The family_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @property - def email_verified(self): - """Gets the email_verified of this UserBriefDto. # noqa: E501 - - - :return: The email_verified of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserBriefDto. - - - :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/user_dto.py b/swagger/api/api_container/models/user_dto.py deleted file mode 100644 index a530fd4d16abf2a42294a8c7bdb468c63ed90d27..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/user_dto.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'attributes': 'list[UserAttributeDto]', - 'containers': 'list[ContainerDto]', - 'databases': 'list[ContainerDto]', - 'identifiers': 'list[ContainerDto]', - 'email': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'attributes': 'attributes', - 'containers': 'containers', - 'databases': 'databases', - 'identifiers': 'identifiers', - 'email': 'email', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, attributes=None, containers=None, databases=None, identifiers=None, email=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._attributes = None - self._containers = None - self._databases = None - self._identifiers = None - self._email = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if attributes is not None: - self.attributes = attributes - 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 given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - 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: str - """ - 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: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this 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 name(self): - """Gets the name of this UserDto. # noqa: E501 - - - :return: The name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserDto. - - - :param name: The name of this UserDto. # noqa: E501 - :type: str - """ - - self._name = name - - @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 attributes(self): - """Gets the attributes of this UserDto. # noqa: E501 - - - :return: The attributes of this UserDto. # noqa: E501 - :rtype: list[UserAttributeDto] - """ - return self._attributes - - @attributes.setter - def attributes(self, attributes): - """Sets the attributes of this UserDto. - - - :param attributes: The attributes of this UserDto. # noqa: E501 - :type: list[UserAttributeDto] - """ - - self._attributes = attributes - - @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 given_name(self): - """Gets the given_name of this UserDto. # noqa: E501 - - - :return: The given_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserDto. - - - :param given_name: The given_name of this UserDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserDto. # noqa: E501 - - - :return: The family_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserDto. - - - :param family_name: The family_name of this UserDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @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_container/models/view.py b/swagger/api/api_container/models/view.py deleted file mode 100644 index 8aff6664edd4b3bb98f15f28deced7c9b27a81e0..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/view.py +++ /dev/null @@ -1,448 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class View(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'vcid': 'int', - 'vdbid': 'int', - 'created_by': 'str', - 'creator': 'User', - 'database': 'Database', - 'name': 'str', - 'internal_name': 'str', - 'is_public': 'bool', - 'is_initial_view': 'bool', - 'query': 'str', - 'columns': 'list[TableColumn]', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'vcid': 'vcid', - 'vdbid': 'vdbid', - 'created_by': 'createdBy', - 'creator': 'creator', - 'database': 'database', - 'name': 'name', - 'internal_name': 'internalName', - 'is_public': 'isPublic', - 'is_initial_view': 'isInitialView', - 'query': 'query', - 'columns': 'columns', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, vcid=None, vdbid=None, created_by=None, creator=None, database=None, name=None, internal_name=None, is_public=None, is_initial_view=None, query=None, columns=None, created=None, last_modified=None): # noqa: E501 - """View - a model defined in Swagger""" # noqa: E501 - self._id = None - self._vcid = None - self._vdbid = None - self._created_by = None - self._creator = None - self._database = None - self._name = None - self._internal_name = None - self._is_public = None - self._is_initial_view = None - self._query = None - self._columns = None - self._created = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - if vcid is not None: - self.vcid = vcid - if vdbid is not None: - self.vdbid = vdbid - if created_by is not None: - self.created_by = created_by - if creator is not None: - self.creator = creator - if database is not None: - self.database = database - if name is not None: - self.name = name - if internal_name is not None: - self.internal_name = internal_name - if is_public is not None: - self.is_public = is_public - if is_initial_view is not None: - self.is_initial_view = is_initial_view - if query is not None: - self.query = query - if columns is not None: - self.columns = columns - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this View. # noqa: E501 - - - :return: The id of this View. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this View. - - - :param id: The id of this View. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def vcid(self): - """Gets the vcid of this View. # noqa: E501 - - - :return: The vcid of this View. # noqa: E501 - :rtype: int - """ - return self._vcid - - @vcid.setter - def vcid(self, vcid): - """Sets the vcid of this View. - - - :param vcid: The vcid of this View. # noqa: E501 - :type: int - """ - - self._vcid = vcid - - @property - def vdbid(self): - """Gets the vdbid of this View. # noqa: E501 - - - :return: The vdbid of this View. # noqa: E501 - :rtype: int - """ - return self._vdbid - - @vdbid.setter - def vdbid(self, vdbid): - """Sets the vdbid of this View. - - - :param vdbid: The vdbid of this View. # noqa: E501 - :type: int - """ - - self._vdbid = vdbid - - @property - def created_by(self): - """Gets the created_by of this View. # noqa: E501 - - - :return: The created_by of this View. # noqa: E501 - :rtype: str - """ - return self._created_by - - @created_by.setter - def created_by(self, created_by): - """Sets the created_by of this View. - - - :param created_by: The created_by of this View. # noqa: E501 - :type: str - """ - - self._created_by = created_by - - @property - def creator(self): - """Gets the creator of this View. # noqa: E501 - - - :return: The creator of this View. # noqa: E501 - :rtype: User - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this View. - - - :param creator: The creator of this View. # noqa: E501 - :type: User - """ - - self._creator = creator - - @property - def database(self): - """Gets the database of this View. # noqa: E501 - - - :return: The database of this View. # noqa: E501 - :rtype: Database - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this View. - - - :param database: The database of this View. # noqa: E501 - :type: Database - """ - - self._database = database - - @property - def name(self): - """Gets the name of this View. # noqa: E501 - - - :return: The name of this View. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this View. - - - :param name: The name of this View. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def internal_name(self): - """Gets the internal_name of this View. # noqa: E501 - - - :return: The internal_name of this View. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this View. - - - :param internal_name: The internal_name of this View. # noqa: E501 - :type: str - """ - - self._internal_name = internal_name - - @property - def is_public(self): - """Gets the is_public of this View. # noqa: E501 - - - :return: The is_public of this View. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this View. - - - :param is_public: The is_public of this View. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - - @property - def is_initial_view(self): - """Gets the is_initial_view of this View. # noqa: E501 - - - :return: The is_initial_view of this View. # noqa: E501 - :rtype: bool - """ - return self._is_initial_view - - @is_initial_view.setter - def is_initial_view(self, is_initial_view): - """Sets the is_initial_view of this View. - - - :param is_initial_view: The is_initial_view of this View. # noqa: E501 - :type: bool - """ - - self._is_initial_view = is_initial_view - - @property - def query(self): - """Gets the query of this View. # noqa: E501 - - - :return: The query of this View. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this View. - - - :param query: The query of this View. # noqa: E501 - :type: str - """ - - self._query = query - - @property - def columns(self): - """Gets the columns of this View. # noqa: E501 - - - :return: The columns of this View. # noqa: E501 - :rtype: list[TableColumn] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this View. - - - :param columns: The columns of this View. # noqa: E501 - :type: list[TableColumn] - """ - - self._columns = columns - - @property - def created(self): - """Gets the created of this View. # noqa: E501 - - - :return: The created of this View. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this View. - - - :param created: The created of this View. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this View. # noqa: E501 - - - :return: The last_modified of this View. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this View. - - - :param last_modified: The last_modified of this View. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(View, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, View): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_container/models/view_brief_dto.py b/swagger/api/api_container/models/view_brief_dto.py deleted file mode 100644 index c6a9951b4f7fa90eb63e0a5c540e6645697a802d..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/models/view_brief_dto.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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/rest.py b/swagger/api/api_container/rest.py deleted file mode 100644 index 1f97da32562b20513feaf1f46e155d98e56b5055..0000000000000000000000000000000000000000 --- a/swagger/api/api_container/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Container Service API - - Service that manages the containers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_database/__init__.py b/swagger/api/api_database/__init__.py deleted file mode 100644 index 15a18f58608c3b5da800cff4a463fc226b3eb193..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/__init__.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_database.api.access_endpoint_api import AccessEndpointApi -from api_database.api.database_endpoint_api import DatabaseEndpointApi -from api_database.api.license_endpoint_api import LicenseEndpointApi -# import ApiClient -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_brief_dto import CreatorBriefDto -from api_database.models.creator_dto import CreatorDto -from api_database.models.database_access_dto import DatabaseAccessDto -from api_database.models.database_brief_dto import DatabaseBriefDto -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.identifier_brief_dto import IdentifierBriefDto -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.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_attribute_dto import UserAttributeDto -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/__init__.py b/swagger/api/api_database/api/__init__.py deleted file mode 100644 index ee03764b97972d79280bdbc1c1ff14f575da809d..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/api/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_database.api.access_endpoint_api import AccessEndpointApi -from api_database.api.database_endpoint_api import DatabaseEndpointApi -from api_database.api.license_endpoint_api import LicenseEndpointApi diff --git a/swagger/api/api_database/api/access_endpoint_api.py b/swagger/api/api_database/api/access_endpoint_api.py deleted file mode 100644 index 28a152ab19139847e3227a4ca3e1ea9c683fd19d..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/api/access_endpoint_api.py +++ /dev/null @@ -1,477 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_database.api_client import ApiClient - - -class AccessEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create1(self, body, id, database_id, **kwargs): # noqa: E501 - """Give 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.create1(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DatabaseGiveAccessDto body: (required) - :param int id: (required) - :param int database_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create1_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.create1_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - return data - - def create1_with_http_info(self, body, id, database_id, **kwargs): # noqa: E501 - """Give 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.create1_with_http_info(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DatabaseGiveAccessDto body: (required) - :param int id: (required) - :param int database_id: (required) - :return: None - 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 create1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create1`") # noqa: E501 - # 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 `create1`") # 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 `create1`") # 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( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/access', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find(self, id, database_id, **kwargs): # noqa: E501 - """Check 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.find(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: DatabaseAccessDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_with_http_info(id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.find_with_http_info(id, database_id, **kwargs) # noqa: E501 - return data - - def find_with_http_info(self, id, database_id, **kwargs): # noqa: E501 - """Check 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.find_with_http_info(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: DatabaseAccessDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['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 find" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find`") # noqa: E501 - # 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 `find`") # 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/access', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DatabaseAccessDto', # 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 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.revoke(id, database_id, username, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param str username: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.revoke_with_http_info(id, database_id, username, **kwargs) # noqa: E501 - else: - (data) = self.revoke_with_http_info(id, database_id, username, **kwargs) # noqa: E501 - return data - - 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.revoke_with_http_info(id, database_id, username, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param str username: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - 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') - 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 revoke" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `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 `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 `revoke`") # 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 - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/access/{username}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def 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.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) - :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.update_with_http_info(body, id, database_id, username, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, 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 - - 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) - >>> result = thread.get() - - :param async_req bool - :param DatabaseModifyAccessDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param str username: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - 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') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - # 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 - # 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 - - 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 - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/access/{username}', '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_database/api/database_endpoint_api.py b/swagger/api/api_database/api/database_endpoint_api.py deleted file mode 100644 index 660a40368d25315227c55b94313ee6336e40b048..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/api/database_endpoint_api.py +++ /dev/null @@ -1,659 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_database.api_client import ApiClient - - -class DatabaseEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, body, id, **kwargs): # noqa: E501 - """Create 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.create(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DatabaseCreateDto body: (required) - :param int id: (required) - :return: DatabaseBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Create 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.create_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DatabaseCreateDto body: (required) - :param int id: (required) - :return: DatabaseBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - # 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 `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DatabaseBriefDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, database_id, **kwargs): # noqa: E501 - """Delete 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.delete(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: DatabaseBriefDto - 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, database_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, database_id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, database_id, **kwargs): # noqa: E501 - """Delete 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.delete_with_http_info(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: DatabaseBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['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 delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - # 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 `delete`") # 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DatabaseBriefDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_by_id(self, id, database_id, **kwargs): # noqa: E501 - """Find 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.find_by_id(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :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.find_by_id_with_http_info(id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.find_by_id_with_http_info(id, database_id, **kwargs) # noqa: E501 - return data - - def find_by_id_with_http_info(self, id, database_id, **kwargs): # noqa: E501 - """Find 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.find_by_id_with_http_info(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: DatabaseDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['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 find_by_id" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find_by_id`") # 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 `find_by_id`") # 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}', 'GET', - 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) - - def list(self, id, **kwargs): # noqa: E501 - """List databases # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: list[DatabaseBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.list_with_http_info(id, **kwargs) # noqa: E501 - return data - - def list_with_http_info(self, id, **kwargs): # noqa: E501 - """List databases # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: list[DatabaseBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `list`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[DatabaseBriefDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def transfer(self, body, id, database_id, **kwargs): # noqa: E501 - """Transfer 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.transfer(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DatabaseTransferDto 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.transfer_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.transfer_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - return data - - def transfer_with_http_info(self, body, id, database_id, **kwargs): # noqa: E501 - """Transfer 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.transfer_with_http_info(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DatabaseTransferDto 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 transfer" % 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 `transfer`") # 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 `transfer`") # 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 `transfer`") # 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( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/transfer', '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) - - 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( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/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/api/license_endpoint_api.py b/swagger/api/api_database/api/license_endpoint_api.py deleted file mode 100644 index 82e1f10efe88ff1a67009df266804c8e3684cdec..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/api/license_endpoint_api.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_database.api_client import ApiClient - - -class LicenseEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def list1(self, id, **kwargs): # noqa: E501 - """Get all licenses # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list1(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: list[LicenseDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list1_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.list1_with_http_info(id, **kwargs) # noqa: E501 - return data - - def list1_with_http_info(self, id, **kwargs): # noqa: E501 - """Get all licenses # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list1_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: list[LicenseDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `list1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/license', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[LicenseDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_database/api_client.py b/swagger/api/api_database/api_client.py deleted file mode 100644 index 1a39fa91a0e2e9f06d2deb79d282cb4d998257f4..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_database.configuration import Configuration -import api_database.models -from api_database import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_database.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_database/configuration.py b/swagger/api/api_database/configuration.py deleted file mode 100644 index c3cf48f379b8388c829db1aae382ccc17986a000..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_database") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_database/models/__init__.py b/swagger/api/api_database/models/__init__.py deleted file mode 100644 index 20304c00d91dc99cda17b784b92ccaea13a00b83..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import 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_brief_dto import CreatorBriefDto -from api_database.models.creator_dto import CreatorDto -from api_database.models.database_access_dto import DatabaseAccessDto -from api_database.models.database_brief_dto import DatabaseBriefDto -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.identifier_brief_dto import IdentifierBriefDto -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.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_attribute_dto import UserAttributeDto -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/api_error_dto.py b/swagger/api/api_database/models/api_error_dto.py deleted file mode 100644 index c5b8e89f5ba13d94df1a88f25b6b44478fb38497..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_database/models/column_brief_dto.py b/swagger/api/api_database/models/column_brief_dto.py deleted file mode 100644 index fe2553e01aa1c48428486e3b870e8d6815de21ab..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/column_brief_dto.py +++ /dev/null @@ -1,252 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'database_id': 'int', - 'table_id': 'int', - 'internal_name': 'str', - 'column_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'database_id': 'database_id', - 'table_id': 'table_id', - 'internal_name': 'internal_name', - 'column_type': 'column_type' - } - - def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 - """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._database_id = None - self._table_id = None - self._internal_name = None - self._column_type = None - self.discriminator = None - self.id = id - self.name = name - self.database_id = database_id - self.table_id = table_id - self.internal_name = internal_name - self.column_type = column_type - - @property - def id(self): - """Gets the id of this ColumnBriefDto. # noqa: E501 - - - :return: The id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnBriefDto. - - - :param id: The id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this ColumnBriefDto. # noqa: E501 - - - :return: The name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnBriefDto. - - - :param name: The name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def database_id(self): - """Gets the database_id of this ColumnBriefDto. # noqa: E501 - - - :return: The database_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this ColumnBriefDto. - - - :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this ColumnBriefDto. # noqa: E501 - - - :return: The table_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this ColumnBriefDto. - - - :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def internal_name(self): - """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - - - :return: The internal_name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnBriefDto. - - - :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if internal_name is None: - raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - - self._internal_name = internal_name - - @property - def column_type(self): - """Gets the column_type of this ColumnBriefDto. # noqa: E501 - - - :return: The column_type of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnBriefDto. - - - :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if column_type is None: - raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ColumnBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ColumnBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_database/models/container_brief_dto.py b/swagger/api/api_database/models/container_brief_dto.py deleted file mode 100644 index f5aaa576d82329c1c28760a0d3abad9912ff05d9..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/container_brief_dto.py +++ /dev/null @@ -1,298 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ContainerBriefDto(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', - 'creator': 'UserBriefDto', - 'running': 'bool', - 'database': 'DatabaseBriefDto', - 'created': 'datetime', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'creator': 'creator', - 'running': 'running', - 'database': 'database', - 'created': 'created', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, hash=None, name=None, creator=None, running=None, database=None, created=None, internal_name=None): # noqa: E501 - """ContainerBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._hash = None - self._name = None - self._creator = None - self._running = None - self._database = None - self._created = None - self._internal_name = None - self.discriminator = None - self.id = id - self.hash = hash - self.name = name - self.creator = creator - self.running = running - if database is not None: - self.database = database - if created is not None: - self.created = created - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this ContainerBriefDto. # noqa: E501 - - - :return: The id of this ContainerBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ContainerBriefDto. - - - :param id: The id of this ContainerBriefDto. # 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 ContainerBriefDto. # noqa: E501 - - - :return: The hash of this ContainerBriefDto. # noqa: E501 - :rtype: str - """ - return self._hash - - @hash.setter - def hash(self, hash): - """Sets the hash of this ContainerBriefDto. - - - :param hash: The hash of this ContainerBriefDto. # 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 ContainerBriefDto. # noqa: E501 - - - :return: The name of this ContainerBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ContainerBriefDto. - - - :param name: The name of this ContainerBriefDto. # 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 creator(self): - """Gets the creator of this ContainerBriefDto. # noqa: E501 - - - :return: The creator of this ContainerBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this ContainerBriefDto. - - - :param creator: The creator of this ContainerBriefDto. # 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 running(self): - """Gets the running of this ContainerBriefDto. # noqa: E501 - - - :return: The running of this ContainerBriefDto. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this ContainerBriefDto. - - - :param running: The running of this ContainerBriefDto. # noqa: E501 - :type: bool - """ - if running is None: - raise ValueError("Invalid value for `running`, must not be `None`") # noqa: E501 - - self._running = running - - @property - def database(self): - """Gets the database of this ContainerBriefDto. # noqa: E501 - - - :return: The database of this ContainerBriefDto. # noqa: E501 - :rtype: DatabaseBriefDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerBriefDto. - - - :param database: The database of this ContainerBriefDto. # noqa: E501 - :type: DatabaseBriefDto - """ - - self._database = database - - @property - def created(self): - """Gets the created of this ContainerBriefDto. # noqa: E501 - - - :return: The created of this ContainerBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ContainerBriefDto. - - - :param created: The created of this ContainerBriefDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def internal_name(self): - """Gets the internal_name of this ContainerBriefDto. # noqa: E501 - - - :return: The internal_name of this ContainerBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ContainerBriefDto. - - - :param internal_name: The internal_name of this ContainerBriefDto. # 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 - - 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(ContainerBriefDto, 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, ContainerBriefDto): - 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 deleted file mode 100644 index c4a7b31054045ae935f4530febf48c3ce835a9ad..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/container_dto.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'database': 'DatabaseDto', - 'running': 'bool', - 'image': 'ImageBriefDto', - 'port': 'int', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - 'database': 'database', - 'running': 'running', - '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, running=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 - self._name = None - self._state = None - self._database = None - self._running = None - self._image = None - self._port = None - self._owner = 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 database is not None: - self.database = database - self.running = running - if image is not None: - 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: - 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 database(self): - """Gets the database of this ContainerDto. # noqa: E501 - - - :return: The database of this ContainerDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerDto. - - - :param database: The database of this ContainerDto. # noqa: E501 - :type: DatabaseDto - """ - - self._database = database - - @property - def running(self): - """Gets the running of this ContainerDto. # noqa: E501 - - - :return: The running of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this ContainerDto. - - - :param running: The running of this ContainerDto. # noqa: E501 - :type: bool - """ - if running is None: - raise ValueError("Invalid value for `running`, must not be `None`") # noqa: E501 - - self._running = running - - @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 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 - - - :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_database/models/creator_brief_dto.py b/swagger/api/api_database/models/creator_brief_dto.py deleted file mode 100644 index a4dae99119d0c6b0b28b9a4a980f0f127e67b353..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/creator_brief_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str' - } - - attribute_map = { - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation' - } - - def __init__(self, firstname=None, lastname=None, affiliation=None): # noqa: E501 - """CreatorBriefDto - a model defined in Swagger""" # noqa: E501 - self._firstname = None - self._lastname = None - self._affiliation = None - self.discriminator = None - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - - @property - def firstname(self): - """Gets the firstname of this CreatorBriefDto. # noqa: E501 - - - :return: The firstname of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorBriefDto. - - - :param firstname: The firstname of this CreatorBriefDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorBriefDto. # noqa: E501 - - - :return: The lastname of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorBriefDto. - - - :param lastname: The lastname of this CreatorBriefDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorBriefDto. # noqa: E501 - - - :return: The affiliation of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorBriefDto. - - - :param affiliation: The affiliation of this CreatorBriefDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CreatorBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatorBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_database/models/creator_dto.py b/swagger/api/api_database/models/creator_dto.py deleted file mode 100644 index 383cdb181461685267258bc79f45e6cd3c95ee95..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/creator_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(CreatorDto, 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, CreatorDto): - 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/database_access_dto.py b/swagger/api/api_database/models/database_access_dto.py deleted file mode 100644 index 9dd25e2eca885bb7b139c22600e269161744607d..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_access_dto.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseAccessDto(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 = { - 'user': 'UserDto', - 'type': 'str', - 'created': 'datetime' - } - - attribute_map = { - 'user': 'user', - 'type': 'type', - 'created': 'created' - } - - def __init__(self, user=None, type=None, created=None): # noqa: E501 - """DatabaseAccessDto - a model defined in Swagger""" # noqa: E501 - self._user = None - self._type = None - self._created = None - self.discriminator = None - self.user = user - self.type = type - if created is not None: - self.created = created - - @property - def user(self): - """Gets the user of this DatabaseAccessDto. # noqa: E501 - - - :return: The user of this DatabaseAccessDto. # noqa: E501 - :rtype: UserDto - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this DatabaseAccessDto. - - - :param user: The user of this DatabaseAccessDto. # noqa: E501 - :type: UserDto - """ - if user is None: - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def type(self): - """Gets the type of this DatabaseAccessDto. # noqa: E501 - - - :return: The type of this DatabaseAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseAccessDto. - - - :param type: The type of this DatabaseAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def created(self): - """Gets the created of this DatabaseAccessDto. # noqa: E501 - - - :return: The created of this DatabaseAccessDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseAccessDto. - - - :param created: The created of this DatabaseAccessDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - 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(DatabaseAccessDto, 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, DatabaseAccessDto): - 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/database_brief_dto.py b/swagger/api/api_database/models/database_brief_dto.py deleted file mode 100644 index d8b2048d6627c0886654ba157427a6e6fdb28513..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_brief_dto.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseBriefDto(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', - 'description': 'str', - 'identifier': 'IdentifierBriefDto', - 'engine': 'str', - 'owner': 'UserBriefDto', - 'container': 'ContainerBriefDto', - 'creator': 'UserBriefDto', - 'created': 'datetime', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'identifier': 'identifier', - 'engine': 'engine', - 'owner': 'owner', - 'container': 'container', - 'creator': 'creator', - 'created': 'created', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, description=None, identifier=None, engine=None, owner=None, container=None, creator=None, created=None, is_public=None): # noqa: E501 - """DatabaseBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._identifier = None - self._engine = None - self._owner = None - self._container = None - self._creator = None - self._created = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - if description is not None: - self.description = description - if identifier is not None: - self.identifier = identifier - if engine is not None: - self.engine = engine - self.owner = owner - if container is not None: - self.container = container - if creator is not None: - self.creator = creator - if created is not None: - self.created = created - if is_public is not None: - self.is_public = is_public - - @property - def id(self): - """Gets the id of this DatabaseBriefDto. # noqa: E501 - - - :return: The id of this DatabaseBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DatabaseBriefDto. - - - :param id: The id of this DatabaseBriefDto. # 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 DatabaseBriefDto. # noqa: E501 - - - :return: The name of this DatabaseBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DatabaseBriefDto. - - - :param name: The name of this DatabaseBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this DatabaseBriefDto. # noqa: E501 - - - :return: The description of this DatabaseBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this DatabaseBriefDto. - - - :param description: The description of this DatabaseBriefDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def identifier(self): - """Gets the identifier of this DatabaseBriefDto. # noqa: E501 - - - :return: The identifier of this DatabaseBriefDto. # noqa: E501 - :rtype: IdentifierBriefDto - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this DatabaseBriefDto. - - - :param identifier: The identifier of this DatabaseBriefDto. # noqa: E501 - :type: IdentifierBriefDto - """ - - self._identifier = identifier - - @property - def engine(self): - """Gets the engine of this DatabaseBriefDto. # noqa: E501 - - - :return: The engine of this DatabaseBriefDto. # noqa: E501 - :rtype: str - """ - return self._engine - - @engine.setter - def engine(self, engine): - """Sets the engine of this DatabaseBriefDto. - - - :param engine: The engine of this DatabaseBriefDto. # noqa: E501 - :type: str - """ - - self._engine = engine - - @property - def owner(self): - """Gets the owner of this DatabaseBriefDto. # noqa: E501 - - - :return: The owner of this DatabaseBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this DatabaseBriefDto. - - - :param owner: The owner of this DatabaseBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def container(self): - """Gets the container of this DatabaseBriefDto. # noqa: E501 - - - :return: The container of this DatabaseBriefDto. # noqa: E501 - :rtype: ContainerBriefDto - """ - return self._container - - @container.setter - def container(self, container): - """Sets the container of this DatabaseBriefDto. - - - :param container: The container of this DatabaseBriefDto. # noqa: E501 - :type: ContainerBriefDto - """ - - self._container = container - - @property - def creator(self): - """Gets the creator of this DatabaseBriefDto. # noqa: E501 - - - :return: The creator of this DatabaseBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseBriefDto. - - - :param creator: The creator of this DatabaseBriefDto. # noqa: E501 - :type: UserBriefDto - """ - - self._creator = creator - - @property - def created(self): - """Gets the created of this DatabaseBriefDto. # noqa: E501 - - - :return: The created of this DatabaseBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseBriefDto. - - - :param created: The created of this DatabaseBriefDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def is_public(self): - """Gets the is_public of this DatabaseBriefDto. # noqa: E501 - - - :return: The is_public of this DatabaseBriefDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseBriefDto. - - - :param is_public: The is_public of this DatabaseBriefDto. # 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(DatabaseBriefDto, 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, DatabaseBriefDto): - 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/database_create_dto.py b/swagger/api/api_database/models/database_create_dto.py deleted file mode 100644 index 8e5a88577f83d8a6e9ea8d5c6ad4e436fda97d4b..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_create_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseCreateDto(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', - 'is_public': 'bool' - } - - attribute_map = { - 'name': 'name', - 'is_public': 'is_public' - } - - def __init__(self, name=None, is_public=None): # noqa: E501 - """DatabaseCreateDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._is_public = None - self.discriminator = None - self.name = name - self.is_public = is_public - - @property - def name(self): - """Gets the name of this DatabaseCreateDto. # noqa: E501 - - - :return: The name of this DatabaseCreateDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DatabaseCreateDto. - - - :param name: The name of this DatabaseCreateDto. # 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 is_public(self): - """Gets the is_public of this DatabaseCreateDto. # noqa: E501 - - - :return: The is_public of this DatabaseCreateDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseCreateDto. - - - :param is_public: The is_public of this DatabaseCreateDto. # 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 = {} - - 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(DatabaseCreateDto, 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, DatabaseCreateDto): - 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/database_dto.py b/swagger/api/api_database/models/database_dto.py deleted file mode 100644 index aba817238039711b5574bf7b3f3831a523444949..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_dto.py +++ /dev/null @@ -1,480 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'identifier': 'IdentifierDto', - 'description': 'str', - 'tables': 'list[TableBriefDto]', - 'views': 'list[ViewBriefDto]', - 'image': 'ImageDto', - 'container': 'ContainerDto', - 'accesses': 'list[DatabaseAccessDto]', - 'creator': 'UserBriefDto', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'exchange_name': 'str', - 'internal_name': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'identifier': 'identifier', - 'description': 'description', - 'tables': 'tables', - 'views': 'views', - 'image': 'image', - 'container': 'container', - 'accesses': 'accesses', - 'creator': 'creator', - 'owner': 'owner', - 'created': 'created', - 'exchange_name': 'exchange_name', - 'internal_name': 'internal_name', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, creator=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 - self._identifier = None - self._description = None - self._tables = None - self._views = None - self._image = None - self._container = None - self._accesses = None - self._creator = None - self._owner = None - self._created = None - self._exchange_name = None - self._internal_name = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - 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 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 - self.creator = creator - self.owner = owner - if created is not None: - self.created = created - self.exchange_name = exchange_name - 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 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 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 - - - :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 accesses(self): - """Gets the accesses of this DatabaseDto. # noqa: E501 - - - :return: The accesses of this DatabaseDto. # noqa: E501 - :rtype: list[DatabaseAccessDto] - """ - return self._accesses - - @accesses.setter - def accesses(self, accesses): - """Sets the accesses of this DatabaseDto. - - - :param accesses: The accesses of this DatabaseDto. # noqa: E501 - :type: list[DatabaseAccessDto] - """ - - self._accesses = accesses - - @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 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 - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @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 exchange_name(self): - """Gets the exchange_name of this DatabaseDto. # noqa: E501 - - - :return: The exchange_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this DatabaseDto. - - - :param exchange_name: The exchange_name of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange_name is None: - raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 - - self._exchange_name = exchange_name - - @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_database/models/database_give_access_dto.py b/swagger/api/api_database/models/database_give_access_dto.py deleted file mode 100644 index 9c6883b8d236df7110c3eae6b6efcb82facb39fe..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_give_access_dto.py +++ /dev/null @@ -1,144 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseGiveAccessDto(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 = { - 'username': 'str', - 'type': 'str' - } - - attribute_map = { - 'username': 'username', - 'type': 'type' - } - - def __init__(self, username=None, type=None): # noqa: E501 - """DatabaseGiveAccessDto - a model defined in Swagger""" # noqa: E501 - self._username = None - self._type = None - self.discriminator = None - self.username = username - self.type = type - - @property - def username(self): - """Gets the username of this DatabaseGiveAccessDto. # noqa: E501 - - - :return: The username of this DatabaseGiveAccessDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this DatabaseGiveAccessDto. - - - :param username: The username of this DatabaseGiveAccessDto. # 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 type(self): - """Gets the type of this DatabaseGiveAccessDto. # noqa: E501 - - - :return: The type of this DatabaseGiveAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseGiveAccessDto. - - - :param type: The type of this DatabaseGiveAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # 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(DatabaseGiveAccessDto, 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, DatabaseGiveAccessDto): - 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/database_modify_access_dto.py b/swagger/api/api_database/models/database_modify_access_dto.py deleted file mode 100644 index 169c27b779b8dfd4e9c1c92046f05292abc15e6a..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_modify_access_dto.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseModifyAccessDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'type': 'str' - } - - attribute_map = { - 'type': 'type' - } - - def __init__(self, type=None): # noqa: E501 - """DatabaseModifyAccessDto - a model defined in Swagger""" # noqa: E501 - self._type = None - self.discriminator = None - self.type = type - - @property - def type(self): - """Gets the type of this DatabaseModifyAccessDto. # noqa: E501 - - - :return: The type of this DatabaseModifyAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseModifyAccessDto. - - - :param type: The type of this DatabaseModifyAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # 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(DatabaseModifyAccessDto, 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, DatabaseModifyAccessDto): - 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/database_modify_visibility_dto.py b/swagger/api/api_database/models/database_modify_visibility_dto.py deleted file mode 100644 index 329da0e48a869d8f76ae212233e45f80bf1435f8..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_modify_visibility_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseModifyVisibilityDto(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 = { - 'is_public': 'bool' - } - - attribute_map = { - 'is_public': 'is_public' - } - - def __init__(self, is_public=None): # noqa: E501 - """DatabaseModifyVisibilityDto - a model defined in Swagger""" # noqa: E501 - self._is_public = None - self.discriminator = None - self.is_public = is_public - - @property - def is_public(self): - """Gets the is_public of this DatabaseModifyVisibilityDto. # noqa: E501 - - - :return: The is_public of this DatabaseModifyVisibilityDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseModifyVisibilityDto. - - - :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._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(DatabaseModifyVisibilityDto, 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, DatabaseModifyVisibilityDto): - 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/database_transfer_dto.py b/swagger/api/api_database/models/database_transfer_dto.py deleted file mode 100644 index daef8845873a6f3c59b1d364f2b22aa26fd91492..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/database_transfer_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseTransferDto(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 = { - 'username': 'str' - } - - attribute_map = { - 'username': 'username' - } - - def __init__(self, username=None): # noqa: E501 - """DatabaseTransferDto - a model defined in Swagger""" # noqa: E501 - self._username = None - self.discriminator = None - self.username = username - - @property - def username(self): - """Gets the username of this DatabaseTransferDto. # noqa: E501 - - - :return: The username of this DatabaseTransferDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this DatabaseTransferDto. - - - :param username: The username of this DatabaseTransferDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - 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(DatabaseTransferDto, 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, DatabaseTransferDto): - 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/granted_authority_dto.py b/swagger/api/api_database/models/granted_authority_dto.py deleted file mode 100644 index 6cbbd98c6f6fa67dcc14b1774c293734496c4c87..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/granted_authority_dto.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 GrantedAuthorityDto(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 = { - 'authority': 'str' - } - - attribute_map = { - 'authority': 'authority' - } - - def __init__(self, authority=None): # noqa: E501 - """GrantedAuthorityDto - a model defined in Swagger""" # noqa: E501 - self._authority = None - self.discriminator = None - if authority is not None: - self.authority = authority - - @property - def authority(self): - """Gets the authority of this GrantedAuthorityDto. # noqa: E501 - - - :return: The authority of this GrantedAuthorityDto. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this GrantedAuthorityDto. - - - :param authority: The authority of this GrantedAuthorityDto. # noqa: E501 - :type: str - """ - - self._authority = authority - - 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(GrantedAuthorityDto, 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, GrantedAuthorityDto): - 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/identifier_brief_dto.py b/swagger/api/api_database/models/identifier_brief_dto.py deleted file mode 100644 index 95ac69b97a6178c2cf8398086cf71d89a52c7710..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/identifier_brief_dto.py +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierBriefDto(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', - 'title': 'str', - 'type': 'str', - 'doi': 'str', - 'publisher': 'str', - 'creators': 'list[CreatorBriefDto]', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'publication_year': 'int' - } - - attribute_map = { - 'id': 'id', - 'title': 'title', - 'type': 'type', - 'doi': 'doi', - 'publisher': 'publisher', - 'creators': 'creators', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'publication_year': 'publication_year' - } - - def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 - """IdentifierBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._title = None - self._type = None - self._doi = None - self._publisher = None - self._creators = None - self._container_id = None - self._database_id = None - self._query_id = None - self._publication_year = None - self.discriminator = None - self.id = id - self.title = title - self.type = type - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - self.creators = creators - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.publication_year = publication_year - - @property - def id(self): - """Gets the id of this IdentifierBriefDto. # noqa: E501 - - - :return: The id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierBriefDto. - - - :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 - - @property - def title(self): - """Gets the title of this IdentifierBriefDto. # noqa: E501 - - - :return: The title of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierBriefDto. - - - :param title: The title of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def type(self): - """Gets the type of this IdentifierBriefDto. # noqa: E501 - - - :return: The type of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierBriefDto. - - - :param type: The type of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def doi(self): - """Gets the doi of this IdentifierBriefDto. # noqa: E501 - - - :return: The doi of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierBriefDto. - - - :param doi: The doi of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierBriefDto. # noqa: E501 - - - :return: The publisher of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierBriefDto. - - - :param publisher: The publisher of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def creators(self): - """Gets the creators of this IdentifierBriefDto. # noqa: E501 - - - :return: The creators of this IdentifierBriefDto. # noqa: E501 - :rtype: list[CreatorBriefDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierBriefDto. - - - :param creators: The creators of this IdentifierBriefDto. # noqa: E501 - :type: list[CreatorBriefDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def container_id(self): - """Gets the container_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The container_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierBriefDto. - - - :param container_id: The container_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The database_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierBriefDto. - - - :param database_id: The database_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The query_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierBriefDto. - - - :param query_id: The query_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierBriefDto. # noqa: E501 - - - :return: The publication_year of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierBriefDto. - - - :param publication_year: The publication_year of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - 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(IdentifierBriefDto, 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, IdentifierBriefDto): - 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/identifier_dto.py b/swagger/api/api_database/models/identifier_dto.py deleted file mode 100644 index 406ed00ef871e52dd5330a5c1825be10b4fb1b4b..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - 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/image_brief_dto.py b/swagger/api/api_database/models/image_brief_dto.py deleted file mode 100644 index b58450851cb300fb0c725d8898478fd1cc7c6c1f..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/image_brief_dto.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImageBriefDto(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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 - """ImageBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self.discriminator = None - self.id = id - self.registry = registry - self.repository = repository - self.tag = tag - - @property - def id(self): - """Gets the id of this ImageBriefDto. # 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 registry(self): - """Gets the registry of this ImageBriefDto. # noqa: E501 - - - :return: The registry of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageBriefDto. - - - :param registry: The registry of this ImageBriefDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageBriefDto. # noqa: E501 - - - :return: The repository of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. - - - :param repository: The repository of this ImageBriefDto. # 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 ImageBriefDto. # noqa: E501 - - - :return: The tag of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. - - - :param tag: The tag of this ImageBriefDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ImageBriefDto, 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, ImageBriefDto): - 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/image_date_dto.py b/swagger/api/api_database/models/image_date_dto.py deleted file mode 100644 index 4ce7211cf6685e2cd4a95dc4941da09095394127..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_database/models/image_dto.py b/swagger/api/api_database/models/image_dto.py deleted file mode 100644 index c9bedc4b7d71b6e68fceefcc1be8d0a8bed4c356..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/image_dto.py +++ /dev/null @@ -1,404 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str', - 'dialect': 'str', - 'hash': 'str', - 'compiled': 'datetime', - 'size': 'int', - 'driver_class': 'str', - 'date_formats': 'list[ImageDateDto]', - 'jdbc_method': 'str', - 'default_port': 'int' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag', - 'dialect': 'dialect', - 'hash': 'hash', - 'compiled': 'compiled', - 'size': 'size', - 'driver_class': 'driver_class', - 'date_formats': 'date_formats', - 'jdbc_method': 'jdbc_method', - 'default_port': 'default_port' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 - """ImageDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self._dialect = None - self._hash = None - self._compiled = None - self._size = None - self._driver_class = None - self._date_formats = None - self._jdbc_method = None - self._default_port = None - self.discriminator = None - self.id = id - self.registry = registry - 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.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 registry(self): - """Gets the registry of this ImageDto. # noqa: E501 - - - :return: The registry of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageDto. - - - :param registry: The registry of this ImageDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageDto. # noqa: E501 - - - :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 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_database/models/image_env_item_dto.py b/swagger/api/api_database/models/image_env_item_dto.py deleted file mode 100644 index 731f28ed827093c1414b766d4d07007f05ea67da..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/image_env_item_dto.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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 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_database/models/license_dto.py b/swagger/api/api_database/models/license_dto.py deleted file mode 100644 index 990dceb8e5cb71767c755a6aca13056c7e9faed8..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - 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/related_identifier_dto.py b/swagger/api/api_database/models/related_identifier_dto.py deleted file mode 100644 index 02f50855dde20a3cf4f3f581f9523993b53c6951..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - 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/table_brief_dto.py b/swagger/api/api_database/models/table_brief_dto.py deleted file mode 100644 index 1983111ebc65f0dd0affecc6b603c127e9bf3d32..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/table_brief_dto.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableBriefDto(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', - 'description': 'str', - 'owner': 'UserBriefDto', - 'columns': 'list[ColumnBriefDto]', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'owner': 'owner', - 'columns': 'columns', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 - """TableBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._owner = None - self._columns = None - self._internal_name = None - self.discriminator = None - self.id = id - self.name = name - self.description = description - self.owner = owner - self.columns = columns - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 - - - :return: The id of this TableBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableBriefDto. - - - :param id: The id of this TableBriefDto. # 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 TableBriefDto. # noqa: E501 - - - :return: The name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableBriefDto. - - - :param name: The name of this TableBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableBriefDto. # noqa: E501 - - - :return: The description of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableBriefDto. - - - :param description: The description of this TableBriefDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def owner(self): - """Gets the owner of this TableBriefDto. # noqa: E501 - - - :return: The owner of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this TableBriefDto. - - - :param owner: The owner of this TableBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def 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 - - - :return: The internal_name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. - - - :param internal_name: The internal_name of this TableBriefDto. # 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 - - 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(TableBriefDto, 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, TableBriefDto): - 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/user_attribute_dto.py b/swagger/api/api_database/models/user_attribute_dto.py deleted file mode 100644 index d0b3bee43a4998f65269df19b70bd6110e7c8dcd..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/user_attribute_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserAttributeDto(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', - 'value': 'str' - } - - attribute_map = { - 'name': 'name', - 'value': 'value' - } - - def __init__(self, name=None, value=None): # noqa: E501 - """UserAttributeDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._value = None - self.discriminator = None - if name is not None: - self.name = name - if value is not None: - self.value = value - - @property - def name(self): - """Gets the name of this UserAttributeDto. # noqa: E501 - - - :return: The name of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserAttributeDto. - - - :param name: The name of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def value(self): - """Gets the value of this UserAttributeDto. # noqa: E501 - - - :return: The value of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this UserAttributeDto. - - - :param value: The value of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._value = value - - 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(UserAttributeDto, 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, UserAttributeDto): - 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/user_brief_dto.py b/swagger/api/api_database/models/user_brief_dto.py deleted file mode 100644 index ab2b8a5998876f6c356e073ea9e7fa513dbbb024..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/user_brief_dto.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBriefDto. - - - :param id: The id of this UserBriefDto. # noqa: E501 - :type: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this UserBriefDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBriefDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserBriefDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def name(self): - """Gets the name of this UserBriefDto. # noqa: E501 - - - :return: The name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBriefDto. - - - :param name: The name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def orcid(self): - """Gets the orcid of this UserBriefDto. # noqa: E501 - - - :return: The orcid of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserBriefDto. - - - :param orcid: The orcid of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def given_name(self): - """Gets the given_name of this UserBriefDto. # noqa: E501 - - - :return: The given_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserBriefDto. - - - :param given_name: The given_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserBriefDto. # noqa: E501 - - - :return: The family_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserBriefDto. - - - :param family_name: The family_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @property - def email_verified(self): - """Gets the email_verified of this UserBriefDto. # noqa: E501 - - - :return: The email_verified of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserBriefDto. - - - :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_database/models/user_dto.py b/swagger/api/api_database/models/user_dto.py deleted file mode 100644 index 71ebfbcd35dd786139feb8ae6f6e4aeef007ce97..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/user_dto.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'attributes': 'list[UserAttributeDto]', - 'containers': 'list[ContainerDto]', - 'databases': 'list[ContainerDto]', - 'identifiers': 'list[ContainerDto]', - 'email': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'attributes': 'attributes', - 'containers': 'containers', - 'databases': 'databases', - 'identifiers': 'identifiers', - 'email': 'email', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, attributes=None, containers=None, databases=None, identifiers=None, email=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._attributes = None - self._containers = None - self._databases = None - self._identifiers = None - self._email = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if attributes is not None: - self.attributes = attributes - 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 given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - 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: str - """ - 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: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this 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 name(self): - """Gets the name of this UserDto. # noqa: E501 - - - :return: The name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserDto. - - - :param name: The name of this UserDto. # noqa: E501 - :type: str - """ - - self._name = name - - @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 attributes(self): - """Gets the attributes of this UserDto. # noqa: E501 - - - :return: The attributes of this UserDto. # noqa: E501 - :rtype: list[UserAttributeDto] - """ - return self._attributes - - @attributes.setter - def attributes(self, attributes): - """Sets the attributes of this UserDto. - - - :param attributes: The attributes of this UserDto. # noqa: E501 - :type: list[UserAttributeDto] - """ - - self._attributes = attributes - - @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 given_name(self): - """Gets the given_name of this UserDto. # noqa: E501 - - - :return: The given_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserDto. - - - :param given_name: The given_name of this UserDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserDto. # noqa: E501 - - - :return: The family_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserDto. - - - :param family_name: The family_name of this UserDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @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_database/models/view_brief_dto.py b/swagger/api/api_database/models/view_brief_dto.py deleted file mode 100644 index 98157125fa117c684aaa1fa68080f4ff14f5c5a8..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/models/view_brief_dto.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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/rest.py b/swagger/api/api_database/rest.py deleted file mode 100644 index 702cea47a70c095eb516dee7a7f0130e287df0be..0000000000000000000000000000000000000000 --- a/swagger/api/api_database/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Database Service API - - Service that manages the databases # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_identifier/__init__.py b/swagger/api/api_identifier/__init__.py deleted file mode 100644 index 4dab50d505775a317d5f0e17c37f8641ad616496..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_identifier.api.identifier_endpoint_api import IdentifierEndpointApi -from api_identifier.api.persistence_endpoint_api import PersistenceEndpointApi -# import ApiClient -from api_identifier.api_client import ApiClient -from api_identifier.configuration import Configuration -# import models into sdk package -from api_identifier.models.api_error_dto import ApiErrorDto -from api_identifier.models.creator_create_dto import CreatorCreateDto -from api_identifier.models.creator_dto import CreatorDto -from api_identifier.models.identifier_create_dto import IdentifierCreateDto -from api_identifier.models.identifier_dto import IdentifierDto -from api_identifier.models.identifier_update_dto import IdentifierUpdateDto -from api_identifier.models.license_dto import LicenseDto -from api_identifier.models.related_identifier_create_dto import RelatedIdentifierCreateDto -from api_identifier.models.related_identifier_dto import RelatedIdentifierDto diff --git a/swagger/api/api_identifier/api/__init__.py b/swagger/api/api_identifier/api/__init__.py deleted file mode 100644 index dcdac13945c7190cfdf82721a20e61bf43f9112d..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_identifier.api.identifier_endpoint_api import IdentifierEndpointApi -from api_identifier.api.persistence_endpoint_api import PersistenceEndpointApi diff --git a/swagger/api/api_identifier/api/identifier_endpoint_api.py b/swagger/api/api_identifier/api/identifier_endpoint_api.py deleted file mode 100644 index 72934f34931e9d0e5e580d12f3625d2212898a79..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/api/identifier_endpoint_api.py +++ /dev/null @@ -1,235 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_identifier.api_client import ApiClient - - -class IdentifierEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, body, authorization, **kwargs): # noqa: E501 - """Create identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(body, authorization, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentifierCreateDto body: (required) - :param str authorization: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, authorization, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, authorization, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, authorization, **kwargs): # noqa: E501 - """Create identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_with_http_info(body, authorization, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentifierCreateDto body: (required) - :param str authorization: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'authorization'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - # verify the required parameter 'authorization' is set - if ('authorization' not in params or - params['authorization'] is None): - raise ValueError("Missing the required parameter `authorization` when calling `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'authorization' in params: - header_params['Authorization'] = params['authorization'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/identifier', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='IdentifierDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list(self, **kwargs): # noqa: E501 - """Find identifiers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int dbid: - :param int qid: - :param str type: - :return: list[IdentifierDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_with_http_info(**kwargs) # noqa: E501 - return data - - def list_with_http_info(self, **kwargs): # noqa: E501 - """Find identifiers # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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', 'type'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'dbid' in params: - 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 = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/identifier', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[IdentifierDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_identifier/api/persistence_endpoint_api.py b/swagger/api/api_identifier/api/persistence_endpoint_api.py deleted file mode 100644 index 94308dc9c69e7c6f1c43977b2954efbd30865a27..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/api/persistence_endpoint_api.py +++ /dev/null @@ -1,332 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_identifier.api_client import ApiClient - - -class PersistenceEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def delete(self, id, **kwargs): # noqa: E501 - """Delete some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/pid/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find(self, pid, accept, **kwargs): # noqa: E501 - """Find some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find(pid, accept, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int pid: (required) - :param str accept: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_with_http_info(pid, accept, **kwargs) # noqa: E501 - else: - (data) = self.find_with_http_info(pid, accept, **kwargs) # noqa: E501 - return data - - def find_with_http_info(self, pid, accept, **kwargs): # noqa: E501 - """Find some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_with_http_info(pid, accept, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int pid: (required) - :param str accept: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['pid', 'accept'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'pid' is set - if ('pid' not in params or - params['pid'] is None): - raise ValueError("Missing the required parameter `pid` when calling `find`") # noqa: E501 - # verify the required parameter 'accept' is set - if ('accept' not in params or - params['accept'] is None): - raise ValueError("Missing the required parameter `accept` when calling `find`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'pid' in params: - path_params['pid'] = params['pid'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'accept' in params: - header_params['Accept'] = params['accept'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/csv', 'text/xml', 'text/bibliography', 'text/bibliography; style=apa', 'text/bibliography; style=ieee', 'text/bibliography; style=bibtex']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/pid/{pid}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='IdentifierDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update(self, body, id, **kwargs): # noqa: E501 - """Update some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentifierUpdateDto body: (required) - :param int id: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update some identifier # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param IdentifierUpdateDto body: (required) - :param int id: (required) - :return: IdentifierDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/pid/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='IdentifierDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_identifier/api_client.py b/swagger/api/api_identifier/api_client.py deleted file mode 100644 index 4b529baff567b9dbb041b1e85f9ac01d97ac6d83..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_identifier.configuration import Configuration -import api_identifier.models -from api_identifier import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_identifier.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_identifier/configuration.py b/swagger/api/api_identifier/configuration.py deleted file mode 100644 index c49f3bd949722eef0cf8d1e32c539e1d2e555ddf..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_identifier") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_identifier/models/__init__.py b/swagger/api/api_identifier/models/__init__.py deleted file mode 100644 index c4f0d7970fd045aedf1a38a3f808b984550f0a0d..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from api_identifier.models.api_error_dto import ApiErrorDto -from api_identifier.models.creator_create_dto import CreatorCreateDto -from api_identifier.models.creator_dto import CreatorDto -from api_identifier.models.identifier_create_dto import IdentifierCreateDto -from api_identifier.models.identifier_dto import IdentifierDto -from api_identifier.models.identifier_update_dto import IdentifierUpdateDto -from api_identifier.models.license_dto import LicenseDto -from api_identifier.models.related_identifier_create_dto import RelatedIdentifierCreateDto -from api_identifier.models.related_identifier_dto import RelatedIdentifierDto diff --git a/swagger/api/api_identifier/models/api_error_dto.py b/swagger/api/api_identifier/models/api_error_dto.py deleted file mode 100644 index dc406e54d9e103ceae898280255b9c9eb170c2b7..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_identifier/models/creator_create_dto.py b/swagger/api/api_identifier/models/creator_create_dto.py deleted file mode 100644 index 65eaae4dbff2511c3ff3120dd6368b4cb3da1a1c..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/creator_create_dto.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorCreateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """CreatorCreateDto - a model defined in Swagger""" # noqa: E501 - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - - @property - def firstname(self): - """Gets the firstname of this CreatorCreateDto. # noqa: E501 - - - :return: The firstname of this CreatorCreateDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorCreateDto. - - - :param firstname: The firstname of this CreatorCreateDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorCreateDto. # noqa: E501 - - - :return: The lastname of this CreatorCreateDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorCreateDto. - - - :param lastname: The lastname of this CreatorCreateDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorCreateDto. # noqa: E501 - - - :return: The affiliation of this CreatorCreateDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorCreateDto. - - - :param affiliation: The affiliation of this CreatorCreateDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorCreateDto. # noqa: E501 - - - :return: The orcid of this CreatorCreateDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorCreateDto. - - - :param orcid: The orcid of this CreatorCreateDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(CreatorCreateDto, 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, CreatorCreateDto): - 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/creator_dto.py b/swagger/api/api_identifier/models/creator_dto.py deleted file mode 100644 index cc892dbd3dd5713210cef4a371dcaf0f8a7e27c7..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/creator_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(CreatorDto, 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, CreatorDto): - 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/identifier_create_dto.py b/swagger/api/api_identifier/models/identifier_create_dto.py deleted file mode 100644 index 376cb14181b81ae48f739e93a07a125bc24b06af..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/identifier_create_dto.py +++ /dev/null @@ -1,499 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierCreateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'cid': 'int', - 'dbid': 'int', - 'qid': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'visibility': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorCreateDto]', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'related_identifiers': 'list[RelatedIdentifierCreateDto]' - } - - attribute_map = { - 'cid': 'cid', - 'dbid': 'dbid', - 'qid': 'qid', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'visibility': 'visibility', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'related_identifiers': 'related_identifiers' - } - - def __init__(self, cid=None, dbid=None, qid=None, type=None, title=None, description=None, visibility=None, publisher=None, language=None, license=None, creators=None, publication_day=None, publication_month=None, publication_year=None, related_identifiers=None): # noqa: E501 - """IdentifierCreateDto - a model defined in Swagger""" # noqa: E501 - self._cid = None - self._dbid = None - self._qid = None - self._type = None - self._title = None - self._description = None - self._visibility = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._related_identifiers = None - self.discriminator = None - self.cid = cid - self.dbid = dbid - if qid is not None: - self.qid = qid - self.type = type - self.title = title - if description is not None: - self.description = description - self.visibility = visibility - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if related_identifiers is not None: - self.related_identifiers = related_identifiers - - @property - def cid(self): - """Gets the cid of this IdentifierCreateDto. # noqa: E501 - - - :return: The cid of this IdentifierCreateDto. # noqa: E501 - :rtype: int - """ - return self._cid - - @cid.setter - def cid(self, cid): - """Sets the cid of this IdentifierCreateDto. - - - :param cid: The cid of this IdentifierCreateDto. # noqa: E501 - :type: int - """ - if cid is None: - raise ValueError("Invalid value for `cid`, must not be `None`") # noqa: E501 - - self._cid = cid - - @property - def dbid(self): - """Gets the dbid of this IdentifierCreateDto. # noqa: E501 - - - :return: The dbid of this IdentifierCreateDto. # noqa: E501 - :rtype: int - """ - return self._dbid - - @dbid.setter - def dbid(self, dbid): - """Sets the dbid of this IdentifierCreateDto. - - - :param dbid: The dbid of this IdentifierCreateDto. # noqa: E501 - :type: int - """ - if dbid is None: - raise ValueError("Invalid value for `dbid`, must not be `None`") # noqa: E501 - - self._dbid = dbid - - @property - def qid(self): - """Gets the qid of this IdentifierCreateDto. # noqa: E501 - - - :return: The qid of this IdentifierCreateDto. # noqa: E501 - :rtype: int - """ - return self._qid - - @qid.setter - def qid(self, qid): - """Sets the qid of this IdentifierCreateDto. - - - :param qid: The qid of this IdentifierCreateDto. # noqa: E501 - :type: int - """ - - self._qid = qid - - @property - def type(self): - """Gets the type of this IdentifierCreateDto. # noqa: E501 - - - :return: The type of this IdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierCreateDto. - - - :param type: The type of this IdentifierCreateDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierCreateDto. # noqa: E501 - - - :return: The title of this IdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierCreateDto. - - - :param title: The title of this IdentifierCreateDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierCreateDto. # noqa: E501 - - - :return: The description of this IdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierCreateDto. - - - :param description: The description of this IdentifierCreateDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def visibility(self): - """Gets the visibility of this IdentifierCreateDto. # noqa: E501 - - - :return: The visibility of this IdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierCreateDto. - - - :param visibility: The visibility of this IdentifierCreateDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def publisher(self): - """Gets the publisher of this IdentifierCreateDto. # noqa: E501 - - - :return: The publisher of this IdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierCreateDto. - - - :param publisher: The publisher of this IdentifierCreateDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierCreateDto. # noqa: E501 - - - :return: The language of this IdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierCreateDto. - - - :param language: The language of this IdentifierCreateDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierCreateDto. # noqa: E501 - - - :return: The license of this IdentifierCreateDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierCreateDto. - - - :param license: The license of this IdentifierCreateDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierCreateDto. # noqa: E501 - - - :return: The creators of this IdentifierCreateDto. # noqa: E501 - :rtype: list[CreatorCreateDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierCreateDto. - - - :param creators: The creators of this IdentifierCreateDto. # noqa: E501 - :type: list[CreatorCreateDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierCreateDto. # noqa: E501 - - - :return: The publication_day of this IdentifierCreateDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierCreateDto. - - - :param publication_day: The publication_day of this IdentifierCreateDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierCreateDto. # noqa: E501 - - - :return: The publication_month of this IdentifierCreateDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierCreateDto. - - - :param publication_month: The publication_month of this IdentifierCreateDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierCreateDto. # noqa: E501 - - - :return: The publication_year of this IdentifierCreateDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierCreateDto. - - - :param publication_year: The publication_year of this IdentifierCreateDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def related_identifiers(self): - """Gets the related_identifiers of this IdentifierCreateDto. # noqa: E501 - - - :return: The related_identifiers of this IdentifierCreateDto. # noqa: E501 - :rtype: list[RelatedIdentifierCreateDto] - """ - return self._related_identifiers - - @related_identifiers.setter - def related_identifiers(self, related_identifiers): - """Sets the related_identifiers of this IdentifierCreateDto. - - - :param related_identifiers: The related_identifiers of this IdentifierCreateDto. # noqa: E501 - :type: list[RelatedIdentifierCreateDto] - """ - - self._related_identifiers = related_identifiers - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IdentifierCreateDto, 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, IdentifierCreateDto): - 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/identifier_dto.py b/swagger/api/api_identifier/models/identifier_dto.py deleted file mode 100644 index 75ef56e36f7d65072e0f549957a3f372c8d6a3dd..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - 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/identifier_update_dto.py b/swagger/api/api_identifier/models/identifier_update_dto.py deleted file mode 100644 index fc11594e9b7fe25068f622605df2bf856ee8b517..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/identifier_update_dto.py +++ /dev/null @@ -1,525 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierUpdateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'cid': 'int', - 'dbid': 'int', - 'qid': 'int', - 'doi': 'str', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'visibility': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'related_identifiers': 'list[RelatedIdentifierCreateDto]' - } - - attribute_map = { - 'cid': 'cid', - 'dbid': 'dbid', - 'qid': 'qid', - 'doi': 'doi', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'visibility': 'visibility', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'related_identifiers': 'related_identifiers' - } - - def __init__(self, cid=None, dbid=None, qid=None, doi=None, type=None, title=None, description=None, visibility=None, publisher=None, language=None, license=None, creators=None, publication_day=None, publication_month=None, publication_year=None, related_identifiers=None): # noqa: E501 - """IdentifierUpdateDto - a model defined in Swagger""" # noqa: E501 - self._cid = None - self._dbid = None - self._qid = None - self._doi = None - self._type = None - self._title = None - self._description = None - self._visibility = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._related_identifiers = None - self.discriminator = None - self.cid = cid - self.dbid = dbid - if qid is not None: - self.qid = qid - if doi is not None: - self.doi = doi - self.type = type - self.title = title - if description is not None: - self.description = description - self.visibility = visibility - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if related_identifiers is not None: - self.related_identifiers = related_identifiers - - @property - def cid(self): - """Gets the cid of this IdentifierUpdateDto. # noqa: E501 - - - :return: The cid of this IdentifierUpdateDto. # noqa: E501 - :rtype: int - """ - return self._cid - - @cid.setter - def cid(self, cid): - """Sets the cid of this IdentifierUpdateDto. - - - :param cid: The cid of this IdentifierUpdateDto. # noqa: E501 - :type: int - """ - if cid is None: - raise ValueError("Invalid value for `cid`, must not be `None`") # noqa: E501 - - self._cid = cid - - @property - def dbid(self): - """Gets the dbid of this IdentifierUpdateDto. # noqa: E501 - - - :return: The dbid of this IdentifierUpdateDto. # noqa: E501 - :rtype: int - """ - return self._dbid - - @dbid.setter - def dbid(self, dbid): - """Sets the dbid of this IdentifierUpdateDto. - - - :param dbid: The dbid of this IdentifierUpdateDto. # noqa: E501 - :type: int - """ - if dbid is None: - raise ValueError("Invalid value for `dbid`, must not be `None`") # noqa: E501 - - self._dbid = dbid - - @property - def qid(self): - """Gets the qid of this IdentifierUpdateDto. # noqa: E501 - - - :return: The qid of this IdentifierUpdateDto. # noqa: E501 - :rtype: int - """ - return self._qid - - @qid.setter - def qid(self, qid): - """Sets the qid of this IdentifierUpdateDto. - - - :param qid: The qid of this IdentifierUpdateDto. # noqa: E501 - :type: int - """ - - self._qid = qid - - @property - def doi(self): - """Gets the doi of this IdentifierUpdateDto. # noqa: E501 - - - :return: The doi of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierUpdateDto. - - - :param doi: The doi of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def type(self): - """Gets the type of this IdentifierUpdateDto. # noqa: E501 - - - :return: The type of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierUpdateDto. - - - :param type: The type of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierUpdateDto. # noqa: E501 - - - :return: The title of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierUpdateDto. - - - :param title: The title of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierUpdateDto. # noqa: E501 - - - :return: The description of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierUpdateDto. - - - :param description: The description of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def visibility(self): - """Gets the visibility of this IdentifierUpdateDto. # noqa: E501 - - - :return: The visibility of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierUpdateDto. - - - :param visibility: The visibility of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def publisher(self): - """Gets the publisher of this IdentifierUpdateDto. # noqa: E501 - - - :return: The publisher of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierUpdateDto. - - - :param publisher: The publisher of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierUpdateDto. # noqa: E501 - - - :return: The language of this IdentifierUpdateDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierUpdateDto. - - - :param language: The language of this IdentifierUpdateDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierUpdateDto. # noqa: E501 - - - :return: The license of this IdentifierUpdateDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierUpdateDto. - - - :param license: The license of this IdentifierUpdateDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierUpdateDto. # noqa: E501 - - - :return: The creators of this IdentifierUpdateDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierUpdateDto. - - - :param creators: The creators of this IdentifierUpdateDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierUpdateDto. # noqa: E501 - - - :return: The publication_day of this IdentifierUpdateDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierUpdateDto. - - - :param publication_day: The publication_day of this IdentifierUpdateDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierUpdateDto. # noqa: E501 - - - :return: The publication_month of this IdentifierUpdateDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierUpdateDto. - - - :param publication_month: The publication_month of this IdentifierUpdateDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierUpdateDto. # noqa: E501 - - - :return: The publication_year of this IdentifierUpdateDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierUpdateDto. - - - :param publication_year: The publication_year of this IdentifierUpdateDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def related_identifiers(self): - """Gets the related_identifiers of this IdentifierUpdateDto. # noqa: E501 - - - :return: The related_identifiers of this IdentifierUpdateDto. # noqa: E501 - :rtype: list[RelatedIdentifierCreateDto] - """ - return self._related_identifiers - - @related_identifiers.setter - def related_identifiers(self, related_identifiers): - """Sets the related_identifiers of this IdentifierUpdateDto. - - - :param related_identifiers: The related_identifiers of this IdentifierUpdateDto. # noqa: E501 - :type: list[RelatedIdentifierCreateDto] - """ - - self._related_identifiers = related_identifiers - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(IdentifierUpdateDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IdentifierUpdateDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_identifier/models/license_dto.py b/swagger/api/api_identifier/models/license_dto.py deleted file mode 100644 index 1c78626e4bce0e1cddd286db41bc91d75ff9a4fb..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - 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/related_identifier_create_dto.py b/swagger/api/api_identifier/models/related_identifier_create_dto.py deleted file mode 100644 index ef5ff1971e4b88aa30386f3d56d7716a04b06d2d..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/related_identifier_create_dto.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifierCreateDto(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 = { - 'value': 'str', - 'type': 'str', - 'relation': 'str' - } - - attribute_map = { - 'value': 'value', - 'type': 'type', - 'relation': 'relation' - } - - def __init__(self, value=None, type=None, relation=None): # noqa: E501 - """RelatedIdentifierCreateDto - a model defined in Swagger""" # noqa: E501 - self._value = None - self._type = None - self._relation = None - self.discriminator = None - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - - @property - def value(self): - """Gets the value of this RelatedIdentifierCreateDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierCreateDto. - - - :param value: The value of this RelatedIdentifierCreateDto. # 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 RelatedIdentifierCreateDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierCreateDto. - - - :param type: The type of this RelatedIdentifierCreateDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierCreateDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierCreateDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierCreateDto. - - - :param relation: The relation of this RelatedIdentifierCreateDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - 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(RelatedIdentifierCreateDto, 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, RelatedIdentifierCreateDto): - 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/related_identifier_dto.py b/swagger/api/api_identifier/models/related_identifier_dto.py deleted file mode 100644 index 46f438e5e26f38f2270354eaeb7c6c80d6f2c82b..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - 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/rest.py b/swagger/api/api_identifier/rest.py deleted file mode 100644 index 9a65b8effd31839095de6a61fd9e77764ffb82c7..0000000000000000000000000000000000000000 --- a/swagger/api/api_identifier/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Identifier Service API - - Service that manages the identifiers # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_metadata/__init__.py b/swagger/api/api_metadata/__init__.py deleted file mode 100644 index ee484bc2b2a1b30620c8c2c07846453f46636733..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_metadata.api.metadata_endpoint_api import MetadataEndpointApi -# import ApiClient -from api_metadata.api_client import ApiClient -from api_metadata.configuration import Configuration -# import models into sdk package -from api_metadata.models.oai_list_identifiers_parameters import OaiListIdentifiersParameters diff --git a/swagger/api/api_metadata/api/__init__.py b/swagger/api/api_metadata/api/__init__.py deleted file mode 100644 index 3b53275ce79733f9cdc9004ce857198382fe4581..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_metadata.api.metadata_endpoint_api import MetadataEndpointApi diff --git a/swagger/api/api_metadata/api/metadata_endpoint_api.py b/swagger/api/api_metadata/api/metadata_endpoint_api.py deleted file mode 100644 index eee89517f6b44886f1f986d78eda1fe01633ec2b..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/api/metadata_endpoint_api.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_metadata.api_client import ApiClient - - -class MetadataEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def identify1111(self, parameters, **kwargs): # noqa: E501 - """Get the record # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.identify1111(parameters, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OaiListIdentifiersParameters parameters: (required) - :param : - :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.identify1111_with_http_info(parameters, **kwargs) # noqa: E501 - else: - (data) = self.identify1111_with_http_info(parameters, **kwargs) # noqa: E501 - return data - - def identify1111_with_http_info(self, parameters, **kwargs): # noqa: E501 - """Get the record # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.identify1111_with_http_info(parameters, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OaiListIdentifiersParameters parameters: (required) - :param : - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['parameters', ''] # 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 identify1111" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'parameters' is set - if ('parameters' not in params or - params['parameters'] is None): - raise ValueError("Missing the required parameter `parameters` when calling `identify1111`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - if '' in params: - query_params.append(('verb', params[''])) # noqa: E501 - if 'parameters' in params: - query_params.append(('parameters', params['parameters'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/xml']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/oai', 'GET', - 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_metadata/api_client.py b/swagger/api/api_metadata/api_client.py deleted file mode 100644 index 7d30278a12907e77c0324f8ab67ab80510cc9ac7..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_metadata.configuration import Configuration -import api_metadata.models -from api_metadata import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_metadata.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_metadata/configuration.py b/swagger/api/api_metadata/configuration.py deleted file mode 100644 index e0281353b1039206fabf54d95c48c306a16d96d0..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_metadata") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_metadata/models/__init__.py b/swagger/api/api_metadata/models/__init__.py deleted file mode 100644 index 3decd39b1812e336492e0ff10028f4780356ce98..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/models/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from api_metadata.models.oai_list_identifiers_parameters import OaiListIdentifiersParameters diff --git a/swagger/api/api_metadata/models/api_error_dto.py b/swagger/api/api_metadata/models/api_error_dto.py deleted file mode 100644 index abd6a183deba10bc3700d4dfa2cb7ded7be7aa8a..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Metadata Service API - - Service that manages the metadata # 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 ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py b/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py deleted file mode 100644 index fc88c7aca6ea4e640afcdb6864f586743a5d2220..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/models/oai_list_identifiers_parameters.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OaiListIdentifiersParameters(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 = { - 'metadata_prefix': 'str', - '_from': 'str', - 'until': 'str', - 'set': 'str', - 'resumption_token': 'str', - 'from_date': 'datetime', - 'until_date': 'datetime', - 'parameters_string': 'str' - } - - attribute_map = { - 'metadata_prefix': 'metadataPrefix', - '_from': 'from', - 'until': 'until', - 'set': 'set', - 'resumption_token': 'resumptionToken', - 'from_date': 'fromDate', - 'until_date': 'untilDate', - 'parameters_string': 'parametersString' - } - - def __init__(self, metadata_prefix=None, _from=None, until=None, set=None, resumption_token=None, from_date=None, until_date=None, parameters_string=None): # noqa: E501 - """OaiListIdentifiersParameters - a model defined in Swagger""" # noqa: E501 - self._metadata_prefix = None - self.__from = None - self._until = None - self._set = None - self._resumption_token = None - self._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 - if _from is not None: - self._from = _from - if until is not None: - self.until = until - if set is not None: - self.set = set - if resumption_token is not None: - self.resumption_token = resumption_token - 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): - """Gets the metadata_prefix of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The metadata_prefix of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: str - """ - return self._metadata_prefix - - @metadata_prefix.setter - def metadata_prefix(self, metadata_prefix): - """Sets the metadata_prefix of this OaiListIdentifiersParameters. - - - :param metadata_prefix: The metadata_prefix of this OaiListIdentifiersParameters. # noqa: E501 - :type: str - """ - - self._metadata_prefix = metadata_prefix - - @property - def _from(self): - """Gets the _from of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The _from of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: str - """ - return self.__from - - @_from.setter - def _from(self, _from): - """Sets the _from of this OaiListIdentifiersParameters. - - - :param _from: The _from of this OaiListIdentifiersParameters. # noqa: E501 - :type: str - """ - - self.__from = _from - - @property - def until(self): - """Gets the until of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The until of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: str - """ - return self._until - - @until.setter - def until(self, until): - """Sets the until of this OaiListIdentifiersParameters. - - - :param until: The until of this OaiListIdentifiersParameters. # noqa: E501 - :type: str - """ - - self._until = until - - @property - def set(self): - """Gets the set of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The set of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: str - """ - return self._set - - @set.setter - def set(self, set): - """Sets the set of this OaiListIdentifiersParameters. - - - :param set: The set of this OaiListIdentifiersParameters. # noqa: E501 - :type: str - """ - - self._set = set - - @property - def resumption_token(self): - """Gets the resumption_token of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The resumption_token of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: str - """ - return self._resumption_token - - @resumption_token.setter - def resumption_token(self, resumption_token): - """Sets the resumption_token of this OaiListIdentifiersParameters. - - - :param resumption_token: The resumption_token of this OaiListIdentifiersParameters. # noqa: E501 - :type: str - """ - - self._resumption_token = resumption_token - - @property - def from_date(self): - """Gets the from_date of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The from_date of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: datetime - """ - return self._from_date - - @from_date.setter - def from_date(self, from_date): - """Sets the from_date of this OaiListIdentifiersParameters. - - - :param from_date: The from_date of this OaiListIdentifiersParameters. # noqa: E501 - :type: datetime - """ - - self._from_date = from_date - - @property - def until_date(self): - """Gets the until_date of this OaiListIdentifiersParameters. # noqa: E501 - - - :return: The until_date of this OaiListIdentifiersParameters. # noqa: E501 - :rtype: datetime - """ - return self._until_date - - @until_date.setter - def until_date(self, until_date): - """Sets the until_date of this OaiListIdentifiersParameters. - - - :param until_date: The until_date of this OaiListIdentifiersParameters. # noqa: E501 - :type: datetime - """ - - 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 = {} - - 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(OaiListIdentifiersParameters, 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, OaiListIdentifiersParameters): - 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/rest.py b/swagger/api/api_metadata/rest.py deleted file mode 100644 index 2857812e10ff9a49c02e1d5ef79c197e8368c8c6..0000000000000000000000000000000000000000 --- a/swagger/api/api_metadata/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Metadata Service API - - Service that manages the metadata # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_query/__init__.py b/swagger/api/api_query/__init__.py deleted file mode 100644 index c8bac1979428186a59bd534ace5f47806bf0a94a..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/__init__.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_query.api.export_endpoint_api import ExportEndpointApi -from api_query.api.query_endpoint_api import QueryEndpointApi -from api_query.api.store_endpoint_api import StoreEndpointApi -from api_query.api.table_data_endpoint_api import TableDataEndpointApi -from api_query.api.table_history_endpoint_api import TableHistoryEndpointApi -from api_query.api.view_endpoint_api import ViewEndpointApi -# import ApiClient -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_brief_dto import CreatorBriefDto -from api_query.models.creator_dto import CreatorDto -from api_query.models.database_access_dto import DatabaseAccessDto -from api_query.models.database_dto import DatabaseDto -from api_query.models.execute_statement_dto import ExecuteStatementDto -from api_query.models.identifier_brief_dto import IdentifierBriefDto -from api_query.models.identifier_dto import IdentifierDto -from api_query.models.image_brief_dto import ImageBriefDto -from api_query.models.image_date_dto import ImageDateDto -from api_query.models.image_dto import ImageDto -from api_query.models.import_dto import ImportDto -from api_query.models.license_dto import LicenseDto -from api_query.models.query_brief_dto import QueryBriefDto -from api_query.models.query_dto import QueryDto -from api_query.models.query_result_dto import QueryResultDto -from api_query.models.related_identifier_dto import RelatedIdentifierDto -from api_query.models.table_brief_dto import TableBriefDto -from api_query.models.table_csv_delete_dto import TableCsvDeleteDto -from api_query.models.table_csv_dto import TableCsvDto -from api_query.models.table_csv_update_dto import TableCsvUpdateDto -from api_query.models.table_history_dto import TableHistoryDto -from api_query.models.user_attribute_dto import UserAttributeDto -from api_query.models.user_brief_dto import UserBriefDto -from api_query.models.user_dto import UserDto -from api_query.models.view_brief_dto import ViewBriefDto -from api_query.models.view_create_dto import ViewCreateDto -from api_query.models.view_dto import ViewDto diff --git a/swagger/api/api_query/api/__init__.py b/swagger/api/api_query/api/__init__.py deleted file mode 100644 index eef04da51c4146f817c9fd0aafcf53dce05dd4d9..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_query.api.export_endpoint_api import ExportEndpointApi -from api_query.api.query_endpoint_api import QueryEndpointApi -from api_query.api.store_endpoint_api import StoreEndpointApi -from api_query.api.table_data_endpoint_api import TableDataEndpointApi -from api_query.api.table_history_endpoint_api import TableHistoryEndpointApi -from api_query.api.view_endpoint_api import ViewEndpointApi diff --git a/swagger/api/api_query/api/export_endpoint_api.py b/swagger/api/api_query/api/export_endpoint_api.py deleted file mode 100644 index ab2ef340325505beed9da949eac3a87e0c47df96..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/export_endpoint_api.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_query.api_client import ApiClient - - -class ExportEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def export(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Export table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.export_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.export_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def export_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Export table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :return: str - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id', 'timestamp'] # 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 export" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `export`") # 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 `export`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `export`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - if 'timestamp' in params: - query_params.append(('timestamp', params['timestamp'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/export', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='str', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_query/api/query_endpoint_api.py b/swagger/api/api_query/api/query_endpoint_api.py deleted file mode 100644 index 16d0c3df11fccd86961b31f520f454dbad91c8e6..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/query_endpoint_api.py +++ /dev/null @@ -1,513 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_query.api_client import ApiClient - - -class QueryEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def execute(self, body, id, database_id, **kwargs): # noqa: E501 - """Execute query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.execute(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ExecuteStatementDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.execute_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.execute_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - return data - - def execute_with_http_info(self, body, id, database_id, **kwargs): # noqa: E501 - """Execute query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.execute_with_http_info(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ExecuteStatementDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id', 'database_id', 'page', 'size', 'sort_direction', 'sort_column'] # 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 execute" % 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 `execute`") # 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 `execute`") # 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 `execute`") # 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 = [] - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'size' in params: - query_params.append(('size', params['size'])) # noqa: E501 - if 'sort_direction' in params: - query_params.append(('sortDirection', params['sort_direction'])) # noqa: E501 - if 'sort_column' in params: - query_params.append(('sortColumn', params['sort_column'])) # noqa: E501 - - 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}/query', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryResultDto', # 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 export1(self, id, database_id, query_id, accept, **kwargs): # noqa: E501 - """Exports some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export1(id, database_id, query_id, accept, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :param str accept: (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.export1_with_http_info(id, database_id, query_id, accept, **kwargs) # noqa: E501 - else: - (data) = self.export1_with_http_info(id, database_id, query_id, accept, **kwargs) # noqa: E501 - return data - - def export1_with_http_info(self, id, database_id, query_id, accept, **kwargs): # noqa: E501 - """Exports some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export1_with_http_info(id, database_id, query_id, accept, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :param str accept: (required) - :return: object - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'query_id', 'accept'] # 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 export1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `export1`") # 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 `export1`") # noqa: E501 - # verify the required parameter 'query_id' is set - if ('query_id' not in params or - params['query_id'] is None): - raise ValueError("Missing the required parameter `query_id` when calling `export1`") # noqa: E501 - # verify the required parameter 'accept' is set - if ('accept' not in params or - params['accept'] is None): - raise ValueError("Missing the required parameter `accept` when calling `export1`") # 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 - if 'query_id' in params: - path_params['queryId'] = params['query_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'accept' in params: - header_params['Accept'] = params['accept'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/query/{queryId}/export', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - 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'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def re_execute(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Re-execute some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.re_execute(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.re_execute_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - else: - (data) = self.re_execute_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - return data - - def re_execute_with_http_info(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Re-execute some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.re_execute_with_http_info(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'query_id', 'page', 'size', 'sort_direction', 'sort_column'] # 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 re_execute" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `re_execute`") # 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 `re_execute`") # noqa: E501 - # verify the required parameter 'query_id' is set - if ('query_id' not in params or - params['query_id'] is None): - raise ValueError("Missing the required parameter `query_id` when calling `re_execute`") # 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 - if 'query_id' in params: - path_params['queryId'] = params['query_id'] # noqa: E501 - - query_params = [] - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'size' in params: - query_params.append(('size', params['size'])) # noqa: E501 - if 'sort_direction' in params: - query_params.append(('sortDirection', params['sort_direction'])) # noqa: E501 - if 'sort_column' in params: - query_params.append(('sortColumn', params['sort_column'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/query/{queryId}/data', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryResultDto', # 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 re_execute_count(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Re-execute some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.re_execute_count(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :return: int - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.re_execute_count_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - else: - (data) = self.re_execute_count_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - return data - - def re_execute_count_with_http_info(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Re-execute some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.re_execute_count_with_http_info(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :return: int - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'query_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 re_execute_count" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `re_execute_count`") # 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 `re_execute_count`") # noqa: E501 - # verify the required parameter 'query_id' is set - if ('query_id' not in params or - params['query_id'] is None): - raise ValueError("Missing the required parameter `query_id` when calling `re_execute_count`") # 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 - if 'query_id' in params: - path_params['queryId'] = params['query_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/query/{queryId}/data/count', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='int', # 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_query/api/store_endpoint_api.py b/swagger/api/api_query/api/store_endpoint_api.py deleted file mode 100644 index e858fd277ade19b718d3baf2677a113ccd01bcc5..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/store_endpoint_api.py +++ /dev/null @@ -1,356 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_query.api_client import ApiClient - - -class StoreEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def find1(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Find some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find1(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :return: QueryDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find1_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - else: - (data) = self.find1_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - return data - - def find1_with_http_info(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Find some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find1_with_http_info(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :return: QueryDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'query_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find1`") # noqa: E501 - # 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 `find1`") # noqa: E501 - # verify the required parameter 'query_id' is set - if ('query_id' not in params or - params['query_id'] is None): - raise ValueError("Missing the required parameter `query_id` when calling `find1`") # 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 - if 'query_id' in params: - path_params['queryId'] = params['query_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/query/{queryId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all1(self, id, database_id, **kwargs): # noqa: E501 - """Find queries # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all1(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param bool persisted: - :return: list[QueryBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all1_with_http_info(id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all1_with_http_info(id, database_id, **kwargs) # noqa: E501 - return data - - def find_all1_with_http_info(self, id, database_id, **kwargs): # noqa: E501 - """Find queries # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all1_with_http_info(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param bool persisted: - :return: list[QueryBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'persisted'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find_all1`") # 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 `find_all1`") # 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 = [] - if 'persisted' in params: - query_params.append(('persisted', params['persisted'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/query', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[QueryBriefDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def persist(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Persist some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.persist(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :return: QueryDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.persist_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - else: - (data) = self.persist_with_http_info(id, database_id, query_id, **kwargs) # noqa: E501 - return data - - def persist_with_http_info(self, id, database_id, query_id, **kwargs): # noqa: E501 - """Persist some query # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.persist_with_http_info(id, database_id, query_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int query_id: (required) - :return: QueryDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'query_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 persist" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `persist`") # 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 `persist`") # noqa: E501 - # verify the required parameter 'query_id' is set - if ('query_id' not in params or - params['query_id'] is None): - raise ValueError("Missing the required parameter `query_id` when calling `persist`") # 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 - if 'query_id' in params: - path_params['queryId'] = params['query_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/query/{queryId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryDto', # 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_query/api/table_data_endpoint_api.py b/swagger/api/api_query/api/table_data_endpoint_api.py deleted file mode 100644 index 83a382d7ff0bca1d6173af5d95e74c3373e39174..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/table_data_endpoint_api.py +++ /dev/null @@ -1,872 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_query.api_client import ApiClient - - -class TableDataEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def delete1(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Delete data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete1(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCsvDeleteDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete1_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.delete1_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def delete1_with_http_info(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Delete data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete1_with_http_info(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCsvDeleteDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete1" % 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 `delete1`") # 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 `delete1`") # 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 `delete1`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `delete1`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - 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 = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def get_all2(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all2(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_all2_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.get_all2_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def get_all2_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all2_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id', 'timestamp', 'page', 'size', 'sort_direction', 'sort_column'] # 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 get_all2" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_all2`") # 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 `get_all2`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `get_all2`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - if 'timestamp' in params: - query_params.append(('timestamp', params['timestamp'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'size' in params: - query_params.append(('size', params['size'])) # noqa: E501 - if 'sort_direction' in params: - query_params.append(('sortDirection', params['sort_direction'])) # noqa: E501 - if 'sort_column' in params: - query_params.append(('sortColumn', params['sort_column'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryResultDto', # 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 get_all3(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all3(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_all3_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.get_all3_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def get_all3_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all3_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :param int page: - :param int size: - :param str sort_direction: - :param str sort_column: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id', 'timestamp', 'page', 'size', 'sort_direction', 'sort_column'] # 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 get_all3" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_all3`") # 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 `get_all3`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `get_all3`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - if 'timestamp' in params: - query_params.append(('timestamp', params['timestamp'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'size' in params: - query_params.append(('size', params['size'])) # noqa: E501 - if 'sort_direction' in params: - query_params.append(('sortDirection', params['sort_direction'])) # noqa: E501 - if 'sort_column' in params: - query_params.append(('sortColumn', params['sort_column'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'HEAD', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryResultDto', # 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 get_count(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_count(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :return: int - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_count_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.get_count_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def get_count_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_count_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param datetime timestamp: - :return: int - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id', 'timestamp'] # 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 get_count" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_count`") # 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 `get_count`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `get_count`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - if 'timestamp' in params: - query_params.append(('timestamp', params['timestamp'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data/count', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='int', # 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 import_csv(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Insert data from csv # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.import_csv(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ImportDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.import_csv_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.import_csv_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def import_csv_with_http_info(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Insert data from csv # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.import_csv_with_http_info(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ImportDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method import_csv" % 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 `import_csv`") # 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 `import_csv`") # 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 `import_csv`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `import_csv`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - 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 = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data/import', 'POST', - 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 insert(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Insert data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.insert(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCsvDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.insert_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.insert_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def insert_with_http_info(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Insert data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.insert_with_http_info(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCsvDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method insert" % 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 `insert`") # 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 `insert`") # 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 `insert`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `insert`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - 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 = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', 'POST', - 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 update(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Update data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCsvUpdateDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, database_id, table_id, **kwargs): # noqa: E501 - """Update data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCsvUpdateDto body: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - # 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 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `update`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - 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 = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/data', '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_query/api/table_history_endpoint_api.py b/swagger/api/api_query/api/table_history_endpoint_api.py deleted file mode 100644 index c5d0d510f7da8a6e170281442bfcf21e61cb3f03..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/table_history_endpoint_api.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_query.api_client import ApiClient - - -class TableHistoryEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def get_all(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find all history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: list[TableHistoryDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_all_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.get_all_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def get_all_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find all history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: list[TableHistoryDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_all" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_all`") # 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 `get_all`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `get_all`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TableHistoryDto]', # 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 get_all1(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find all history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all1(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: list[TableHistoryDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_all1_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.get_all1_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def get_all1_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Find all history # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_all1_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: list[TableHistoryDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method get_all1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `get_all1`") # 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 `get_all1`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `get_all1`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'HEAD', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TableHistoryDto]', # 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_query/api/view_endpoint_api.py b/swagger/api/api_query/api/view_endpoint_api.py deleted file mode 100644 index fa07cd3ac59e153fdead4aaa20ddbcf17eebe80a..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api/view_endpoint_api.py +++ /dev/null @@ -1,691 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_query.api_client import ApiClient - - -class ViewEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def count(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Find view data count # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.count(id, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :return: int - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.count_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - else: - (data) = self.count_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - return data - - def count_with_http_info(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Find view data count # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.count_with_http_info(id, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :return: int - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'view_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 count" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `count`") # 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 `count`") # noqa: E501 - # verify the required parameter 'view_id' is set - if ('view_id' not in params or - params['view_id'] is None): - raise ValueError("Missing the required parameter `view_id` when calling `count`") # 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 - if 'view_id' in params: - path_params['viewId'] = params['view_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/view/{viewId}/data/count', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='int', # 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 create(self, body, id, database_id, **kwargs): # noqa: E501 - """Create a view # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ViewCreateDto body: (required) - :param int id: (required) - :param int database_id: (required) - :return: ViewBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, id, database_id, **kwargs): # noqa: E501 - """Create a view # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_with_http_info(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ViewCreateDto body: (required) - :param int id: (required) - :param int database_id: (required) - :return: ViewBriefDto - 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 create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - # 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 `create`") # 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 `create`") # 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( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/view', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ViewBriefDto', # 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 data(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Find view data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.data(id, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :param int page: - :param int size: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.data_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - else: - (data) = self.data_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - return data - - def data_with_http_info(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Find view data # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.data_with_http_info(id, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :param int page: - :param int size: - :return: QueryResultDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'view_id', 'page', 'size'] # 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 data" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `data`") # 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 `data`") # noqa: E501 - # verify the required parameter 'view_id' is set - if ('view_id' not in params or - params['view_id'] is None): - raise ValueError("Missing the required parameter `view_id` when calling `data`") # 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 - if 'view_id' in params: - path_params['viewId'] = params['view_id'] # noqa: E501 - - query_params = [] - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'size' in params: - query_params.append(('size', params['size'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/view/{viewId}/data', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='QueryResultDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Delete one view # 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, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Delete one view # 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, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'view_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - # 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 `delete`") # noqa: E501 - # verify the required parameter 'view_id' is set - if ('view_id' not in params or - params['view_id'] is None): - raise ValueError("Missing the required parameter `view_id` when calling `delete`") # 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 - if 'view_id' in params: - path_params['viewId'] = params['view_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/view/{viewId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Find one view # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find(id, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :return: ViewDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - else: - (data) = self.find_with_http_info(id, database_id, view_id, **kwargs) # noqa: E501 - return data - - def find_with_http_info(self, id, database_id, view_id, **kwargs): # noqa: E501 - """Find one view # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_with_http_info(id, database_id, view_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int view_id: (required) - :return: ViewDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'view_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find`") # noqa: E501 - # 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 `find`") # noqa: E501 - # verify the required parameter 'view_id' is set - if ('view_id' not in params or - params['view_id'] is None): - raise ValueError("Missing the required parameter `view_id` when calling `find`") # 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 - if 'view_id' in params: - path_params['viewId'] = params['view_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/view/{viewId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ViewDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all(self, id, database_id, **kwargs): # noqa: E501 - """Find all views # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: list[ViewBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_with_http_info(id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.find_all_with_http_info(id, database_id, **kwargs) # noqa: E501 - return data - - def find_all_with_http_info(self, id, database_id, **kwargs): # noqa: E501 - """Find all views # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_with_http_info(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: list[ViewBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['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 find_all" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find_all`") # 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 `find_all`") # 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ViewBriefDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_query/api_client.py b/swagger/api/api_query/api_client.py deleted file mode 100644 index 6cea546717669ec9cab21193113b4dbd7a01d3da..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_query.configuration import Configuration -import api_query.models -from api_query import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_query.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_query/configuration.py b/swagger/api/api_query/configuration.py deleted file mode 100644 index 2268056caefa568017d366a1510177a002e9976b..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_query") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_query/models/__init__.py b/swagger/api/api_query/models/__init__.py deleted file mode 100644 index ee1d231c2f899aee7c9a62a19f19827bb740c865..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -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_brief_dto import CreatorBriefDto -from api_query.models.creator_dto import CreatorDto -from api_query.models.database_access_dto import DatabaseAccessDto -from api_query.models.database_dto import DatabaseDto -from api_query.models.execute_statement_dto import ExecuteStatementDto -from api_query.models.identifier_brief_dto import IdentifierBriefDto -from api_query.models.identifier_dto import IdentifierDto -from api_query.models.image_brief_dto import ImageBriefDto -from api_query.models.image_date_dto import ImageDateDto -from api_query.models.image_dto import ImageDto -from api_query.models.import_dto import ImportDto -from api_query.models.license_dto import LicenseDto -from api_query.models.query_brief_dto import QueryBriefDto -from api_query.models.query_dto import QueryDto -from api_query.models.query_result_dto import QueryResultDto -from api_query.models.related_identifier_dto import RelatedIdentifierDto -from api_query.models.table_brief_dto import TableBriefDto -from api_query.models.table_csv_delete_dto import TableCsvDeleteDto -from api_query.models.table_csv_dto import TableCsvDto -from api_query.models.table_csv_update_dto import TableCsvUpdateDto -from api_query.models.table_history_dto import TableHistoryDto -from api_query.models.user_attribute_dto import UserAttributeDto -from api_query.models.user_brief_dto import UserBriefDto -from api_query.models.user_dto import UserDto -from api_query.models.view_brief_dto import ViewBriefDto -from api_query.models.view_create_dto import ViewCreateDto -from api_query.models.view_dto import ViewDto diff --git a/swagger/api/api_query/models/api_error_dto.py b/swagger/api/api_query/models/api_error_dto.py deleted file mode 100644 index 218e194d0287dd71cabb5a0bf9ad2689a254fd65..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_query/models/column_brief_dto.py b/swagger/api/api_query/models/column_brief_dto.py deleted file mode 100644 index cd3cd68dd0dd280730038608e0ed1c4d7f1e1e59..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/column_brief_dto.py +++ /dev/null @@ -1,252 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'database_id': 'int', - 'table_id': 'int', - 'internal_name': 'str', - 'column_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'database_id': 'database_id', - 'table_id': 'table_id', - 'internal_name': 'internal_name', - 'column_type': 'column_type' - } - - def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 - """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._database_id = None - self._table_id = None - self._internal_name = None - self._column_type = None - self.discriminator = None - self.id = id - self.name = name - self.database_id = database_id - self.table_id = table_id - self.internal_name = internal_name - self.column_type = column_type - - @property - def id(self): - """Gets the id of this ColumnBriefDto. # noqa: E501 - - - :return: The id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnBriefDto. - - - :param id: The id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this ColumnBriefDto. # noqa: E501 - - - :return: The name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnBriefDto. - - - :param name: The name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def database_id(self): - """Gets the database_id of this ColumnBriefDto. # noqa: E501 - - - :return: The database_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this ColumnBriefDto. - - - :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this ColumnBriefDto. # noqa: E501 - - - :return: The table_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this ColumnBriefDto. - - - :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def internal_name(self): - """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - - - :return: The internal_name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnBriefDto. - - - :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if internal_name is None: - raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - - self._internal_name = internal_name - - @property - def column_type(self): - """Gets the column_type of this ColumnBriefDto. # noqa: E501 - - - :return: The column_type of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnBriefDto. - - - :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if column_type is None: - raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ColumnBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ColumnBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_query/models/container_dto.py b/swagger/api/api_query/models/container_dto.py deleted file mode 100644 index be38f69af2e0f7efc7e5aea69c97019ed07008a1..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/container_dto.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'database': 'DatabaseDto', - 'running': 'bool', - 'image': 'ImageBriefDto', - 'port': 'int', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - 'database': 'database', - 'running': 'running', - '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, running=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 - self._name = None - self._state = None - self._database = None - self._running = None - self._image = None - self._port = None - self._owner = 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 database is not None: - self.database = database - self.running = running - if image is not None: - 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: - 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 database(self): - """Gets the database of this ContainerDto. # noqa: E501 - - - :return: The database of this ContainerDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerDto. - - - :param database: The database of this ContainerDto. # noqa: E501 - :type: DatabaseDto - """ - - self._database = database - - @property - def running(self): - """Gets the running of this ContainerDto. # noqa: E501 - - - :return: The running of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this ContainerDto. - - - :param running: The running of this ContainerDto. # noqa: E501 - :type: bool - """ - if running is None: - raise ValueError("Invalid value for `running`, must not be `None`") # noqa: E501 - - self._running = running - - @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 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 - - - :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_query/models/creator_brief_dto.py b/swagger/api/api_query/models/creator_brief_dto.py deleted file mode 100644 index b234e4d9931fb051c0e841c6fe749011fd26db52..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/creator_brief_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str' - } - - attribute_map = { - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation' - } - - def __init__(self, firstname=None, lastname=None, affiliation=None): # noqa: E501 - """CreatorBriefDto - a model defined in Swagger""" # noqa: E501 - self._firstname = None - self._lastname = None - self._affiliation = None - self.discriminator = None - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - - @property - def firstname(self): - """Gets the firstname of this CreatorBriefDto. # noqa: E501 - - - :return: The firstname of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorBriefDto. - - - :param firstname: The firstname of this CreatorBriefDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorBriefDto. # noqa: E501 - - - :return: The lastname of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorBriefDto. - - - :param lastname: The lastname of this CreatorBriefDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorBriefDto. # noqa: E501 - - - :return: The affiliation of this CreatorBriefDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorBriefDto. - - - :param affiliation: The affiliation of this CreatorBriefDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(CreatorBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CreatorBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_query/models/creator_dto.py b/swagger/api/api_query/models/creator_dto.py deleted file mode 100644 index 383e4e6562bd928d6a5511a3c4be96aab8c4bfc4..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/creator_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(CreatorDto, 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, CreatorDto): - 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/database_access_dto.py b/swagger/api/api_query/models/database_access_dto.py deleted file mode 100644 index 94481c96ca07b45c8aa1d46fcdf107ea7743a204..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/database_access_dto.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseAccessDto(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 = { - 'user': 'UserDto', - 'type': 'str', - 'created': 'datetime' - } - - attribute_map = { - 'user': 'user', - 'type': 'type', - 'created': 'created' - } - - def __init__(self, user=None, type=None, created=None): # noqa: E501 - """DatabaseAccessDto - a model defined in Swagger""" # noqa: E501 - self._user = None - self._type = None - self._created = None - self.discriminator = None - self.user = user - self.type = type - if created is not None: - self.created = created - - @property - def user(self): - """Gets the user of this DatabaseAccessDto. # noqa: E501 - - - :return: The user of this DatabaseAccessDto. # noqa: E501 - :rtype: UserDto - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this DatabaseAccessDto. - - - :param user: The user of this DatabaseAccessDto. # noqa: E501 - :type: UserDto - """ - if user is None: - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def type(self): - """Gets the type of this DatabaseAccessDto. # noqa: E501 - - - :return: The type of this DatabaseAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseAccessDto. - - - :param type: The type of this DatabaseAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def created(self): - """Gets the created of this DatabaseAccessDto. # noqa: E501 - - - :return: The created of this DatabaseAccessDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseAccessDto. - - - :param created: The created of this DatabaseAccessDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - 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(DatabaseAccessDto, 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, DatabaseAccessDto): - 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/database_dto.py b/swagger/api/api_query/models/database_dto.py deleted file mode 100644 index 5c2dc2aa84e59966d8f77ba8564cd91131573e0a..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/database_dto.py +++ /dev/null @@ -1,480 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'identifier': 'IdentifierDto', - 'description': 'str', - 'tables': 'list[TableBriefDto]', - 'views': 'list[ViewBriefDto]', - 'image': 'ImageDto', - 'container': 'ContainerDto', - 'accesses': 'list[DatabaseAccessDto]', - 'creator': 'UserBriefDto', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'exchange_name': 'str', - 'internal_name': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'identifier': 'identifier', - 'description': 'description', - 'tables': 'tables', - 'views': 'views', - 'image': 'image', - 'container': 'container', - 'accesses': 'accesses', - 'creator': 'creator', - 'owner': 'owner', - 'created': 'created', - 'exchange_name': 'exchange_name', - 'internal_name': 'internal_name', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, creator=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 - self._identifier = None - self._description = None - self._tables = None - self._views = None - self._image = None - self._container = None - self._accesses = None - self._creator = None - self._owner = None - self._created = None - self._exchange_name = None - self._internal_name = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - 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 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 - self.creator = creator - self.owner = owner - if created is not None: - self.created = created - self.exchange_name = exchange_name - 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 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 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 - - - :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 accesses(self): - """Gets the accesses of this DatabaseDto. # noqa: E501 - - - :return: The accesses of this DatabaseDto. # noqa: E501 - :rtype: list[DatabaseAccessDto] - """ - return self._accesses - - @accesses.setter - def accesses(self, accesses): - """Sets the accesses of this DatabaseDto. - - - :param accesses: The accesses of this DatabaseDto. # noqa: E501 - :type: list[DatabaseAccessDto] - """ - - self._accesses = accesses - - @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 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 - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @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 exchange_name(self): - """Gets the exchange_name of this DatabaseDto. # noqa: E501 - - - :return: The exchange_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this DatabaseDto. - - - :param exchange_name: The exchange_name of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange_name is None: - raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 - - self._exchange_name = exchange_name - - @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_query/models/execute_statement_dto.py b/swagger/api/api_query/models/execute_statement_dto.py deleted file mode 100644 index 43f874ca2ebe53a0a87a7e3a658016a89f45f990..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/execute_statement_dto.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ExecuteStatementDto(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 = { - 'statement': 'str', - 'timestamp': 'datetime' - } - - attribute_map = { - 'statement': 'statement', - 'timestamp': 'timestamp' - } - - 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): - """Gets the statement of this ExecuteStatementDto. # noqa: E501 - - - :return: The statement of this ExecuteStatementDto. # noqa: E501 - :rtype: str - """ - return self._statement - - @statement.setter - def statement(self, statement): - """Sets the statement of this ExecuteStatementDto. - - - :param statement: The statement of this ExecuteStatementDto. # noqa: E501 - :type: str - """ - if statement is None: - raise ValueError("Invalid value for `statement`, must not be `None`") # noqa: E501 - - 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 = {} - - 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(ExecuteStatementDto, 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, ExecuteStatementDto): - 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/granted_authority_dto.py b/swagger/api/api_query/models/granted_authority_dto.py deleted file mode 100644 index 14256a5fe3229571bb8f6d72e4da652593f608da..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/granted_authority_dto.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 GrantedAuthorityDto(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 = { - 'authority': 'str' - } - - attribute_map = { - 'authority': 'authority' - } - - def __init__(self, authority=None): # noqa: E501 - """GrantedAuthorityDto - a model defined in Swagger""" # noqa: E501 - self._authority = None - self.discriminator = None - if authority is not None: - self.authority = authority - - @property - def authority(self): - """Gets the authority of this GrantedAuthorityDto. # noqa: E501 - - - :return: The authority of this GrantedAuthorityDto. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this GrantedAuthorityDto. - - - :param authority: The authority of this GrantedAuthorityDto. # noqa: E501 - :type: str - """ - - self._authority = authority - - 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(GrantedAuthorityDto, 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, GrantedAuthorityDto): - 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/identifier_brief_dto.py b/swagger/api/api_query/models/identifier_brief_dto.py deleted file mode 100644 index 31a92e0b944d37f4eec2a31b6d1ac29f70bd2ca4..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/identifier_brief_dto.py +++ /dev/null @@ -1,357 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierBriefDto(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', - 'title': 'str', - 'type': 'str', - 'doi': 'str', - 'publisher': 'str', - 'creators': 'list[CreatorBriefDto]', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'publication_year': 'int' - } - - attribute_map = { - 'id': 'id', - 'title': 'title', - 'type': 'type', - 'doi': 'doi', - 'publisher': 'publisher', - 'creators': 'creators', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'publication_year': 'publication_year' - } - - def __init__(self, id=None, title=None, type=None, doi=None, publisher=None, creators=None, container_id=None, database_id=None, query_id=None, publication_year=None): # noqa: E501 - """IdentifierBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._title = None - self._type = None - self._doi = None - self._publisher = None - self._creators = None - self._container_id = None - self._database_id = None - self._query_id = None - self._publication_year = None - self.discriminator = None - self.id = id - self.title = title - self.type = type - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - self.creators = creators - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.publication_year = publication_year - - @property - def id(self): - """Gets the id of this IdentifierBriefDto. # noqa: E501 - - - :return: The id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierBriefDto. - - - :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 - - @property - def title(self): - """Gets the title of this IdentifierBriefDto. # noqa: E501 - - - :return: The title of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierBriefDto. - - - :param title: The title of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def type(self): - """Gets the type of this IdentifierBriefDto. # noqa: E501 - - - :return: The type of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierBriefDto. - - - :param type: The type of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def doi(self): - """Gets the doi of this IdentifierBriefDto. # noqa: E501 - - - :return: The doi of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierBriefDto. - - - :param doi: The doi of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierBriefDto. # noqa: E501 - - - :return: The publisher of this IdentifierBriefDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierBriefDto. - - - :param publisher: The publisher of this IdentifierBriefDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def creators(self): - """Gets the creators of this IdentifierBriefDto. # noqa: E501 - - - :return: The creators of this IdentifierBriefDto. # noqa: E501 - :rtype: list[CreatorBriefDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierBriefDto. - - - :param creators: The creators of this IdentifierBriefDto. # noqa: E501 - :type: list[CreatorBriefDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def container_id(self): - """Gets the container_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The container_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierBriefDto. - - - :param container_id: The container_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The database_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierBriefDto. - - - :param database_id: The database_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierBriefDto. # noqa: E501 - - - :return: The query_id of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierBriefDto. - - - :param query_id: The query_id of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierBriefDto. # noqa: E501 - - - :return: The publication_year of this IdentifierBriefDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierBriefDto. - - - :param publication_year: The publication_year of this IdentifierBriefDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - 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(IdentifierBriefDto, 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, IdentifierBriefDto): - 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/identifier_dto.py b/swagger/api/api_query/models/identifier_dto.py deleted file mode 100644 index d7b31a9b2ff8894896ef54f52ac0f93f1ca3e220..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - 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/image_brief_dto.py b/swagger/api/api_query/models/image_brief_dto.py deleted file mode 100644 index 7ad406d6e858ac3ae0fdef7f3e735c501ebf5660..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/image_brief_dto.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImageBriefDto(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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 - """ImageBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self.discriminator = None - self.id = id - self.registry = registry - self.repository = repository - self.tag = tag - - @property - def id(self): - """Gets the id of this ImageBriefDto. # 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 registry(self): - """Gets the registry of this ImageBriefDto. # noqa: E501 - - - :return: The registry of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageBriefDto. - - - :param registry: The registry of this ImageBriefDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageBriefDto. # noqa: E501 - - - :return: The repository of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. - - - :param repository: The repository of this ImageBriefDto. # 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 ImageBriefDto. # noqa: E501 - - - :return: The tag of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. - - - :param tag: The tag of this ImageBriefDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ImageBriefDto, 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, ImageBriefDto): - 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/image_date_dto.py b/swagger/api/api_query/models/image_date_dto.py deleted file mode 100644 index 5e04720ef7beb3eb64f1e8fccf2710bdddbd715c..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_query/models/image_dto.py b/swagger/api/api_query/models/image_dto.py deleted file mode 100644 index 096b9c11cf7ef0ff268b0142fa3b990885be89f1..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/image_dto.py +++ /dev/null @@ -1,404 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str', - 'dialect': 'str', - 'hash': 'str', - 'compiled': 'datetime', - 'size': 'int', - 'driver_class': 'str', - 'date_formats': 'list[ImageDateDto]', - 'jdbc_method': 'str', - 'default_port': 'int' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag', - 'dialect': 'dialect', - 'hash': 'hash', - 'compiled': 'compiled', - 'size': 'size', - 'driver_class': 'driver_class', - 'date_formats': 'date_formats', - 'jdbc_method': 'jdbc_method', - 'default_port': 'default_port' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 - """ImageDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self._dialect = None - self._hash = None - self._compiled = None - self._size = None - self._driver_class = None - self._date_formats = None - self._jdbc_method = None - self._default_port = None - self.discriminator = None - self.id = id - self.registry = registry - 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.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 registry(self): - """Gets the registry of this ImageDto. # noqa: E501 - - - :return: The registry of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageDto. - - - :param registry: The registry of this ImageDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageDto. # noqa: E501 - - - :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 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_query/models/image_env_item_dto.py b/swagger/api/api_query/models/image_env_item_dto.py deleted file mode 100644 index 521b735ee2ca69d6b694e6ade5cdc4de63c36478..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/image_env_item_dto.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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 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_query/models/import_dto.py b/swagger/api/api_query/models/import_dto.py deleted file mode 100644 index cdbfaeb17f6023d52919ee01b02130e3e7a70f00..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/import_dto.py +++ /dev/null @@ -1,268 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImportDto(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 = { - 'location': 'str', - 'separator': 'str', - 'quote': 'str', - 'skip_lines': 'int', - 'false_element': 'str', - 'true_element': 'str', - 'null_element': 'str' - } - - attribute_map = { - 'location': 'location', - 'separator': 'separator', - 'quote': 'quote', - 'skip_lines': 'skip_lines', - 'false_element': 'false_element', - 'true_element': 'true_element', - 'null_element': 'null_element' - } - - def __init__(self, location=None, separator=None, quote=None, skip_lines=None, false_element=None, true_element=None, null_element=None): # noqa: E501 - """ImportDto - a model defined in Swagger""" # noqa: E501 - self._location = None - self._separator = None - self._quote = None - self._skip_lines = None - self._false_element = None - self._true_element = None - self._null_element = None - self.discriminator = None - self.location = location - self.separator = separator - if quote is not None: - self.quote = quote - if skip_lines is not None: - self.skip_lines = skip_lines - if false_element is not None: - self.false_element = false_element - if true_element is not None: - self.true_element = true_element - if null_element is not None: - self.null_element = null_element - - @property - def location(self): - """Gets the location of this ImportDto. # noqa: E501 - - - :return: The location of this ImportDto. # noqa: E501 - :rtype: str - """ - return self._location - - @location.setter - def location(self, location): - """Sets the location of this ImportDto. - - - :param location: The location of this ImportDto. # noqa: E501 - :type: str - """ - if location is None: - raise ValueError("Invalid value for `location`, must not be `None`") # noqa: E501 - - self._location = location - - @property - def separator(self): - """Gets the separator of this ImportDto. # noqa: E501 - - - :return: The separator of this ImportDto. # noqa: E501 - :rtype: str - """ - return self._separator - - @separator.setter - def separator(self, separator): - """Sets the separator of this ImportDto. - - - :param separator: The separator of this ImportDto. # noqa: E501 - :type: str - """ - if separator is None: - raise ValueError("Invalid value for `separator`, must not be `None`") # noqa: E501 - - self._separator = separator - - @property - def quote(self): - """Gets the quote of this ImportDto. # noqa: E501 - - - :return: The quote of this ImportDto. # noqa: E501 - :rtype: str - """ - return self._quote - - @quote.setter - def quote(self, quote): - """Sets the quote of this ImportDto. - - - :param quote: The quote of this ImportDto. # noqa: E501 - :type: str - """ - - self._quote = quote - - @property - def skip_lines(self): - """Gets the skip_lines of this ImportDto. # noqa: E501 - - - :return: The skip_lines of this ImportDto. # noqa: E501 - :rtype: int - """ - return self._skip_lines - - @skip_lines.setter - def skip_lines(self, skip_lines): - """Sets the skip_lines of this ImportDto. - - - :param skip_lines: The skip_lines of this ImportDto. # noqa: E501 - :type: int - """ - - self._skip_lines = skip_lines - - @property - def false_element(self): - """Gets the false_element of this ImportDto. # noqa: E501 - - - :return: The false_element of this ImportDto. # noqa: E501 - :rtype: str - """ - return self._false_element - - @false_element.setter - def false_element(self, false_element): - """Sets the false_element of this ImportDto. - - - :param false_element: The false_element of this ImportDto. # noqa: E501 - :type: str - """ - - self._false_element = false_element - - @property - def true_element(self): - """Gets the true_element of this ImportDto. # noqa: E501 - - - :return: The true_element of this ImportDto. # noqa: E501 - :rtype: str - """ - return self._true_element - - @true_element.setter - def true_element(self, true_element): - """Sets the true_element of this ImportDto. - - - :param true_element: The true_element of this ImportDto. # noqa: E501 - :type: str - """ - - self._true_element = true_element - - @property - def null_element(self): - """Gets the null_element of this ImportDto. # noqa: E501 - - - :return: The null_element of this ImportDto. # noqa: E501 - :rtype: str - """ - return self._null_element - - @null_element.setter - def null_element(self, null_element): - """Sets the null_element of this ImportDto. - - - :param null_element: The null_element of this ImportDto. # noqa: E501 - :type: str - """ - - self._null_element = null_element - - 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(ImportDto, 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, ImportDto): - 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/license_dto.py b/swagger/api/api_query/models/license_dto.py deleted file mode 100644 index 56dadefff684d7ebd7e3047c7414eb3e3df91a55..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - 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/query_brief_dto.py b/swagger/api/api_query/models/query_brief_dto.py deleted file mode 100644 index 3bdb95a1a11139671829f928b0f00582128c6300..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/query_brief_dto.py +++ /dev/null @@ -1,461 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class QueryBriefDto(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', - 'cid': 'int', - 'dbid': 'int', - 'creator': 'UserDto', - 'execution': 'datetime', - 'query': 'str', - 'type': 'str', - 'identifier': 'IdentifierBriefDto', - 'created': 'datetime', - 'query_normalized': 'str', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'cid': 'cid', - 'dbid': 'dbid', - 'creator': 'creator', - 'execution': 'execution', - 'query': 'query', - 'type': 'type', - 'identifier': 'identifier', - 'created': 'created', - 'query_normalized': 'query_normalized', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'last_modified': 'last_modified' - } - - 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 - self._dbid = None - self._creator = None - self._execution = None - self._query = None - self._type = None - self._identifier = None - self._created = None - self._query_normalized = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._last_modified = None - self.discriminator = None - self.id = id - self.cid = cid - self.dbid = dbid - self.creator = creator - if execution is not None: - self.execution = execution - 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 - self.query_hash = query_hash - if result_hash is not None: - self.result_hash = result_hash - if result_number is not None: - self.result_number = result_number - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this QueryBriefDto. # noqa: E501 - - - :return: The id of this QueryBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this QueryBriefDto. - - - :param id: The id of this QueryBriefDto. # 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 cid(self): - """Gets the cid of this QueryBriefDto. # noqa: E501 - - - :return: The cid of this QueryBriefDto. # noqa: E501 - :rtype: int - """ - return self._cid - - @cid.setter - def cid(self, cid): - """Sets the cid of this QueryBriefDto. - - - :param cid: The cid of this QueryBriefDto. # noqa: E501 - :type: int - """ - if cid is None: - raise ValueError("Invalid value for `cid`, must not be `None`") # noqa: E501 - - self._cid = cid - - @property - def dbid(self): - """Gets the dbid of this QueryBriefDto. # noqa: E501 - - - :return: The dbid of this QueryBriefDto. # noqa: E501 - :rtype: int - """ - return self._dbid - - @dbid.setter - def dbid(self, dbid): - """Sets the dbid of this QueryBriefDto. - - - :param dbid: The dbid of this QueryBriefDto. # noqa: E501 - :type: int - """ - if dbid is None: - raise ValueError("Invalid value for `dbid`, must not be `None`") # noqa: E501 - - self._dbid = dbid - - @property - def creator(self): - """Gets the creator of this QueryBriefDto. # noqa: E501 - - - :return: The creator of this QueryBriefDto. # noqa: E501 - :rtype: UserDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this QueryBriefDto. - - - :param creator: The creator of this QueryBriefDto. # 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 execution(self): - """Gets the execution of this QueryBriefDto. # noqa: E501 - - - :return: The execution of this QueryBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this QueryBriefDto. - - - :param execution: The execution of this QueryBriefDto. # noqa: E501 - :type: datetime - """ - - self._execution = execution - - @property - def query(self): - """Gets the query of this QueryBriefDto. # noqa: E501 - - - :return: The query of this QueryBriefDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this QueryBriefDto. - - - :param query: The query of this QueryBriefDto. # 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 type(self): - """Gets the type of this QueryBriefDto. # noqa: E501 - - - :return: The type of this QueryBriefDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this QueryBriefDto. - - - :param type: The type of this QueryBriefDto. # noqa: E501 - :type: str - """ - allowed_values = ["query", "view"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def 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 - - - :return: The created of this QueryBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this QueryBriefDto. - - - :param created: The created of this QueryBriefDto. # 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 query_normalized(self): - """Gets the query_normalized of this QueryBriefDto. # noqa: E501 - - - :return: The query_normalized of this QueryBriefDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this QueryBriefDto. - - - :param query_normalized: The query_normalized of this QueryBriefDto. # noqa: E501 - :type: str - """ - - self._query_normalized = query_normalized - - @property - def query_hash(self): - """Gets the query_hash of this QueryBriefDto. # noqa: E501 - - - :return: The query_hash of this QueryBriefDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this QueryBriefDto. - - - :param query_hash: The query_hash of this QueryBriefDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this QueryBriefDto. # noqa: E501 - - - :return: The result_hash of this QueryBriefDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this QueryBriefDto. - - - :param result_hash: The result_hash of this QueryBriefDto. # noqa: E501 - :type: str - """ - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this QueryBriefDto. # noqa: E501 - - - :return: The result_number of this QueryBriefDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this QueryBriefDto. - - - :param result_number: The result_number of this QueryBriefDto. # noqa: E501 - :type: int - """ - - self._result_number = result_number - - @property - def last_modified(self): - """Gets the last_modified of this QueryBriefDto. # noqa: E501 - - - :return: The last_modified of this QueryBriefDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this QueryBriefDto. - - - :param last_modified: The last_modified of this QueryBriefDto. # 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(QueryBriefDto, 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, QueryBriefDto): - 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/query_dto.py b/swagger/api/api_query/models/query_dto.py deleted file mode 100644 index df88a2ced5fb85aea54d7874a6c12864d0742680..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/query_dto.py +++ /dev/null @@ -1,488 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class QueryDto(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', - 'cid': 'int', - 'dbid': 'int', - 'creator': 'UserDto', - 'execution': 'datetime', - 'query': 'str', - 'type': 'str', - 'identifier': 'IdentifierDto', - 'created': 'datetime', - 'query_normalized': 'str', - 'query_hash': 'str', - 'is_persisted': 'bool', - 'result_hash': 'str', - 'result_number': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'cid': 'cid', - 'dbid': 'dbid', - 'creator': 'creator', - 'execution': 'execution', - 'query': 'query', - 'type': 'type', - 'identifier': 'identifier', - 'created': 'created', - 'query_normalized': 'query_normalized', - 'query_hash': 'query_hash', - 'is_persisted': 'is_persisted', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'last_modified': 'last_modified' - } - - 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 - self._dbid = None - self._creator = None - self._execution = None - self._query = None - self._type = None - self._identifier = None - self._created = None - self._query_normalized = None - self._query_hash = None - self._is_persisted = None - self._result_hash = None - self._result_number = None - self._last_modified = None - self.discriminator = None - self.id = id - self.cid = cid - self.dbid = dbid - self.creator = creator - if execution is not None: - self.execution = execution - 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 - self.query_hash = query_hash - self.is_persisted = is_persisted - if result_hash is not None: - self.result_hash = result_hash - if result_number is not None: - self.result_number = result_number - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this QueryDto. # noqa: E501 - - - :return: The id of this QueryDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this QueryDto. - - - :param id: The id of this QueryDto. # 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 cid(self): - """Gets the cid of this QueryDto. # noqa: E501 - - - :return: The cid of this QueryDto. # noqa: E501 - :rtype: int - """ - return self._cid - - @cid.setter - def cid(self, cid): - """Sets the cid of this QueryDto. - - - :param cid: The cid of this QueryDto. # noqa: E501 - :type: int - """ - if cid is None: - raise ValueError("Invalid value for `cid`, must not be `None`") # noqa: E501 - - self._cid = cid - - @property - def dbid(self): - """Gets the dbid of this QueryDto. # noqa: E501 - - - :return: The dbid of this QueryDto. # noqa: E501 - :rtype: int - """ - return self._dbid - - @dbid.setter - def dbid(self, dbid): - """Sets the dbid of this QueryDto. - - - :param dbid: The dbid of this QueryDto. # noqa: E501 - :type: int - """ - if dbid is None: - raise ValueError("Invalid value for `dbid`, must not be `None`") # noqa: E501 - - self._dbid = dbid - - @property - def creator(self): - """Gets the creator of this QueryDto. # noqa: E501 - - - :return: The creator of this QueryDto. # noqa: E501 - :rtype: UserDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this QueryDto. - - - :param creator: The creator of this QueryDto. # 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 execution(self): - """Gets the execution of this QueryDto. # noqa: E501 - - - :return: The execution of this QueryDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this QueryDto. - - - :param execution: The execution of this QueryDto. # noqa: E501 - :type: datetime - """ - - self._execution = execution - - @property - def query(self): - """Gets the query of this QueryDto. # noqa: E501 - - - :return: The query of this QueryDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this QueryDto. - - - :param query: The query of this QueryDto. # 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 type(self): - """Gets the type of this QueryDto. # noqa: E501 - - - :return: The type of this QueryDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this QueryDto. - - - :param type: The type of this QueryDto. # noqa: E501 - :type: str - """ - allowed_values = ["query", "view"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def 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 - - - :return: The created of this QueryDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this QueryDto. - - - :param created: The created of this QueryDto. # 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 query_normalized(self): - """Gets the query_normalized of this QueryDto. # noqa: E501 - - - :return: The query_normalized of this QueryDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this QueryDto. - - - :param query_normalized: The query_normalized of this QueryDto. # noqa: E501 - :type: str - """ - - self._query_normalized = query_normalized - - @property - def query_hash(self): - """Gets the query_hash of this QueryDto. # noqa: E501 - - - :return: The query_hash of this QueryDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this QueryDto. - - - :param query_hash: The query_hash of this QueryDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def is_persisted(self): - """Gets the is_persisted of this QueryDto. # noqa: E501 - - - :return: The is_persisted of this QueryDto. # noqa: E501 - :rtype: bool - """ - return self._is_persisted - - @is_persisted.setter - def is_persisted(self, is_persisted): - """Sets the is_persisted of this QueryDto. - - - :param is_persisted: The is_persisted of this QueryDto. # noqa: E501 - :type: bool - """ - if is_persisted is None: - raise ValueError("Invalid value for `is_persisted`, must not be `None`") # noqa: E501 - - self._is_persisted = is_persisted - - @property - def result_hash(self): - """Gets the result_hash of this QueryDto. # noqa: E501 - - - :return: The result_hash of this QueryDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this QueryDto. - - - :param result_hash: The result_hash of this QueryDto. # noqa: E501 - :type: str - """ - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this QueryDto. # noqa: E501 - - - :return: The result_number of this QueryDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this QueryDto. - - - :param result_number: The result_number of this QueryDto. # noqa: E501 - :type: int - """ - - self._result_number = result_number - - @property - def last_modified(self): - """Gets the last_modified of this QueryDto. # noqa: E501 - - - :return: The last_modified of this QueryDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this QueryDto. - - - :param last_modified: The last_modified of this QueryDto. # 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(QueryDto, 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, QueryDto): - 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/query_result_dto.py b/swagger/api/api_query/models/query_result_dto.py deleted file mode 100644 index 1f664b7e21be3bd22f8dc16e7bb856df20ea6848..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/query_result_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class QueryResultDto(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 = { - 'result': 'list[dict(str, object)]', - 'id': 'int', - 'result_number': 'int' - } - - attribute_map = { - 'result': 'result', - 'id': 'id', - 'result_number': 'result_number' - } - - def __init__(self, result=None, id=None, result_number=None): # noqa: E501 - """QueryResultDto - a model defined in Swagger""" # noqa: E501 - self._result = None - self._id = None - self._result_number = None - self.discriminator = None - self.result = result - self.id = id - if result_number is not None: - self.result_number = result_number - - @property - def result(self): - """Gets the result of this QueryResultDto. # noqa: E501 - - - :return: The result of this QueryResultDto. # noqa: E501 - :rtype: list[dict(str, object)] - """ - return self._result - - @result.setter - def result(self, result): - """Sets the result of this QueryResultDto. - - - :param result: The result of this QueryResultDto. # noqa: E501 - :type: list[dict(str, object)] - """ - if result is None: - raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 - - self._result = result - - @property - def id(self): - """Gets the id of this QueryResultDto. # noqa: E501 - - - :return: The id of this QueryResultDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this QueryResultDto. - - - :param id: The id of this QueryResultDto. # 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 result_number(self): - """Gets the result_number of this QueryResultDto. # noqa: E501 - - - :return: The result_number of this QueryResultDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this QueryResultDto. - - - :param result_number: The result_number of this QueryResultDto. # noqa: E501 - :type: int - """ - - self._result_number = result_number - - 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(QueryResultDto, 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, QueryResultDto): - 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/related_identifier_dto.py b/swagger/api/api_query/models/related_identifier_dto.py deleted file mode 100644 index f2468c3438cf584c2e2860d62945baad68dbd3e4..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - 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/table_brief_dto.py b/swagger/api/api_query/models/table_brief_dto.py deleted file mode 100644 index a719d849392db17ba6ed9a8e3f870421e1e8d871..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/table_brief_dto.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableBriefDto(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', - 'description': 'str', - 'owner': 'UserBriefDto', - 'columns': 'list[ColumnBriefDto]', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'owner': 'owner', - 'columns': 'columns', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 - """TableBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._owner = None - self._columns = None - self._internal_name = None - self.discriminator = None - self.id = id - self.name = name - self.description = description - self.owner = owner - self.columns = columns - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 - - - :return: The id of this TableBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableBriefDto. - - - :param id: The id of this TableBriefDto. # 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 TableBriefDto. # noqa: E501 - - - :return: The name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableBriefDto. - - - :param name: The name of this TableBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableBriefDto. # noqa: E501 - - - :return: The description of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableBriefDto. - - - :param description: The description of this TableBriefDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def owner(self): - """Gets the owner of this TableBriefDto. # noqa: E501 - - - :return: The owner of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this TableBriefDto. - - - :param owner: The owner of this TableBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def 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 - - - :return: The internal_name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. - - - :param internal_name: The internal_name of this TableBriefDto. # 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 - - 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(TableBriefDto, 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, TableBriefDto): - 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/table_csv_delete_dto.py b/swagger/api/api_query/models/table_csv_delete_dto.py deleted file mode 100644 index d362b4a0080fd65d5a700cc6fea9296f637b9c54..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/table_csv_delete_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableCsvDeleteDto(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 = { - 'keys': 'dict(str, object)' - } - - attribute_map = { - 'keys': 'keys' - } - - def __init__(self, keys=None): # noqa: E501 - """TableCsvDeleteDto - a model defined in Swagger""" # noqa: E501 - self._keys = None - self.discriminator = None - self.keys = keys - - @property - def keys(self): - """Gets the keys of this TableCsvDeleteDto. # noqa: E501 - - - :return: The keys of this TableCsvDeleteDto. # noqa: E501 - :rtype: dict(str, object) - """ - return self._keys - - @keys.setter - def keys(self, keys): - """Sets the keys of this TableCsvDeleteDto. - - - :param keys: The keys of this TableCsvDeleteDto. # noqa: E501 - :type: dict(str, object) - """ - if keys is None: - raise ValueError("Invalid value for `keys`, must not be `None`") # noqa: E501 - - self._keys = keys - - 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(TableCsvDeleteDto, 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, TableCsvDeleteDto): - 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/table_csv_dto.py b/swagger/api/api_query/models/table_csv_dto.py deleted file mode 100644 index db88afb83aaf9ddda60ca44182817c8db31dfc53..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/table_csv_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableCsvDto(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 = { - 'data': 'dict(str, object)' - } - - attribute_map = { - 'data': 'data' - } - - def __init__(self, data=None): # noqa: E501 - """TableCsvDto - a model defined in Swagger""" # noqa: E501 - self._data = None - self.discriminator = None - self.data = data - - @property - def data(self): - """Gets the data of this TableCsvDto. # noqa: E501 - - - :return: The data of this TableCsvDto. # noqa: E501 - :rtype: dict(str, object) - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TableCsvDto. - - - :param data: The data of this TableCsvDto. # noqa: E501 - :type: dict(str, object) - """ - if data is None: - raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - - self._data = data - - 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(TableCsvDto, 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, TableCsvDto): - 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/table_csv_update_dto.py b/swagger/api/api_query/models/table_csv_update_dto.py deleted file mode 100644 index d724da1056c3729fe248a9fefa11eef22e0c2b2e..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/table_csv_update_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableCsvUpdateDto(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 = { - 'data': 'dict(str, object)', - 'keys': 'dict(str, object)' - } - - attribute_map = { - 'data': 'data', - 'keys': 'keys' - } - - def __init__(self, data=None, keys=None): # noqa: E501 - """TableCsvUpdateDto - a model defined in Swagger""" # noqa: E501 - self._data = None - self._keys = None - self.discriminator = None - self.data = data - self.keys = keys - - @property - def data(self): - """Gets the data of this TableCsvUpdateDto. # noqa: E501 - - - :return: The data of this TableCsvUpdateDto. # noqa: E501 - :rtype: dict(str, object) - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this TableCsvUpdateDto. - - - :param data: The data of this TableCsvUpdateDto. # noqa: E501 - :type: dict(str, object) - """ - if data is None: - raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 - - self._data = data - - @property - def keys(self): - """Gets the keys of this TableCsvUpdateDto. # noqa: E501 - - - :return: The keys of this TableCsvUpdateDto. # noqa: E501 - :rtype: dict(str, object) - """ - return self._keys - - @keys.setter - def keys(self, keys): - """Sets the keys of this TableCsvUpdateDto. - - - :param keys: The keys of this TableCsvUpdateDto. # noqa: E501 - :type: dict(str, object) - """ - if keys is None: - raise ValueError("Invalid value for `keys`, must not be `None`") # noqa: E501 - - self._keys = keys - - 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(TableCsvUpdateDto, 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, TableCsvUpdateDto): - 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/table_history_dto.py b/swagger/api/api_query/models/table_history_dto.py deleted file mode 100644 index c1445489fe9590f8f731aa7cd9bf0b635911473f..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/table_history_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableHistoryDto(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 = { - 'timestamp': 'datetime', - 'event': 'str', - 'total': 'int' - } - - attribute_map = { - 'timestamp': 'timestamp', - 'event': 'event', - 'total': 'total' - } - - def __init__(self, timestamp=None, event=None, total=None): # noqa: E501 - """TableHistoryDto - a model defined in Swagger""" # noqa: E501 - self._timestamp = None - self._event = None - self._total = None - self.discriminator = None - self.timestamp = timestamp - self.event = event - self.total = total - - @property - def timestamp(self): - """Gets the timestamp of this TableHistoryDto. # noqa: E501 - - - :return: The timestamp of this TableHistoryDto. # noqa: E501 - :rtype: datetime - """ - return self._timestamp - - @timestamp.setter - def timestamp(self, timestamp): - """Sets the timestamp of this TableHistoryDto. - - - :param timestamp: The timestamp of this TableHistoryDto. # noqa: E501 - :type: datetime - """ - if timestamp is None: - raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 - - self._timestamp = timestamp - - @property - def event(self): - """Gets the event of this TableHistoryDto. # noqa: E501 - - - :return: The event of this TableHistoryDto. # noqa: E501 - :rtype: str - """ - return self._event - - @event.setter - def event(self, event): - """Sets the event of this TableHistoryDto. - - - :param event: The event of this TableHistoryDto. # noqa: E501 - :type: str - """ - if event is None: - raise ValueError("Invalid value for `event`, must not be `None`") # noqa: E501 - - self._event = event - - @property - def total(self): - """Gets the total of this TableHistoryDto. # noqa: E501 - - - :return: The total of this TableHistoryDto. # noqa: E501 - :rtype: int - """ - return self._total - - @total.setter - def total(self, total): - """Sets the total of this TableHistoryDto. - - - :param total: The total of this TableHistoryDto. # noqa: E501 - :type: int - """ - if total is None: - raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501 - - self._total = total - - 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(TableHistoryDto, 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, TableHistoryDto): - 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/user_attribute_dto.py b/swagger/api/api_query/models/user_attribute_dto.py deleted file mode 100644 index a8634bef093bb7a2882a6ea8146ddb5a33242641..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/user_attribute_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserAttributeDto(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', - 'value': 'str' - } - - attribute_map = { - 'name': 'name', - 'value': 'value' - } - - def __init__(self, name=None, value=None): # noqa: E501 - """UserAttributeDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._value = None - self.discriminator = None - if name is not None: - self.name = name - if value is not None: - self.value = value - - @property - def name(self): - """Gets the name of this UserAttributeDto. # noqa: E501 - - - :return: The name of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserAttributeDto. - - - :param name: The name of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def value(self): - """Gets the value of this UserAttributeDto. # noqa: E501 - - - :return: The value of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this UserAttributeDto. - - - :param value: The value of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._value = value - - 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(UserAttributeDto, 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, UserAttributeDto): - 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/user_brief_dto.py b/swagger/api/api_query/models/user_brief_dto.py deleted file mode 100644 index a009baf1ea14abae48161837b6cfb820a6935d52..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/user_brief_dto.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBriefDto. - - - :param id: The id of this UserBriefDto. # noqa: E501 - :type: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this UserBriefDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBriefDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserBriefDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def name(self): - """Gets the name of this UserBriefDto. # noqa: E501 - - - :return: The name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBriefDto. - - - :param name: The name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def orcid(self): - """Gets the orcid of this UserBriefDto. # noqa: E501 - - - :return: The orcid of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserBriefDto. - - - :param orcid: The orcid of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def given_name(self): - """Gets the given_name of this UserBriefDto. # noqa: E501 - - - :return: The given_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserBriefDto. - - - :param given_name: The given_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserBriefDto. # noqa: E501 - - - :return: The family_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserBriefDto. - - - :param family_name: The family_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @property - def email_verified(self): - """Gets the email_verified of this UserBriefDto. # noqa: E501 - - - :return: The email_verified of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserBriefDto. - - - :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_query/models/user_dto.py b/swagger/api/api_query/models/user_dto.py deleted file mode 100644 index 6b409c7da4077089b22343e332b2ab8f1652724a..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/user_dto.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'attributes': 'list[UserAttributeDto]', - 'containers': 'list[ContainerDto]', - 'databases': 'list[ContainerDto]', - 'identifiers': 'list[ContainerDto]', - 'email': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'attributes': 'attributes', - 'containers': 'containers', - 'databases': 'databases', - 'identifiers': 'identifiers', - 'email': 'email', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, attributes=None, containers=None, databases=None, identifiers=None, email=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._attributes = None - self._containers = None - self._databases = None - self._identifiers = None - self._email = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if attributes is not None: - self.attributes = attributes - 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 given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - 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: str - """ - 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: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this 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 name(self): - """Gets the name of this UserDto. # noqa: E501 - - - :return: The name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserDto. - - - :param name: The name of this UserDto. # noqa: E501 - :type: str - """ - - self._name = name - - @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 attributes(self): - """Gets the attributes of this UserDto. # noqa: E501 - - - :return: The attributes of this UserDto. # noqa: E501 - :rtype: list[UserAttributeDto] - """ - return self._attributes - - @attributes.setter - def attributes(self, attributes): - """Sets the attributes of this UserDto. - - - :param attributes: The attributes of this UserDto. # noqa: E501 - :type: list[UserAttributeDto] - """ - - self._attributes = attributes - - @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 given_name(self): - """Gets the given_name of this UserDto. # noqa: E501 - - - :return: The given_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserDto. - - - :param given_name: The given_name of this UserDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserDto. # noqa: E501 - - - :return: The family_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserDto. - - - :param family_name: The family_name of this UserDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @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_query/models/view_brief_dto.py b/swagger/api/api_query/models/view_brief_dto.py deleted file mode 100644 index a696ff895d7e36175643e4bd659b6443fadd2392..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/view_brief_dto.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_query/models/view_create_dto.py b/swagger/api/api_query/models/view_create_dto.py deleted file mode 100644 index 1d7fefca4a9e98d50e15b5f810e77cd880753025..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/view_create_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ViewCreateDto(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', - 'query': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'name': 'name', - 'query': 'query', - 'is_public': 'is_public' - } - - def __init__(self, name=None, query=None, is_public=None): # noqa: E501 - """ViewCreateDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._query = None - self._is_public = None - self.discriminator = None - self.name = name - self.query = query - self.is_public = is_public - - @property - def name(self): - """Gets the name of this ViewCreateDto. # noqa: E501 - - - :return: The name of this ViewCreateDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ViewCreateDto. - - - :param name: The name of this ViewCreateDto. # 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 ViewCreateDto. # noqa: E501 - - - :return: The query of this ViewCreateDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this ViewCreateDto. - - - :param query: The query of this ViewCreateDto. # 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 is_public(self): - """Gets the is_public of this ViewCreateDto. # noqa: E501 - - - :return: The is_public of this ViewCreateDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ViewCreateDto. - - - :param is_public: The is_public of this ViewCreateDto. # 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 = {} - - 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(ViewCreateDto, 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, ViewCreateDto): - 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/view_dto.py b/swagger/api/api_query/models/view_dto.py deleted file mode 100644 index 7b08865cb29092608ffc49ddcec78a08692af8f3..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/models/view_dto.py +++ /dev/null @@ -1,380 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ViewDto(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', - 'database': 'DatabaseDto', - 'name': 'str', - 'internal_name': 'str', - 'query': 'str', - 'created': 'datetime', - 'creator': 'UserDto', - 'is_public': 'bool', - 'initial_view': 'bool', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'vdbid': 'vdbid', - '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, 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._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.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: - 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 ViewDto. # noqa: E501 - - - :return: The id of this ViewDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ViewDto. - - - :param id: The id of this ViewDto. # 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 ViewDto. # noqa: E501 - - - :return: The vdbid of this ViewDto. # noqa: E501 - :rtype: int - """ - return self._vdbid - - @vdbid.setter - def vdbid(self, vdbid): - """Sets the vdbid of this ViewDto. - - - :param vdbid: The vdbid of this ViewDto. # 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 database(self): - """Gets the database of this ViewDto. # noqa: E501 - - - :return: The database of this ViewDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ViewDto. - - - :param database: The database of this ViewDto. # noqa: E501 - :type: DatabaseDto - """ - if database is None: - raise ValueError("Invalid value for `database`, must not be `None`") # noqa: E501 - - self._database = database - - @property - def name(self): - """Gets the name of this ViewDto. # noqa: E501 - - - :return: The name of this ViewDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ViewDto. - - - :param name: The name of this ViewDto. # 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 ViewDto. # noqa: E501 - - - :return: The internal_name of this ViewDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ViewDto. - - - :param internal_name: The internal_name of this ViewDto. # 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 ViewDto. # noqa: E501 - - - :return: The query of this ViewDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this ViewDto. - - - :param query: The query of this ViewDto. # 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 ViewDto. # noqa: E501 - - - :return: The created of this ViewDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ViewDto. - - - :param created: The created of this ViewDto. # 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 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 - - - :return: The is_public of this ViewDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ViewDto. - - - :param is_public: The is_public of this ViewDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - - @property - def initial_view(self): - """Gets the initial_view of this ViewDto. # noqa: E501 - - True if it is the default view for the database # noqa: E501 - - :return: The initial_view of this ViewDto. # noqa: E501 - :rtype: bool - """ - return self._initial_view - - @initial_view.setter - def initial_view(self, initial_view): - """Sets the initial_view of this ViewDto. - - True if it is the default view for the database # noqa: E501 - - :param initial_view: The initial_view of this ViewDto. # noqa: E501 - :type: bool - """ - - self._initial_view = initial_view - - @property - def last_modified(self): - """Gets the last_modified of this ViewDto. # noqa: E501 - - - :return: The last_modified of this ViewDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this ViewDto. - - - :param last_modified: The last_modified of this ViewDto. # 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(ViewDto, 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, ViewDto): - 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/rest.py b/swagger/api/api_query/rest.py deleted file mode 100644 index d204d108180e5be04e547a261d38b4d73f90d7ec..0000000000000000000000000000000000000000 --- a/swagger/api/api_query/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Query Service API - - Service that manages the queries # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_semantics/__init__.py b/swagger/api/api_semantics/__init__.py deleted file mode 100644 index 6f9594aff98ff4fb662b47432b371af66b755448..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_semantics.api.ontology_endpoint_api import OntologyEndpointApi -from api_semantics.api.query_endpoint_api import QueryEndpointApi -from api_semantics.api.semantics_endpoint_api import SemanticsEndpointApi -from api_semantics.api.table_endpoint_api import TableEndpointApi -# import ApiClient -from api_semantics.api_client import ApiClient -from api_semantics.configuration import Configuration -# import models into sdk package -from api_semantics.models.api_error_dto import ApiErrorDto -from api_semantics.models.column_brief_dto import ColumnBriefDto -from api_semantics.models.concept_dto import ConceptDto -from api_semantics.models.concept_save_dto import ConceptSaveDto -from api_semantics.models.entity_dto import EntityDto -from api_semantics.models.ontology_create_dto import OntologyCreateDto -from api_semantics.models.ontology_dto import OntologyDto -from api_semantics.models.ontology_modify_dto import OntologyModifyDto -from api_semantics.models.table_column_entity_dto import TableColumnEntityDto -from api_semantics.models.unit_dto import UnitDto -from api_semantics.models.unit_save_dto import UnitSaveDto -from api_semantics.models.user_brief_dto import UserBriefDto diff --git a/swagger/api/api_semantics/api/__init__.py b/swagger/api/api_semantics/api/__init__.py deleted file mode 100644 index 3c29f9091930b3e3a770db87e0aaf89bf2040ae1..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_semantics.api.ontology_endpoint_api import OntologyEndpointApi -from api_semantics.api.query_endpoint_api import QueryEndpointApi -from api_semantics.api.semantics_endpoint_api import SemanticsEndpointApi -from api_semantics.api.table_endpoint_api import TableEndpointApi diff --git a/swagger/api/api_semantics/api/concepts_endpoint_api.py b/swagger/api/api_semantics/api/concepts_endpoint_api.py deleted file mode 100644 index a2e5b5569a0d1f05c9f8c1941b0f66f93ad83923..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/concepts_endpoint_api.py +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class ConceptsEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def api_semantics_concept_concept_validate_get(self, unit, **kwargs): # noqa: E501 - """Validate concepts # noqa: E501 - - This is a simple API for validating 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_concept_validate_get(unit, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str unit: Validates concepts against om-2. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_semantics_concept_concept_validate_get_with_http_info(unit, **kwargs) # noqa: E501 - else: - (data) = self.api_semantics_concept_concept_validate_get_with_http_info(unit, **kwargs) # noqa: E501 - return data - - def api_semantics_concept_concept_validate_get_with_http_info(self, unit, **kwargs): # noqa: E501 - """Validate concepts # noqa: E501 - - This is a simple API for validating 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_concept_validate_get_with_http_info(unit, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str unit: Validates concepts against om-2. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['unit'] # 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_concept_validate_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'unit' is set - if ('unit' not in params or - params['unit'] is None): - raise ValueError("Missing the required parameter `unit` when calling `api_semantics_concept_concept_validate_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'unit' in params: - path_params['unit'] = params['unit'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantics/concept/{concept}/validate', 'GET', - 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_concept_get(self, **kwargs): # noqa: E501 - """Suggest a concept # noqa: E501 - - This is a simple API which returns a list of suggested 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_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str q: The query to retrieve a fitting concept - :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_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_semantics_concept_get_with_http_info(**kwargs) # noqa: E501 - return data - - def api_semantics_concept_get_with_http_info(self, **kwargs): # noqa: E501 - """Suggest a concept # noqa: E501 - - This is a simple API which returns a list of suggested 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_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str q: The query to retrieve a fitting concept - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['q'] # 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_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'q' in params: - query_params.append(('q', params['q'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantics/concept', 'GET', - 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_concept_post(self, **kwargs): # noqa: E501 - """Save concept to MDB # noqa: E501 - - This is a simple API for saving concept # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.api_semantics_concept_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SemanticsConceptBody1 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_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_semantics_concept_post_with_http_info(**kwargs) # noqa: E501 - return data - - def api_semantics_concept_post_with_http_info(self, **kwargs): # noqa: E501 - """Save concept to MDB # noqa: E501 - - This is a simple API for saving concept # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.api_semantics_concept_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SemanticsConceptBody1 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_post" % 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', 'POST', - 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_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/ontologies_endpoint_api.py b/swagger/api/api_semantics/api/ontologies_endpoint_api.py deleted file mode 100644 index fdb5fb50b7aa195931756d11c7dae1e99aacd180..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/ontologies_endpoint_api.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class OntologiesEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def api_semantics_ontology_get(self, **kwargs): # noqa: E501 - """List ontologies # noqa: E501 - - This is a simple API for listing all ontologies (.nt, .ttl files) used in DB-Repo. # 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_ontology_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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_ontology_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_semantics_ontology_get_with_http_info(**kwargs) # noqa: E501 - return data - - def api_semantics_ontology_get_with_http_info(self, **kwargs): # noqa: E501 - """List ontologies # noqa: E501 - - This is a simple API for listing all ontologies (.nt, .ttl files) used in DB-Repo. # 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_ontology_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method api_semantics_ontology_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantics/ontology', 'GET', - 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_ontology_name_get(self, o_name, **kwargs): # noqa: E501 - """Get ontology # noqa: E501 - - This is a simple API for getting a certain ontologies (.nt, .ttl files) stored in DB-Repo. # 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_ontology_name_get(o_name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str o_name: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_semantics_ontology_name_get_with_http_info(o_name, **kwargs) # noqa: E501 - else: - (data) = self.api_semantics_ontology_name_get_with_http_info(o_name, **kwargs) # noqa: E501 - return data - - def api_semantics_ontology_name_get_with_http_info(self, o_name, **kwargs): # noqa: E501 - """Get ontology # noqa: E501 - - This is a simple API for getting a certain ontologies (.nt, .ttl files) stored in DB-Repo. # 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_ontology_name_get_with_http_info(o_name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str o_name: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['o_name'] # 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_ontology_name_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'o_name' is set - if ('o_name' not in params or - params['o_name'] is None): - raise ValueError("Missing the required parameter `o_name` when calling `api_semantics_ontology_name_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'o_name' in params: - path_params['o_name'] = params['o_name'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantics/ontology/{name}', 'GET', - 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/ontology_endpoint_api.py b/swagger/api/api_semantics/api/ontology_endpoint_api.py deleted file mode 100644 index 815b92254fc5cb9cdfaef3e50182ca457b1debe9..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/ontology_endpoint_api.py +++ /dev/null @@ -1,506 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class OntologyEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, body, **kwargs): # noqa: E501 - """Register a new ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OntologyCreateDto body: (required) - :return: OntologyDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, **kwargs): # noqa: E501 - """Register a new ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OntologyCreateDto body: (required) - :return: OntologyDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/ontology', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OntologyDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, **kwargs): # noqa: E501 - """Delete an ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete an ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/ontology/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find(self, id, **kwargs): # noqa: E501 - """Find one ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: OntologyDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find_with_http_info(self, id, **kwargs): # noqa: E501 - """Find one ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: OntologyDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/ontology/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OntologyDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all(self, **kwargs): # noqa: E501 - """List all ontologies # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[OntologyDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.find_all_with_http_info(**kwargs) # noqa: E501 - return data - - def find_all_with_http_info(self, **kwargs): # noqa: E501 - """List all ontologies # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[OntologyDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/ontology', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[OntologyDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update(self, body, id, **kwargs): # noqa: E501 - """Update an ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OntologyModifyDto body: (required) - :param int id: (required) - :return: OntologyDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update an ontology # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OntologyModifyDto body: (required) - :param int id: (required) - :return: OntologyDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/ontology/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OntologyDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/query_endpoint_api.py b/swagger/api/api_semantics/api/query_endpoint_api.py deleted file mode 100644 index 9f301dfd18d13db7582e1c687977923f8344bf30..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/query_endpoint_api.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class QueryEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def find1(self, id, **kwargs): # noqa: E501 - """Find entities # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find1(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param str label: - :param str uri: - :return: list[EntityDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find1_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find1_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find1_with_http_info(self, id, **kwargs): # noqa: E501 - """Find entities # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find1_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param str label: - :param str uri: - :return: list[EntityDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'label', 'uri'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - if 'label' in params: - query_params.append(('label', params['label'])) # noqa: E501 - if 'uri' in params: - query_params.append(('uri', params['uri'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/ontology/{id}/entity', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[EntityDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/semantics_endpoint_api.py b/swagger/api/api_semantics/api/semantics_endpoint_api.py deleted file mode 100644 index 90b05834173757668f4378f86ee10e9e6e30b518..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/semantics_endpoint_api.py +++ /dev/null @@ -1,397 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class SemanticsEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def find_all_concepts(self, **kwargs): # noqa: E501 - """List semantic concepts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_concepts(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[ConceptDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_concepts_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.find_all_concepts_with_http_info(**kwargs) # noqa: E501 - return data - - def find_all_concepts_with_http_info(self, **kwargs): # noqa: E501 - """List semantic concepts # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_concepts_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[ConceptDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_concepts" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/concept', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[ConceptDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all_units(self, **kwargs): # noqa: E501 - """List semantic units # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_units(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[UnitDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_units_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.find_all_units_with_http_info(**kwargs) # noqa: E501 - return data - - def find_all_units_with_http_info(self, **kwargs): # noqa: E501 - """List semantic units # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_units_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[UnitDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all_units" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/unit', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UnitDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def save_unit(self, body, **kwargs): # noqa: E501 - """Save a semantic unit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_unit(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitSaveDto body: (required) - :return: UnitDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.save_unit_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.save_unit_with_http_info(body, **kwargs) # noqa: E501 - return data - - def save_unit_with_http_info(self, body, **kwargs): # noqa: E501 - """Save a semantic unit # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_unit_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitSaveDto body: (required) - :return: UnitDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method save_unit" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `save_unit`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/unit', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UnitDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def save_unit1(self, body, **kwargs): # noqa: E501 - """Create or update a semantic concept # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_unit1(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ConceptSaveDto body: (required) - :return: ConceptDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.save_unit1_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.save_unit1_with_http_info(body, **kwargs) # noqa: E501 - return data - - def save_unit1_with_http_info(self, body, **kwargs): # noqa: E501 - """Create or update a semantic concept # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.save_unit1_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ConceptSaveDto body: (required) - :return: ConceptDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method save_unit1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `save_unit1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/concept', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ConceptDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/table_endpoint_api.py b/swagger/api/api_semantics/api/table_endpoint_api.py deleted file mode 100644 index 09777ca4de535f1ee7f673409b6abed62d64fc90..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/table_endpoint_api.py +++ /dev/null @@ -1,243 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class TableEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def analyse_table(self, database_id, table_id, **kwargs): # noqa: E501 - """Suggest table semantics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.analyse_table(database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int database_id: (required) - :param int table_id: (required) - :return: list[TableColumnEntityDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.analyse_table_with_http_info(database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.analyse_table_with_http_info(database_id, table_id, **kwargs) # noqa: E501 - return data - - def analyse_table_with_http_info(self, database_id, table_id, **kwargs): # noqa: E501 - """Suggest table semantics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.analyse_table_with_http_info(database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int database_id: (required) - :param int table_id: (required) - :return: list[TableColumnEntityDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method analyse_table" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'database_id' is set - if ('database_id' not in params or - params['database_id'] is None): - raise ValueError("Missing the required parameter `database_id` when calling `analyse_table`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `analyse_table`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'database_id' in params: - path_params['databaseId'] = params['database_id'] # noqa: E501 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/database/{databaseId}/table/{tableId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TableColumnEntityDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def analyse_table_column(self, database_id, table_id, column_id, **kwargs): # noqa: E501 - """Suggest table column semantics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.analyse_table_column(database_id, table_id, column_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int database_id: (required) - :param int table_id: (required) - :param int column_id: (required) - :return: list[TableColumnEntityDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.analyse_table_column_with_http_info(database_id, table_id, column_id, **kwargs) # noqa: E501 - else: - (data) = self.analyse_table_column_with_http_info(database_id, table_id, column_id, **kwargs) # noqa: E501 - return data - - def analyse_table_column_with_http_info(self, database_id, table_id, column_id, **kwargs): # noqa: E501 - """Suggest table column semantics # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.analyse_table_column_with_http_info(database_id, table_id, column_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int database_id: (required) - :param int table_id: (required) - :param int column_id: (required) - :return: list[TableColumnEntityDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['database_id', 'table_id', 'column_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method analyse_table_column" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'database_id' is set - if ('database_id' not in params or - params['database_id'] is None): - raise ValueError("Missing the required parameter `database_id` when calling `analyse_table_column`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `analyse_table_column`") # noqa: E501 - # verify the required parameter 'column_id' is set - if ('column_id' not in params or - params['column_id'] is None): - raise ValueError("Missing the required parameter `column_id` when calling `analyse_table_column`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'database_id' in params: - path_params['databaseId'] = params['database_id'] # noqa: E501 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - if 'column_id' in params: - path_params['columnId'] = params['column_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/semantic/database/{databaseId}/table/{tableId}/column/{columnId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TableColumnEntityDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_semantics/api/units_endpoint_api.py b/swagger/api/api_semantics/api/units_endpoint_api.py deleted file mode 100644 index 40426549295c4cc32b9faa7f638055c336db1972..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api/units_endpoint_api.py +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_semantics.api_client import ApiClient - - -class UnitsEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def api_semantics_unit_get(self, **kwargs): # noqa: E501 - """Suggest a unit # noqa: E501 - - This is a simple API which returns a list of suggested 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_get(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str q: The query to retrieve a fitting unit - :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_get_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_semantics_unit_get_with_http_info(**kwargs) # noqa: E501 - return data - - def api_semantics_unit_get_with_http_info(self, **kwargs): # noqa: E501 - """Suggest a unit # noqa: E501 - - This is a simple API which returns a list of suggested 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_get_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str q: The query to retrieve a fitting unit - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['q'] # 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_get" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - if 'q' in params: - query_params.append(('q', params['q'])) # noqa: E501 - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantics/unit', 'GET', - 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_post(self, **kwargs): # noqa: E501 - """Save unit to MDB # noqa: E501 - - This is a simple API for saving 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_post(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SemanticsUnitBody1 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_post_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.api_semantics_unit_post_with_http_info(**kwargs) # noqa: E501 - return data - - def api_semantics_unit_post_with_http_info(self, **kwargs): # noqa: E501 - """Save unit to MDB # noqa: E501 - - This is a simple API for saving 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_post_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SemanticsUnitBody1 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_post" % 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', 'POST', - 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_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 - - This is a simple API for validating 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_unit_validate_get(unit, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str unit: Validates unit against om-2. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_semantics_unit_unit_validate_get_with_http_info(unit, **kwargs) # noqa: E501 - else: - (data) = self.api_semantics_unit_unit_validate_get_with_http_info(unit, **kwargs) # noqa: E501 - return data - - def api_semantics_unit_unit_validate_get_with_http_info(self, unit, **kwargs): # noqa: E501 - """Validate units # noqa: E501 - - This is a simple API for validating 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_unit_validate_get_with_http_info(unit, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str unit: Validates unit against om-2. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['unit'] # 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_unit_validate_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'unit' is set - if ('unit' not in params or - params['unit'] is None): - raise ValueError("Missing the required parameter `unit` when calling `api_semantics_unit_unit_validate_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'unit' in params: - path_params['unit'] = params['unit'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/semantics/unit/{unit}/validate', 'GET', - 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_client.py b/swagger/api/api_semantics/api_client.py deleted file mode 100644 index 646d0f6ce1e2c792416130cb3c8c5ea62428f1ca..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_semantics.configuration import Configuration -import api_semantics.models -from api_semantics import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_semantics.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_semantics/configuration.py b/swagger/api/api_semantics/configuration.py deleted file mode 100644 index df6f84b385bea881c5d1ce884d51d5e2aa900b7c..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_semantics") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_semantics/models/__init__.py b/swagger/api/api_semantics/models/__init__.py deleted file mode 100644 index b2b4d6b12fb186573c60cb1446d0d48e4b89c81b..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from api_semantics.models.api_error_dto import ApiErrorDto -from api_semantics.models.column_brief_dto import ColumnBriefDto -from api_semantics.models.concept_dto import ConceptDto -from api_semantics.models.concept_save_dto import ConceptSaveDto -from api_semantics.models.entity_dto import EntityDto -from api_semantics.models.ontology_create_dto import OntologyCreateDto -from api_semantics.models.ontology_dto import OntologyDto -from api_semantics.models.ontology_modify_dto import OntologyModifyDto -from api_semantics.models.table_column_entity_dto import TableColumnEntityDto -from api_semantics.models.unit_dto import UnitDto -from api_semantics.models.unit_save_dto import UnitSaveDto -from api_semantics.models.user_brief_dto import UserBriefDto diff --git a/swagger/api/api_semantics/models/api_error_dto.py b/swagger/api/api_semantics/models/api_error_dto.py deleted file mode 100644 index 64089fcbe002c455ac7ac810a447883932afdf5e..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/column_brief_dto.py b/swagger/api/api_semantics/models/column_brief_dto.py deleted file mode 100644 index 72fc19028605f0098c22380715080bab037e8b2f..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/column_brief_dto.py +++ /dev/null @@ -1,252 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'database_id': 'int', - 'table_id': 'int', - 'internal_name': 'str', - 'column_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'database_id': 'database_id', - 'table_id': 'table_id', - 'internal_name': 'internal_name', - 'column_type': 'column_type' - } - - def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 - """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._database_id = None - self._table_id = None - self._internal_name = None - self._column_type = None - self.discriminator = None - self.id = id - self.name = name - self.database_id = database_id - self.table_id = table_id - self.internal_name = internal_name - self.column_type = column_type - - @property - def id(self): - """Gets the id of this ColumnBriefDto. # noqa: E501 - - - :return: The id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnBriefDto. - - - :param id: The id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this ColumnBriefDto. # noqa: E501 - - - :return: The name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnBriefDto. - - - :param name: The name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def database_id(self): - """Gets the database_id of this ColumnBriefDto. # noqa: E501 - - - :return: The database_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this ColumnBriefDto. - - - :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this ColumnBriefDto. # noqa: E501 - - - :return: The table_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this ColumnBriefDto. - - - :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def internal_name(self): - """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - - - :return: The internal_name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnBriefDto. - - - :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if internal_name is None: - raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - - self._internal_name = internal_name - - @property - def column_type(self): - """Gets the column_type of this ColumnBriefDto. # noqa: E501 - - - :return: The column_type of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnBriefDto. - - - :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if column_type is None: - raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ColumnBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ColumnBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/concept_dto.py b/swagger/api/api_semantics/models/concept_dto.py deleted file mode 100644 index 205d6cf984cd74c7b52f8c2b0c1e1b5a6643eeac..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/concept_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ConceptDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[ColumnBriefDto]' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description', - 'created': 'created', - 'columns': 'columns' - } - - def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 - """ConceptDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self._created = None - self._columns = None - self.discriminator = None - self.uri = uri - if name is not None: - self.name = name - if description is not None: - self.description = description - self.created = created - self.columns = columns - - @property - def uri(self): - """Gets the uri of this ConceptDto. # noqa: E501 - - - :return: The uri of this ConceptDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this ConceptDto. - - - :param uri: The uri of this ConceptDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def name(self): - """Gets the name of this ConceptDto. # noqa: E501 - - - :return: The name of this ConceptDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ConceptDto. - - - :param name: The name of this ConceptDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this ConceptDto. # noqa: E501 - - - :return: The description of this ConceptDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ConceptDto. - - - :param description: The description of this ConceptDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def created(self): - """Gets the created of this ConceptDto. # noqa: E501 - - - :return: The created of this ConceptDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ConceptDto. - - - :param created: The created of this ConceptDto. # noqa: E501 - :type: datetime - """ - if created is None: - raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 - - self._created = created - - @property - def columns(self): - """Gets the columns of this ConceptDto. # noqa: E501 - - - :return: The columns of this ConceptDto. # noqa: E501 - :rtype: list[ColumnBriefDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this ConceptDto. - - - :param columns: The columns of this ConceptDto. # noqa: E501 - :type: list[ColumnBriefDto] - """ - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ConceptDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConceptDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/concept_save_dto.py b/swagger/api/api_semantics/models/concept_save_dto.py deleted file mode 100644 index 68ce0d74eefedb5151d27e9d5e2481c1ec92a7b0..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/concept_save_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ConceptSaveDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description' - } - - def __init__(self, uri=None, name=None, description=None): # noqa: E501 - """ConceptSaveDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self.discriminator = None - self.uri = uri - self.name = name - self.description = description - - @property - def uri(self): - """Gets the uri of this ConceptSaveDto. # noqa: E501 - - - :return: The uri of this ConceptSaveDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this ConceptSaveDto. - - - :param uri: The uri of this ConceptSaveDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def name(self): - """Gets the name of this ConceptSaveDto. # noqa: E501 - - - :return: The name of this ConceptSaveDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ConceptSaveDto. - - - :param name: The name of this ConceptSaveDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this ConceptSaveDto. # noqa: E501 - - - :return: The description of this ConceptSaveDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ConceptSaveDto. - - - :param description: The description of this ConceptSaveDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ConceptSaveDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConceptSaveDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/entity_dto.py b/swagger/api/api_semantics/models/entity_dto.py deleted file mode 100644 index 01394943b0e81465b206895e267ac95044fe5064..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/entity_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EntityDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'label': 'str', - 'description': 'str' - } - - attribute_map = { - 'uri': 'uri', - 'label': 'label', - 'description': 'description' - } - - def __init__(self, uri=None, label=None, description=None): # noqa: E501 - """EntityDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._label = None - self._description = None - self.discriminator = None - self.uri = uri - self.label = label - if description is not None: - self.description = description - - @property - def uri(self): - """Gets the uri of this EntityDto. # noqa: E501 - - - :return: The uri of this EntityDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this EntityDto. - - - :param uri: The uri of this EntityDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def label(self): - """Gets the label of this EntityDto. # noqa: E501 - - - :return: The label of this EntityDto. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this EntityDto. - - - :param label: The label of this EntityDto. # noqa: E501 - :type: str - """ - if label is None: - raise ValueError("Invalid value for `label`, must not be `None`") # noqa: E501 - - self._label = label - - @property - def description(self): - """Gets the description of this EntityDto. # noqa: E501 - - - :return: The description of this EntityDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this EntityDto. - - - :param description: The description of this EntityDto. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(EntityDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, EntityDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/ontology_create_dto.py b/swagger/api/api_semantics/models/ontology_create_dto.py deleted file mode 100644 index 5114c2ebf12159881dbb46432fadf0b665cc7a9b..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/ontology_create_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OntologyCreateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'prefix': 'str', - 'sparql_endpoint': 'str' - } - - attribute_map = { - 'uri': 'uri', - 'prefix': 'prefix', - 'sparql_endpoint': 'sparql_endpoint' - } - - def __init__(self, uri=None, prefix=None, sparql_endpoint=None): # noqa: E501 - """OntologyCreateDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._prefix = None - self._sparql_endpoint = None - self.discriminator = None - self.uri = uri - self.prefix = prefix - if sparql_endpoint is not None: - self.sparql_endpoint = sparql_endpoint - - @property - def uri(self): - """Gets the uri of this OntologyCreateDto. # noqa: E501 - - - :return: The uri of this OntologyCreateDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this OntologyCreateDto. - - - :param uri: The uri of this OntologyCreateDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def prefix(self): - """Gets the prefix of this OntologyCreateDto. # noqa: E501 - - - :return: The prefix of this OntologyCreateDto. # noqa: E501 - :rtype: str - """ - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Sets the prefix of this OntologyCreateDto. - - - :param prefix: The prefix of this OntologyCreateDto. # noqa: E501 - :type: str - """ - if prefix is None: - raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 - - self._prefix = prefix - - @property - def sparql_endpoint(self): - """Gets the sparql_endpoint of this OntologyCreateDto. # noqa: E501 - - - :return: The sparql_endpoint of this OntologyCreateDto. # noqa: E501 - :rtype: str - """ - return self._sparql_endpoint - - @sparql_endpoint.setter - def sparql_endpoint(self, sparql_endpoint): - """Sets the sparql_endpoint of this OntologyCreateDto. - - - :param sparql_endpoint: The sparql_endpoint of this OntologyCreateDto. # noqa: E501 - :type: str - """ - - self._sparql_endpoint = sparql_endpoint - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OntologyCreateDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OntologyCreateDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/ontology_dto.py b/swagger/api/api_semantics/models/ontology_dto.py deleted file mode 100644 index a4abd18a15cb4a227904505df68ba063b36922fb..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/ontology_dto.py +++ /dev/null @@ -1,298 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OntologyDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'uri': 'str', - 'prefix': 'str', - 'sparql': 'bool', - 'rdf': 'bool', - 'creator': 'UserBriefDto', - 'created': 'datetime', - 'sparql_endpoint': 'str' - } - - attribute_map = { - 'id': 'id', - 'uri': 'uri', - 'prefix': 'prefix', - 'sparql': 'sparql', - 'rdf': 'rdf', - 'creator': 'creator', - 'created': 'created', - 'sparql_endpoint': 'sparql_endpoint' - } - - def __init__(self, id=None, uri=None, prefix=None, sparql=None, rdf=None, creator=None, created=None, sparql_endpoint=None): # noqa: E501 - """OntologyDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._uri = None - self._prefix = None - self._sparql = None - self._rdf = None - self._creator = None - self._created = None - self._sparql_endpoint = None - self.discriminator = None - self.id = id - self.uri = uri - self.prefix = prefix - self.sparql = sparql - self.rdf = rdf - if creator is not None: - self.creator = creator - self.created = created - if sparql_endpoint is not None: - self.sparql_endpoint = sparql_endpoint - - @property - def id(self): - """Gets the id of this OntologyDto. # noqa: E501 - - - :return: The id of this OntologyDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this OntologyDto. - - - :param id: The id of this OntologyDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def uri(self): - """Gets the uri of this OntologyDto. # noqa: E501 - - - :return: The uri of this OntologyDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this OntologyDto. - - - :param uri: The uri of this OntologyDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def prefix(self): - """Gets the prefix of this OntologyDto. # noqa: E501 - - - :return: The prefix of this OntologyDto. # noqa: E501 - :rtype: str - """ - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Sets the prefix of this OntologyDto. - - - :param prefix: The prefix of this OntologyDto. # noqa: E501 - :type: str - """ - if prefix is None: - raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 - - self._prefix = prefix - - @property - def sparql(self): - """Gets the sparql of this OntologyDto. # noqa: E501 - - - :return: The sparql of this OntologyDto. # noqa: E501 - :rtype: bool - """ - return self._sparql - - @sparql.setter - def sparql(self, sparql): - """Sets the sparql of this OntologyDto. - - - :param sparql: The sparql of this OntologyDto. # noqa: E501 - :type: bool - """ - if sparql is None: - raise ValueError("Invalid value for `sparql`, must not be `None`") # noqa: E501 - - self._sparql = sparql - - @property - def rdf(self): - """Gets the rdf of this OntologyDto. # noqa: E501 - - - :return: The rdf of this OntologyDto. # noqa: E501 - :rtype: bool - """ - return self._rdf - - @rdf.setter - def rdf(self, rdf): - """Sets the rdf of this OntologyDto. - - - :param rdf: The rdf of this OntologyDto. # noqa: E501 - :type: bool - """ - if rdf is None: - raise ValueError("Invalid value for `rdf`, must not be `None`") # noqa: E501 - - self._rdf = rdf - - @property - def creator(self): - """Gets the creator of this OntologyDto. # noqa: E501 - - - :return: The creator of this OntologyDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this OntologyDto. - - - :param creator: The creator of this OntologyDto. # noqa: E501 - :type: UserBriefDto - """ - - self._creator = creator - - @property - def created(self): - """Gets the created of this OntologyDto. # noqa: E501 - - - :return: The created of this OntologyDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this OntologyDto. - - - :param created: The created of this OntologyDto. # noqa: E501 - :type: datetime - """ - if created is None: - raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 - - self._created = created - - @property - def sparql_endpoint(self): - """Gets the sparql_endpoint of this OntologyDto. # noqa: E501 - - - :return: The sparql_endpoint of this OntologyDto. # noqa: E501 - :rtype: str - """ - return self._sparql_endpoint - - @sparql_endpoint.setter - def sparql_endpoint(self, sparql_endpoint): - """Sets the sparql_endpoint of this OntologyDto. - - - :param sparql_endpoint: The sparql_endpoint of this OntologyDto. # noqa: E501 - :type: str - """ - - self._sparql_endpoint = sparql_endpoint - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OntologyDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OntologyDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/ontology_modify_dto.py b/swagger/api/api_semantics/models/ontology_modify_dto.py deleted file mode 100644 index 69bdb87a5094f0fd80dfe0084f03b5bd75c68d7e..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/ontology_modify_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class OntologyModifyDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'prefix': 'str', - 'sparql_endpoint': 'str' - } - - attribute_map = { - 'uri': 'uri', - 'prefix': 'prefix', - 'sparql_endpoint': 'sparql_endpoint' - } - - def __init__(self, uri=None, prefix=None, sparql_endpoint=None): # noqa: E501 - """OntologyModifyDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._prefix = None - self._sparql_endpoint = None - self.discriminator = None - self.uri = uri - self.prefix = prefix - if sparql_endpoint is not None: - self.sparql_endpoint = sparql_endpoint - - @property - def uri(self): - """Gets the uri of this OntologyModifyDto. # noqa: E501 - - - :return: The uri of this OntologyModifyDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this OntologyModifyDto. - - - :param uri: The uri of this OntologyModifyDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def prefix(self): - """Gets the prefix of this OntologyModifyDto. # noqa: E501 - - - :return: The prefix of this OntologyModifyDto. # noqa: E501 - :rtype: str - """ - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Sets the prefix of this OntologyModifyDto. - - - :param prefix: The prefix of this OntologyModifyDto. # noqa: E501 - :type: str - """ - if prefix is None: - raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 - - self._prefix = prefix - - @property - def sparql_endpoint(self): - """Gets the sparql_endpoint of this OntologyModifyDto. # noqa: E501 - - - :return: The sparql_endpoint of this OntologyModifyDto. # noqa: E501 - :rtype: str - """ - return self._sparql_endpoint - - @sparql_endpoint.setter - def sparql_endpoint(self, sparql_endpoint): - """Sets the sparql_endpoint of this OntologyModifyDto. - - - :param sparql_endpoint: The sparql_endpoint of this OntologyModifyDto. # noqa: E501 - :type: str - """ - - self._sparql_endpoint = sparql_endpoint - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(OntologyModifyDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OntologyModifyDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/semantics_concept_body.py b/swagger/api/api_semantics/models/semantics_concept_body.py deleted file mode 100644 index 4959eb012fad402b71cfca8ee884b4965fce2c17..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/semantics_concept_body.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SemanticsConceptBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str' - } - - attribute_map = { - 'uri': 'uri' - } - - def __init__(self, uri=None): # noqa: E501 - """SemanticsConceptBody - a model defined in Swagger""" # noqa: E501 - self._uri = None - self.discriminator = None - self.uri = uri - - @property - def uri(self): - """Gets the uri of this SemanticsConceptBody. # noqa: E501 - - - :return: The uri of this SemanticsConceptBody. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this SemanticsConceptBody. - - - :param uri: The uri of this SemanticsConceptBody. # 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(SemanticsConceptBody, 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, SemanticsConceptBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/semantics_concept_body1.py b/swagger/api/api_semantics/models/semantics_concept_body1.py deleted file mode 100644 index c2fff5f5aa07d129720162c19e21a858393a6848..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/semantics_concept_body1.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SemanticsConceptBody1(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 - """SemanticsConceptBody1 - 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 SemanticsConceptBody1. # noqa: E501 - - - :return: The name of this SemanticsConceptBody1. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this SemanticsConceptBody1. - - - :param name: The name of this SemanticsConceptBody1. # 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 SemanticsConceptBody1. # noqa: E501 - - - :return: The uri of this SemanticsConceptBody1. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this SemanticsConceptBody1. - - - :param uri: The uri of this SemanticsConceptBody1. # 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(SemanticsConceptBody1, 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, SemanticsConceptBody1): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/semantics_unit_body.py b/swagger/api/api_semantics/models/semantics_unit_body.py deleted file mode 100644 index a8af73eedb4fca57dae188fd1a83786cefa27842..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/semantics_unit_body.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SemanticsUnitBody(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str' - } - - attribute_map = { - 'uri': 'uri' - } - - def __init__(self, uri=None): # noqa: E501 - """SemanticsUnitBody - a model defined in Swagger""" # noqa: E501 - self._uri = None - self.discriminator = None - self.uri = uri - - @property - def uri(self): - """Gets the uri of this SemanticsUnitBody. # noqa: E501 - - - :return: The uri of this SemanticsUnitBody. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this SemanticsUnitBody. - - - :param uri: The uri of this SemanticsUnitBody. # 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(SemanticsUnitBody, 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, SemanticsUnitBody): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/semantics_unit_body1.py b/swagger/api/api_semantics/models/semantics_unit_body1.py deleted file mode 100644 index 665a84e3b3a4db2131299dea323b9ae90e0355ee..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/semantics_unit_body1.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Unit / Ontology Service API - - Service for assigning concepts to database tables and columns. # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_semantics/models/table_column_entity_dto.py b/swagger/api/api_semantics/models/table_column_entity_dto.py deleted file mode 100644 index e063aa09f2c48370bf4ec45d1f120bda3f9eb61c..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/table_column_entity_dto.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableColumnEntityDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'database_id': 'int', - 'table_id': 'int', - 'column_id': 'int', - 'uri': 'str', - 'label': 'str', - 'description': 'str' - } - - attribute_map = { - 'database_id': 'databaseId', - 'table_id': 'tableId', - 'column_id': 'columnId', - 'uri': 'uri', - 'label': 'label', - 'description': 'description' - } - - def __init__(self, database_id=None, table_id=None, column_id=None, uri=None, label=None, description=None): # noqa: E501 - """TableColumnEntityDto - a model defined in Swagger""" # noqa: E501 - self._database_id = None - self._table_id = None - self._column_id = None - self._uri = None - self._label = None - self._description = None - self.discriminator = None - self.database_id = database_id - self.table_id = table_id - self.column_id = column_id - self.uri = uri - if label is not None: - self.label = label - if description is not None: - self.description = description - - @property - def database_id(self): - """Gets the database_id of this TableColumnEntityDto. # noqa: E501 - - - :return: The database_id of this TableColumnEntityDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this TableColumnEntityDto. - - - :param database_id: The database_id of this TableColumnEntityDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this TableColumnEntityDto. # noqa: E501 - - - :return: The table_id of this TableColumnEntityDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this TableColumnEntityDto. - - - :param table_id: The table_id of this TableColumnEntityDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def column_id(self): - """Gets the column_id of this TableColumnEntityDto. # noqa: E501 - - - :return: The column_id of this TableColumnEntityDto. # noqa: E501 - :rtype: int - """ - return self._column_id - - @column_id.setter - def column_id(self, column_id): - """Sets the column_id of this TableColumnEntityDto. - - - :param column_id: The column_id of this TableColumnEntityDto. # noqa: E501 - :type: int - """ - if column_id is None: - raise ValueError("Invalid value for `column_id`, must not be `None`") # noqa: E501 - - self._column_id = column_id - - @property - def uri(self): - """Gets the uri of this TableColumnEntityDto. # noqa: E501 - - - :return: The uri of this TableColumnEntityDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this TableColumnEntityDto. - - - :param uri: The uri of this TableColumnEntityDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def label(self): - """Gets the label of this TableColumnEntityDto. # noqa: E501 - - - :return: The label of this TableColumnEntityDto. # noqa: E501 - :rtype: str - """ - return self._label - - @label.setter - def label(self, label): - """Sets the label of this TableColumnEntityDto. - - - :param label: The label of this TableColumnEntityDto. # noqa: E501 - :type: str - """ - - self._label = label - - @property - def description(self): - """Gets the description of this TableColumnEntityDto. # noqa: E501 - - - :return: The description of this TableColumnEntityDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableColumnEntityDto. - - - :param description: The description of this TableColumnEntityDto. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(TableColumnEntityDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, TableColumnEntityDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/unit_dto.py b/swagger/api/api_semantics/models/unit_dto.py deleted file mode 100644 index 1d45a31b5423a191906f2afe0015184451c1a0b7..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/unit_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnitDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[ColumnBriefDto]' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description', - 'created': 'created', - 'columns': 'columns' - } - - def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 - """UnitDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self._created = None - self._columns = None - self.discriminator = None - self.uri = uri - if name is not None: - self.name = name - if description is not None: - self.description = description - self.created = created - self.columns = columns - - @property - def uri(self): - """Gets the uri of this UnitDto. # noqa: E501 - - - :return: The uri of this UnitDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this UnitDto. - - - :param uri: The uri of this UnitDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def name(self): - """Gets the name of this UnitDto. # noqa: E501 - - - :return: The name of this UnitDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UnitDto. - - - :param name: The name of this UnitDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this UnitDto. # noqa: E501 - - - :return: The description of this UnitDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this UnitDto. - - - :param description: The description of this UnitDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def created(self): - """Gets the created of this UnitDto. # noqa: E501 - - - :return: The created of this UnitDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this UnitDto. - - - :param created: The created of this UnitDto. # noqa: E501 - :type: datetime - """ - if created is None: - raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 - - self._created = created - - @property - def columns(self): - """Gets the columns of this UnitDto. # noqa: E501 - - - :return: The columns of this UnitDto. # noqa: E501 - :rtype: list[ColumnBriefDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this UnitDto. - - - :param columns: The columns of this UnitDto. # noqa: E501 - :type: list[ColumnBriefDto] - """ - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnitDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnitDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/unit_save_dto.py b/swagger/api/api_semantics/models/unit_save_dto.py deleted file mode 100644 index 1aa0a46505749ec040f911bc79e819c6fcd5dd26..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/unit_save_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnitSaveDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description' - } - - def __init__(self, uri=None, name=None, description=None): # noqa: E501 - """UnitSaveDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self.discriminator = None - self.uri = uri - self.name = name - self.description = description - - @property - def uri(self): - """Gets the uri of this UnitSaveDto. # noqa: E501 - - - :return: The uri of this UnitSaveDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this UnitSaveDto. - - - :param uri: The uri of this UnitSaveDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def name(self): - """Gets the name of this UnitSaveDto. # noqa: E501 - - - :return: The name of this UnitSaveDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UnitSaveDto. - - - :param name: The name of this UnitSaveDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this UnitSaveDto. # noqa: E501 - - - :return: The description of this UnitSaveDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this UnitSaveDto. - - - :param description: The description of this UnitSaveDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnitSaveDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnitSaveDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/models/user_brief_dto.py b/swagger/api/api_semantics/models/user_brief_dto.py deleted file mode 100644 index 41e66f31dbecdceffb64af1a47b590659228bca7..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/models/user_brief_dto.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBriefDto. - - - :param id: The id of this UserBriefDto. # noqa: E501 - :type: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this UserBriefDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBriefDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserBriefDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def name(self): - """Gets the name of this UserBriefDto. # noqa: E501 - - - :return: The name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBriefDto. - - - :param name: The name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def orcid(self): - """Gets the orcid of this UserBriefDto. # noqa: E501 - - - :return: The orcid of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserBriefDto. - - - :param orcid: The orcid of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def given_name(self): - """Gets the given_name of this UserBriefDto. # noqa: E501 - - - :return: The given_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserBriefDto. - - - :param given_name: The given_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserBriefDto. # noqa: E501 - - - :return: The family_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserBriefDto. - - - :param family_name: The family_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @property - def email_verified(self): - """Gets the email_verified of this UserBriefDto. # noqa: E501 - - - :return: The email_verified of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserBriefDto. - - - :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_semantics/rest.py b/swagger/api/api_semantics/rest.py deleted file mode 100644 index 0a8073cb98a32dbdf6ca3e28dd4d8ebef7508f3d..0000000000000000000000000000000000000000 --- a/swagger/api/api_semantics/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Semantic Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_table/__init__.py b/swagger/api/api_table/__init__.py deleted file mode 100644 index 838bcb87900329c9e10eff6c8b98de9754b45799..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_table.api.table_column_endpoint_api import TableColumnEndpointApi -from api_table.api.table_endpoint_api import TableEndpointApi -# import ApiClient -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 -from api_table.models.concept_dto import ConceptDto -from api_table.models.constraints_create_dto import ConstraintsCreateDto -from api_table.models.constraints_dto import ConstraintsDto -from api_table.models.foreign_key_create_dto import ForeignKeyCreateDto -from api_table.models.foreign_key_dto import ForeignKeyDto -from api_table.models.image_date_dto import ImageDateDto -from api_table.models.table_brief_dto import TableBriefDto -from api_table.models.table_create_dto import TableCreateDto -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 diff --git a/swagger/api/api_table/api/__init__.py b/swagger/api/api_table/api/__init__.py deleted file mode 100644 index cdc3536a786cb943456fb4970d8d7bac450136b3..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_table.api.table_column_endpoint_api import TableColumnEndpointApi -from api_table.api.table_endpoint_api import TableEndpointApi diff --git a/swagger/api/api_table/api/access_endpoint_api.py b/swagger/api/api_table/api/access_endpoint_api.py deleted file mode 100644 index d70b44db66ef235c9b4b366fd842a3afaff1e87e..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/api/access_endpoint_api.py +++ /dev/null @@ -1,142 +0,0 @@ -# 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 -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_table.api_client import ApiClient - - -class AccessEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def check_access(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Check access to some table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_access(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: DatabaseAccessDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.check_access_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.check_access_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def check_access_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Check access to some table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.check_access_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: DatabaseAccessDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method check_access" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `check_access`") # 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 `check_access`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `check_access`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['*/*']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/access', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='DatabaseAccessDto', # 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_table/api/table_column_endpoint_api.py b/swagger/api/api_table/api/table_column_endpoint_api.py deleted file mode 100644 index 1ca8644da6e1060533cd6d5cd3d5ba7019724c91..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/api/table_column_endpoint_api.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_table.api_client import ApiClient - - -class TableColumnEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def update(self, body, authorization, id, database_id, table_id, column_id, **kwargs): # noqa: E501 - """Update a table column semantic mapping # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, authorization, id, database_id, table_id, column_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ColumnSemanticsUpdateDto body: (required) - :param str authorization: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param int column_id: (required) - :return: ColumnDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, authorization, id, database_id, table_id, column_id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, authorization, id, database_id, table_id, column_id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, authorization, id, database_id, table_id, column_id, **kwargs): # noqa: E501 - """Update a table column semantic mapping # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, authorization, id, database_id, table_id, column_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ColumnSemanticsUpdateDto body: (required) - :param str authorization: (required) - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :param int column_id: (required) - :return: ColumnDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'authorization', 'id', 'database_id', 'table_id', 'column_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'authorization' is set - if ('authorization' not in params or - params['authorization'] is None): - raise ValueError("Missing the required parameter `authorization` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - 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 `update`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `update`") # noqa: E501 - # verify the required parameter 'column_id' is set - if ('column_id' not in params or - params['column_id'] is None): - raise ValueError("Missing the required parameter `column_id` when calling `update`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - if 'column_id' in params: - path_params['columnId'] = params['column_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'authorization' in params: - header_params['Authorization'] = params['authorization'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}/column/{columnId}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ColumnDto', # 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_table/api/table_endpoint_api.py b/swagger/api/api_table/api/table_endpoint_api.py deleted file mode 100644 index 751023af8ce3673a14e6c1a03f937b8fb190a3ee..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/api/table_endpoint_api.py +++ /dev/null @@ -1,465 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_table.api_client import ApiClient - - -class TableEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, body, id, database_id, **kwargs): # noqa: E501 - """Create a table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCreateDto body: (required) - :param int id: (required) - :param int database_id: (required) - :return: TableBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, id, database_id, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, id, database_id, **kwargs): # noqa: E501 - """Create a table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_with_http_info(body, id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TableCreateDto body: (required) - :param int id: (required) - :param int database_id: (required) - :return: TableBriefDto - 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 create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - # 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 `create`") # 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 `create`") # 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( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TableBriefDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Delete a table # 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, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: TableDto - 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, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Delete a table # 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, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: TableDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - # 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 `delete`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `delete`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TableDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_by_id(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Get information about table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_by_id(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: TableDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_by_id_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - else: - (data) = self.find_by_id_with_http_info(id, database_id, table_id, **kwargs) # noqa: E501 - return data - - def find_by_id_with_http_info(self, id, database_id, table_id, **kwargs): # noqa: E501 - """Get information about table # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_by_id_with_http_info(id, database_id, table_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :param int table_id: (required) - :return: TableDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id', 'database_id', 'table_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_by_id" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find_by_id`") # 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 `find_by_id`") # noqa: E501 - # verify the required parameter 'table_id' is set - if ('table_id' not in params or - params['table_id'] is None): - raise ValueError("Missing the required parameter `table_id` when calling `find_by_id`") # 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 - if 'table_id' in params: - path_params['tableId'] = params['table_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table/{tableId}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='TableDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list(self, id, database_id, **kwargs): # noqa: E501 - """List all tables # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: list[TableBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_with_http_info(id, database_id, **kwargs) # noqa: E501 - else: - (data) = self.list_with_http_info(id, database_id, **kwargs) # noqa: E501 - return data - - def list_with_http_info(self, id, database_id, **kwargs): # noqa: E501 - """List all tables # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_with_http_info(id, database_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :param int database_id: (required) - :return: list[TableBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['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 list" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `list`") # 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 `list`") # 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 - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/container/{id}/database/{databaseId}/table', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[TableBriefDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_table/api_client.py b/swagger/api/api_table/api_client.py deleted file mode 100644 index 7abcaae6200d1a3856ade7577fb9ab0197534d81..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_table.configuration import Configuration -import api_table.models -from api_table import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_table.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_table/configuration.py b/swagger/api/api_table/configuration.py deleted file mode 100644 index 02b1b26b59d4e2a5f8e021cc1be03256e0fece36..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_table") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_table/models/__init__.py b/swagger/api/api_table/models/__init__.py deleted file mode 100644 index 9e8d349e7fb14a3b86f012c115206483de174f8e..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import 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 -from api_table.models.concept_dto import ConceptDto -from api_table.models.constraints_create_dto import ConstraintsCreateDto -from api_table.models.constraints_dto import ConstraintsDto -from api_table.models.foreign_key_create_dto import ForeignKeyCreateDto -from api_table.models.foreign_key_dto import ForeignKeyDto -from api_table.models.image_date_dto import ImageDateDto -from api_table.models.table_brief_dto import TableBriefDto -from api_table.models.table_create_dto import TableCreateDto -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 diff --git a/swagger/api/api_table/models/api_error_dto.py b/swagger/api/api_table/models/api_error_dto.py deleted file mode 100644 index cbcdab811ef17e3d07aa06840ef661eceb0deefc..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_table/models/column_brief_dto.py b/swagger/api/api_table/models/column_brief_dto.py deleted file mode 100644 index 1913967d82d871f1370694c26c10fda810d42507..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/column_brief_dto.py +++ /dev/null @@ -1,252 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'database_id': 'int', - 'table_id': 'int', - 'internal_name': 'str', - 'column_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'database_id': 'database_id', - 'table_id': 'table_id', - 'internal_name': 'internal_name', - 'column_type': 'column_type' - } - - def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 - """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._database_id = None - self._table_id = None - self._internal_name = None - self._column_type = None - self.discriminator = None - self.id = id - self.name = name - self.database_id = database_id - self.table_id = table_id - self.internal_name = internal_name - self.column_type = column_type - - @property - def id(self): - """Gets the id of this ColumnBriefDto. # noqa: E501 - - - :return: The id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnBriefDto. - - - :param id: The id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this ColumnBriefDto. # noqa: E501 - - - :return: The name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnBriefDto. - - - :param name: The name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def database_id(self): - """Gets the database_id of this ColumnBriefDto. # noqa: E501 - - - :return: The database_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this ColumnBriefDto. - - - :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this ColumnBriefDto. # noqa: E501 - - - :return: The table_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this ColumnBriefDto. - - - :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def internal_name(self): - """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - - - :return: The internal_name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnBriefDto. - - - :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if internal_name is None: - raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - - self._internal_name = internal_name - - @property - def column_type(self): - """Gets the column_type of this ColumnBriefDto. # noqa: E501 - - - :return: The column_type of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnBriefDto. - - - :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if column_type is None: - raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ColumnBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ColumnBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_table/models/column_create_dto.py b/swagger/api/api_table/models/column_create_dto.py deleted file mode 100644 index 4818a4f8b4fb5a4093e9b6a560d3d44646bfc7f2..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/column_create_dto.py +++ /dev/null @@ -1,306 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnCreateDto(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', - 'type': 'str', - 'length': 'int', - 'dfid': 'int', - 'primary_key': 'bool', - 'index_length': 'int', - 'null_allowed': 'bool', - 'enum_values': 'list[str]' - } - - attribute_map = { - 'name': 'name', - 'type': 'type', - 'length': 'length', - 'dfid': 'dfid', - 'primary_key': 'primary_key', - 'index_length': 'index_length', - 'null_allowed': 'null_allowed', - 'enum_values': 'enum_values' - } - - def __init__(self, name=None, type=None, length=None, dfid=None, primary_key=None, index_length=None, null_allowed=None, enum_values=None): # noqa: E501 - """ColumnCreateDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._type = None - self._length = None - self._dfid = None - self._primary_key = None - self._index_length = None - self._null_allowed = None - self._enum_values = None - self.discriminator = None - self.name = name - self.type = type - if length is not None: - self.length = length - if dfid is not None: - self.dfid = dfid - self.primary_key = primary_key - if index_length is not None: - self.index_length = index_length - self.null_allowed = null_allowed - if enum_values is not None: - self.enum_values = enum_values - - @property - def name(self): - """Gets the name of this ColumnCreateDto. # noqa: E501 - - - :return: The name of this ColumnCreateDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnCreateDto. - - - :param name: The name of this ColumnCreateDto. # 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 type(self): - """Gets the type of this ColumnCreateDto. # noqa: E501 - - - :return: The type of this ColumnCreateDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this ColumnCreateDto. - - - :param type: The type of this ColumnCreateDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def length(self): - """Gets the length of this ColumnCreateDto. # noqa: E501 - - - :return: The length of this ColumnCreateDto. # noqa: E501 - :rtype: int - """ - return self._length - - @length.setter - def length(self, length): - """Sets the length of this ColumnCreateDto. - - - :param length: The length of this ColumnCreateDto. # noqa: E501 - :type: int - """ - - self._length = length - - @property - def dfid(self): - """Gets the dfid of this ColumnCreateDto. # noqa: E501 - - date format id # noqa: E501 - - :return: The dfid of this ColumnCreateDto. # noqa: E501 - :rtype: int - """ - return self._dfid - - @dfid.setter - def dfid(self, dfid): - """Sets the dfid of this ColumnCreateDto. - - date format id # noqa: E501 - - :param dfid: The dfid of this ColumnCreateDto. # noqa: E501 - :type: int - """ - - self._dfid = dfid - - @property - def primary_key(self): - """Gets the primary_key of this ColumnCreateDto. # noqa: E501 - - - :return: The primary_key of this ColumnCreateDto. # noqa: E501 - :rtype: bool - """ - return self._primary_key - - @primary_key.setter - def primary_key(self, primary_key): - """Sets the primary_key of this ColumnCreateDto. - - - :param primary_key: The primary_key of this ColumnCreateDto. # noqa: E501 - :type: bool - """ - if primary_key is None: - raise ValueError("Invalid value for `primary_key`, must not be `None`") # noqa: E501 - - self._primary_key = primary_key - - @property - def index_length(self): - """Gets the index_length of this ColumnCreateDto. # noqa: E501 - - - :return: The index_length of this ColumnCreateDto. # noqa: E501 - :rtype: int - """ - return self._index_length - - @index_length.setter - def index_length(self, index_length): - """Sets the index_length of this ColumnCreateDto. - - - :param index_length: The index_length of this ColumnCreateDto. # noqa: E501 - :type: int - """ - - self._index_length = index_length - - @property - def null_allowed(self): - """Gets the null_allowed of this ColumnCreateDto. # noqa: E501 - - - :return: The null_allowed of this ColumnCreateDto. # noqa: E501 - :rtype: bool - """ - return self._null_allowed - - @null_allowed.setter - def null_allowed(self, null_allowed): - """Sets the null_allowed of this ColumnCreateDto. - - - :param null_allowed: The null_allowed of this ColumnCreateDto. # noqa: E501 - :type: bool - """ - if null_allowed is None: - raise ValueError("Invalid value for `null_allowed`, must not be `None`") # noqa: E501 - - self._null_allowed = null_allowed - - @property - def enum_values(self): - """Gets the enum_values of this ColumnCreateDto. # noqa: E501 - - enum values, only considered when type = ENUM # noqa: E501 - - :return: The enum_values of this ColumnCreateDto. # noqa: E501 - :rtype: list[str] - """ - return self._enum_values - - @enum_values.setter - def enum_values(self, enum_values): - """Sets the enum_values of this ColumnCreateDto. - - enum values, only considered when type = ENUM # noqa: E501 - - :param enum_values: The enum_values of this ColumnCreateDto. # noqa: E501 - :type: list[str] - """ - - self._enum_values = enum_values - - 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(ColumnCreateDto, 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, ColumnCreateDto): - 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/models/column_dto.py b/swagger/api/api_table/models/column_dto.py deleted file mode 100644 index 4dbf06df669da714e60c9642462ba93bb72d8d28..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/column_dto.py +++ /dev/null @@ -1,462 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnDto(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', - 'length': 'int', - 'concept': 'ConceptDto', - 'unit': 'UnitDto', - 'internal_name': 'str', - 'date_format': 'ImageDateDto', - 'auto_generated': 'bool', - 'is_primary_key': 'bool', - 'index_length': 'int', - 'column_type': 'str', - 'is_public': 'bool', - 'is_null_allowed': 'bool', - 'enum_values': 'list[str]' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'length': 'length', - 'concept': 'concept', - 'unit': 'unit', - 'internal_name': 'internal_name', - 'date_format': 'date_format', - 'auto_generated': 'auto_generated', - 'is_primary_key': 'is_primary_key', - 'index_length': 'index_length', - 'column_type': 'column_type', - 'is_public': 'is_public', - 'is_null_allowed': 'is_null_allowed', - 'enum_values': 'enum_values' - } - - def __init__(self, id=None, name=None, length=None, concept=None, unit=None, internal_name=None, date_format=None, auto_generated=None, is_primary_key=None, index_length=None, column_type=None, is_public=None, is_null_allowed=None, enum_values=None): # noqa: E501 - """ColumnDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._length = None - self._concept = None - self._unit = None - self._internal_name = None - self._date_format = None - self._auto_generated = None - self._is_primary_key = None - self._index_length = None - self._column_type = None - self._is_public = None - self._is_null_allowed = None - self._enum_values = None - self.discriminator = None - self.id = id - self.name = name - if length is not None: - self.length = length - if concept is not None: - self.concept = concept - if unit is not None: - self.unit = unit - self.internal_name = internal_name - if date_format is not None: - self.date_format = date_format - self.auto_generated = auto_generated - self.is_primary_key = is_primary_key - if index_length is not None: - self.index_length = index_length - self.column_type = column_type - self.is_public = is_public - self.is_null_allowed = is_null_allowed - if enum_values is not None: - self.enum_values = enum_values - - @property - def id(self): - """Gets the id of this ColumnDto. # noqa: E501 - - - :return: The id of this ColumnDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnDto. - - - :param id: The id of this ColumnDto. # 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 ColumnDto. # noqa: E501 - - - :return: The name of this ColumnDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnDto. - - - :param name: The name of this ColumnDto. # 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 length(self): - """Gets the length of this ColumnDto. # noqa: E501 - - - :return: The length of this ColumnDto. # noqa: E501 - :rtype: int - """ - return self._length - - @length.setter - def length(self, length): - """Sets the length of this ColumnDto. - - - :param length: The length of this ColumnDto. # noqa: E501 - :type: int - """ - - self._length = length - - @property - def concept(self): - """Gets the concept of this ColumnDto. # noqa: E501 - - - :return: The concept of this ColumnDto. # noqa: E501 - :rtype: ConceptDto - """ - return self._concept - - @concept.setter - def concept(self, concept): - """Sets the concept of this ColumnDto. - - - :param concept: The concept of this ColumnDto. # noqa: E501 - :type: ConceptDto - """ - - self._concept = concept - - @property - def unit(self): - """Gets the unit of this ColumnDto. # noqa: E501 - - - :return: The unit of this ColumnDto. # noqa: E501 - :rtype: UnitDto - """ - return self._unit - - @unit.setter - def unit(self, unit): - """Sets the unit of this ColumnDto. - - - :param unit: The unit of this ColumnDto. # noqa: E501 - :type: UnitDto - """ - - self._unit = unit - - @property - def internal_name(self): - """Gets the internal_name of this ColumnDto. # noqa: E501 - - - :return: The internal_name of this ColumnDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnDto. - - - :param internal_name: The internal_name of this ColumnDto. # 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 date_format(self): - """Gets the date_format of this ColumnDto. # noqa: E501 - - - :return: The date_format of this ColumnDto. # noqa: E501 - :rtype: ImageDateDto - """ - return self._date_format - - @date_format.setter - def date_format(self, date_format): - """Sets the date_format of this ColumnDto. - - - :param date_format: The date_format of this ColumnDto. # noqa: E501 - :type: ImageDateDto - """ - - self._date_format = date_format - - @property - def auto_generated(self): - """Gets the auto_generated of this ColumnDto. # noqa: E501 - - - :return: The auto_generated of this ColumnDto. # noqa: E501 - :rtype: bool - """ - return self._auto_generated - - @auto_generated.setter - def auto_generated(self, auto_generated): - """Sets the auto_generated of this ColumnDto. - - - :param auto_generated: The auto_generated of this ColumnDto. # noqa: E501 - :type: bool - """ - if auto_generated is None: - raise ValueError("Invalid value for `auto_generated`, must not be `None`") # noqa: E501 - - self._auto_generated = auto_generated - - @property - def is_primary_key(self): - """Gets the is_primary_key of this ColumnDto. # noqa: E501 - - - :return: The is_primary_key of this ColumnDto. # noqa: E501 - :rtype: bool - """ - return self._is_primary_key - - @is_primary_key.setter - def is_primary_key(self, is_primary_key): - """Sets the is_primary_key of this ColumnDto. - - - :param is_primary_key: The is_primary_key of this ColumnDto. # noqa: E501 - :type: bool - """ - if is_primary_key is None: - raise ValueError("Invalid value for `is_primary_key`, must not be `None`") # noqa: E501 - - self._is_primary_key = is_primary_key - - @property - def index_length(self): - """Gets the index_length of this ColumnDto. # noqa: E501 - - - :return: The index_length of this ColumnDto. # noqa: E501 - :rtype: int - """ - return self._index_length - - @index_length.setter - def index_length(self, index_length): - """Sets the index_length of this ColumnDto. - - - :param index_length: The index_length of this ColumnDto. # noqa: E501 - :type: int - """ - - self._index_length = index_length - - @property - def column_type(self): - """Gets the column_type of this ColumnDto. # noqa: E501 - - - :return: The column_type of this ColumnDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnDto. - - - :param column_type: The column_type of this ColumnDto. # 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 - - @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 - - - :return: The is_null_allowed of this ColumnDto. # noqa: E501 - :rtype: bool - """ - return self._is_null_allowed - - @is_null_allowed.setter - def is_null_allowed(self, is_null_allowed): - """Sets the is_null_allowed of this ColumnDto. - - - :param is_null_allowed: The is_null_allowed of this ColumnDto. # noqa: E501 - :type: bool - """ - if is_null_allowed is None: - raise ValueError("Invalid value for `is_null_allowed`, must not be `None`") # noqa: E501 - - self._is_null_allowed = is_null_allowed - - @property - def enum_values(self): - """Gets the enum_values of this ColumnDto. # noqa: E501 - - - :return: The enum_values of this ColumnDto. # noqa: E501 - :rtype: list[str] - """ - return self._enum_values - - @enum_values.setter - def enum_values(self, enum_values): - """Sets the enum_values of this ColumnDto. - - - :param enum_values: The enum_values of this ColumnDto. # noqa: E501 - :type: list[str] - """ - - self._enum_values = enum_values - - 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(ColumnDto, 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, ColumnDto): - 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/models/column_semantics_update_dto.py b/swagger/api/api_table/models/column_semantics_update_dto.py deleted file mode 100644 index e51432d4f796e9d882a2a18e1ee532df9b3c04c3..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/column_semantics_update_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnSemanticsUpdateDto(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 = { - 'concept_uri': 'str', - 'unit_uri': 'str' - } - - attribute_map = { - 'concept_uri': 'concept_uri', - 'unit_uri': 'unit_uri' - } - - def __init__(self, concept_uri=None, unit_uri=None): # noqa: E501 - """ColumnSemanticsUpdateDto - a model defined in Swagger""" # noqa: E501 - self._concept_uri = None - self._unit_uri = None - self.discriminator = None - if concept_uri is not None: - self.concept_uri = concept_uri - if unit_uri is not None: - self.unit_uri = unit_uri - - @property - def concept_uri(self): - """Gets the concept_uri of this ColumnSemanticsUpdateDto. # noqa: E501 - - - :return: The concept_uri of this ColumnSemanticsUpdateDto. # noqa: E501 - :rtype: str - """ - return self._concept_uri - - @concept_uri.setter - def concept_uri(self, concept_uri): - """Sets the concept_uri of this ColumnSemanticsUpdateDto. - - - :param concept_uri: The concept_uri of this ColumnSemanticsUpdateDto. # noqa: E501 - :type: str - """ - - self._concept_uri = concept_uri - - @property - def unit_uri(self): - """Gets the unit_uri of this ColumnSemanticsUpdateDto. # noqa: E501 - - - :return: The unit_uri of this ColumnSemanticsUpdateDto. # noqa: E501 - :rtype: str - """ - return self._unit_uri - - @unit_uri.setter - def unit_uri(self, unit_uri): - """Sets the unit_uri of this ColumnSemanticsUpdateDto. - - - :param unit_uri: The unit_uri of this ColumnSemanticsUpdateDto. # noqa: E501 - :type: str - """ - - self._unit_uri = unit_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(ColumnSemanticsUpdateDto, 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, ColumnSemanticsUpdateDto): - 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/models/concept_dto.py b/swagger/api/api_table/models/concept_dto.py deleted file mode 100644 index 0231b37ade07ece3d2a039aba265cccc9aaafaca..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/concept_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ConceptDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[ColumnBriefDto]' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description', - 'created': 'created', - 'columns': 'columns' - } - - def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 - """ConceptDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self._created = None - self._columns = None - self.discriminator = None - self.uri = uri - if name is not None: - self.name = name - if description is not None: - self.description = description - self.created = created - self.columns = columns - - @property - def uri(self): - """Gets the uri of this ConceptDto. # noqa: E501 - - - :return: The uri of this ConceptDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this ConceptDto. - - - :param uri: The uri of this ConceptDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def name(self): - """Gets the name of this ConceptDto. # noqa: E501 - - - :return: The name of this ConceptDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ConceptDto. - - - :param name: The name of this ConceptDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this ConceptDto. # noqa: E501 - - - :return: The description of this ConceptDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this ConceptDto. - - - :param description: The description of this ConceptDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def created(self): - """Gets the created of this ConceptDto. # noqa: E501 - - - :return: The created of this ConceptDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this ConceptDto. - - - :param created: The created of this ConceptDto. # noqa: E501 - :type: datetime - """ - if created is None: - raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 - - self._created = created - - @property - def columns(self): - """Gets the columns of this ConceptDto. # noqa: E501 - - - :return: The columns of this ConceptDto. # noqa: E501 - :rtype: list[ColumnBriefDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this ConceptDto. - - - :param columns: The columns of this ConceptDto. # noqa: E501 - :type: list[ColumnBriefDto] - """ - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ConceptDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ConceptDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_table/models/constraints_create_dto.py b/swagger/api/api_table/models/constraints_create_dto.py deleted file mode 100644 index 7816c9f6d9173c935d85dcd3587f23cf381609b0..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/constraints_create_dto.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ConstraintsCreateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uniques': 'list[list[str]]', - 'checks': 'list[str]', - 'foreign_keys': 'list[ForeignKeyCreateDto]' - } - - attribute_map = { - 'uniques': 'uniques', - 'checks': 'checks', - 'foreign_keys': 'foreign_keys' - } - - def __init__(self, uniques=None, checks=None, foreign_keys=None): # noqa: E501 - """ConstraintsCreateDto - a model defined in Swagger""" # noqa: E501 - self._uniques = None - self._checks = None - self._foreign_keys = None - self.discriminator = None - if uniques is not None: - self.uniques = uniques - if checks is not None: - self.checks = checks - if foreign_keys is not None: - self.foreign_keys = foreign_keys - - @property - def uniques(self): - """Gets the uniques of this ConstraintsCreateDto. # noqa: E501 - - - :return: The uniques of this ConstraintsCreateDto. # noqa: E501 - :rtype: list[list[str]] - """ - return self._uniques - - @uniques.setter - def uniques(self, uniques): - """Sets the uniques of this ConstraintsCreateDto. - - - :param uniques: The uniques of this ConstraintsCreateDto. # noqa: E501 - :type: list[list[str]] - """ - - self._uniques = uniques - - @property - def checks(self): - """Gets the checks of this ConstraintsCreateDto. # noqa: E501 - - - :return: The checks of this ConstraintsCreateDto. # noqa: E501 - :rtype: list[str] - """ - return self._checks - - @checks.setter - def checks(self, checks): - """Sets the checks of this ConstraintsCreateDto. - - - :param checks: The checks of this ConstraintsCreateDto. # noqa: E501 - :type: list[str] - """ - - self._checks = checks - - @property - def foreign_keys(self): - """Gets the foreign_keys of this ConstraintsCreateDto. # noqa: E501 - - - :return: The foreign_keys of this ConstraintsCreateDto. # noqa: E501 - :rtype: list[ForeignKeyCreateDto] - """ - return self._foreign_keys - - @foreign_keys.setter - def foreign_keys(self, foreign_keys): - """Sets the foreign_keys of this ConstraintsCreateDto. - - - :param foreign_keys: The foreign_keys of this ConstraintsCreateDto. # noqa: E501 - :type: list[ForeignKeyCreateDto] - """ - - self._foreign_keys = foreign_keys - - 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(ConstraintsCreateDto, 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, ConstraintsCreateDto): - 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/models/constraints_dto.py b/swagger/api/api_table/models/constraints_dto.py deleted file mode 100644 index dcee98b1a1e9076c096ddd5616debc963b974674..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/constraints_dto.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ConstraintsDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uniques': 'list[list[ColumnDto]]', - 'checks': 'list[str]', - 'foreign_keys': 'list[ForeignKeyDto]' - } - - attribute_map = { - 'uniques': 'uniques', - 'checks': 'checks', - 'foreign_keys': 'foreign_keys' - } - - def __init__(self, uniques=None, checks=None, foreign_keys=None): # noqa: E501 - """ConstraintsDto - a model defined in Swagger""" # noqa: E501 - self._uniques = None - self._checks = None - self._foreign_keys = None - self.discriminator = None - if uniques is not None: - self.uniques = uniques - if checks is not None: - self.checks = checks - if foreign_keys is not None: - self.foreign_keys = foreign_keys - - @property - def uniques(self): - """Gets the uniques of this ConstraintsDto. # noqa: E501 - - - :return: The uniques of this ConstraintsDto. # noqa: E501 - :rtype: list[list[ColumnDto]] - """ - return self._uniques - - @uniques.setter - def uniques(self, uniques): - """Sets the uniques of this ConstraintsDto. - - - :param uniques: The uniques of this ConstraintsDto. # noqa: E501 - :type: list[list[ColumnDto]] - """ - - self._uniques = uniques - - @property - def checks(self): - """Gets the checks of this ConstraintsDto. # noqa: E501 - - - :return: The checks of this ConstraintsDto. # noqa: E501 - :rtype: list[str] - """ - return self._checks - - @checks.setter - def checks(self, checks): - """Sets the checks of this ConstraintsDto. - - - :param checks: The checks of this ConstraintsDto. # noqa: E501 - :type: list[str] - """ - - self._checks = checks - - @property - def foreign_keys(self): - """Gets the foreign_keys of this ConstraintsDto. # noqa: E501 - - - :return: The foreign_keys of this ConstraintsDto. # noqa: E501 - :rtype: list[ForeignKeyDto] - """ - return self._foreign_keys - - @foreign_keys.setter - def foreign_keys(self, foreign_keys): - """Sets the foreign_keys of this ConstraintsDto. - - - :param foreign_keys: The foreign_keys of this ConstraintsDto. # noqa: E501 - :type: list[ForeignKeyDto] - """ - - self._foreign_keys = foreign_keys - - 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(ConstraintsDto, 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, ConstraintsDto): - 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/models/container_dto.py b/swagger/api/api_table/models/container_dto.py deleted file mode 100644 index 83df476d6ec4afa707eee7900ccc4c038e160858..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/container_dto.py +++ /dev/null @@ -1,381 +0,0 @@ -# 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 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', - 'database': 'DatabaseDto', - 'image': 'ImageBriefDto', - 'port': 'int', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - '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, 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 - self._name = None - self._state = None - self._database = None - self._image = None - self._port = None - self._owner = 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 database is not None: - self.database = database - if image is not None: - 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: - 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 database(self): - """Gets the database of this ContainerDto. # noqa: E501 - - - :return: The database of this ContainerDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerDto. - - - :param database: The database of this ContainerDto. # noqa: E501 - :type: DatabaseDto - """ - - self._database = database - - @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 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 - - - :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_table/models/creator_dto.py b/swagger/api/api_table/models/creator_dto.py deleted file mode 100644 index 1e4eeae207032132abe794903eb7637f0573a9b8..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/creator_dto.py +++ /dev/null @@ -1,269 +0,0 @@ -# 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 CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid', - 'created': 'created', - 'last_modified': 'lastModified' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None, created=None, last_modified=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - if created is not None: - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def created(self): - """Gets the created of this CreatorDto. # noqa: E501 - - - :return: The created of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this CreatorDto. - - - :param created: The created of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def last_modified(self): - """Gets the last_modified of this CreatorDto. # noqa: E501 - - - :return: The last_modified of this CreatorDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this CreatorDto. - - - :param last_modified: The last_modified of this CreatorDto. # noqa: E501 - :type: datetime - """ - - self._last_modified = last_modified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - 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(CreatorDto, 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, CreatorDto): - 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/models/database_access_dto.py b/swagger/api/api_table/models/database_access_dto.py deleted file mode 100644 index cbd5673f8ce2a8e84f25f3b94e1b7c5f26a01db8..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/database_access_dto.py +++ /dev/null @@ -1,170 +0,0 @@ -# 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 DatabaseAccessDto(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 = { - 'user': 'UserDto', - 'type': 'str', - 'created': 'datetime' - } - - attribute_map = { - 'user': 'user', - 'type': 'type', - 'created': 'created' - } - - def __init__(self, user=None, type=None, created=None): # noqa: E501 - """DatabaseAccessDto - a model defined in Swagger""" # noqa: E501 - self._user = None - self._type = None - self._created = None - self.discriminator = None - self.user = user - self.type = type - if created is not None: - self.created = created - - @property - def user(self): - """Gets the user of this DatabaseAccessDto. # noqa: E501 - - - :return: The user of this DatabaseAccessDto. # noqa: E501 - :rtype: UserDto - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this DatabaseAccessDto. - - - :param user: The user of this DatabaseAccessDto. # noqa: E501 - :type: UserDto - """ - if user is None: - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def type(self): - """Gets the type of this DatabaseAccessDto. # noqa: E501 - - - :return: The type of this DatabaseAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseAccessDto. - - - :param type: The type of this DatabaseAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def created(self): - """Gets the created of this DatabaseAccessDto. # noqa: E501 - - - :return: The created of this DatabaseAccessDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseAccessDto. - - - :param created: The created of this DatabaseAccessDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - 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(DatabaseAccessDto, 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, DatabaseAccessDto): - 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/models/database_dto.py b/swagger/api/api_table/models/database_dto.py deleted file mode 100644 index c9a14f2dd617fd9474dfabc0b6847fb6cd2f2262..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/database_dto.py +++ /dev/null @@ -1,479 +0,0 @@ -# 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 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', - 'creator': 'UserBriefDto', - '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', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'creator': 'creator', - '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, 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 - self._creator = None - 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 - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - 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 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 - 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 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 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 - - - :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 accesses(self): - """Gets the accesses of this DatabaseDto. # noqa: E501 - - - :return: The accesses of this DatabaseDto. # noqa: E501 - :rtype: list[DatabaseAccessDto] - """ - return self._accesses - - @accesses.setter - def accesses(self, accesses): - """Sets the accesses of this DatabaseDto. - - - :param accesses: The accesses of this DatabaseDto. # noqa: E501 - :type: list[DatabaseAccessDto] - """ - - 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 - - - :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 exchange_name(self): - """Gets the exchange_name of this DatabaseDto. # noqa: E501 - - - :return: The exchange_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this DatabaseDto. - - - :param exchange_name: The exchange_name of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange_name is None: - raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 - - self._exchange_name = exchange_name - - @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_table/models/foreign_key_create_dto.py b/swagger/api/api_table/models/foreign_key_create_dto.py deleted file mode 100644 index 5528b7ad94333ae9b135f6240027df98b9012706..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/foreign_key_create_dto.py +++ /dev/null @@ -1,226 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ForeignKeyCreateDto(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 = { - 'columns': 'list[str]', - 'referenced_table': 'str', - 'referenced_columns': 'list[str]', - 'on_update': 'str', - 'on_delete': 'str' - } - - attribute_map = { - 'columns': 'columns', - 'referenced_table': 'referenced_table', - 'referenced_columns': 'referenced_columns', - 'on_update': 'on_update', - 'on_delete': 'on_delete' - } - - def __init__(self, columns=None, referenced_table=None, referenced_columns=None, on_update=None, on_delete=None): # noqa: E501 - """ForeignKeyCreateDto - a model defined in Swagger""" # noqa: E501 - self._columns = None - self._referenced_table = None - self._referenced_columns = None - self._on_update = None - self._on_delete = None - self.discriminator = None - if columns is not None: - self.columns = columns - if referenced_table is not None: - self.referenced_table = referenced_table - if referenced_columns is not None: - self.referenced_columns = referenced_columns - if on_update is not None: - self.on_update = on_update - if on_delete is not None: - self.on_delete = on_delete - - @property - def columns(self): - """Gets the columns of this ForeignKeyCreateDto. # noqa: E501 - - - :return: The columns of this ForeignKeyCreateDto. # noqa: E501 - :rtype: list[str] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this ForeignKeyCreateDto. - - - :param columns: The columns of this ForeignKeyCreateDto. # noqa: E501 - :type: list[str] - """ - - self._columns = columns - - @property - def referenced_table(self): - """Gets the referenced_table of this ForeignKeyCreateDto. # noqa: E501 - - - :return: The referenced_table of this ForeignKeyCreateDto. # noqa: E501 - :rtype: str - """ - return self._referenced_table - - @referenced_table.setter - def referenced_table(self, referenced_table): - """Sets the referenced_table of this ForeignKeyCreateDto. - - - :param referenced_table: The referenced_table of this ForeignKeyCreateDto. # noqa: E501 - :type: str - """ - - self._referenced_table = referenced_table - - @property - def referenced_columns(self): - """Gets the referenced_columns of this ForeignKeyCreateDto. # noqa: E501 - - - :return: The referenced_columns of this ForeignKeyCreateDto. # noqa: E501 - :rtype: list[str] - """ - return self._referenced_columns - - @referenced_columns.setter - def referenced_columns(self, referenced_columns): - """Sets the referenced_columns of this ForeignKeyCreateDto. - - - :param referenced_columns: The referenced_columns of this ForeignKeyCreateDto. # noqa: E501 - :type: list[str] - """ - - self._referenced_columns = referenced_columns - - @property - def on_update(self): - """Gets the on_update of this ForeignKeyCreateDto. # noqa: E501 - - - :return: The on_update of this ForeignKeyCreateDto. # noqa: E501 - :rtype: str - """ - return self._on_update - - @on_update.setter - def on_update(self, on_update): - """Sets the on_update of this ForeignKeyCreateDto. - - - :param on_update: The on_update of this ForeignKeyCreateDto. # noqa: E501 - :type: str - """ - allowed_values = ["restrict", "cascade", "set_null", "no_action", "set_default"] # noqa: E501 - if on_update not in allowed_values: - raise ValueError( - "Invalid value for `on_update` ({0}), must be one of {1}" # noqa: E501 - .format(on_update, allowed_values) - ) - - self._on_update = on_update - - @property - def on_delete(self): - """Gets the on_delete of this ForeignKeyCreateDto. # noqa: E501 - - - :return: The on_delete of this ForeignKeyCreateDto. # noqa: E501 - :rtype: str - """ - return self._on_delete - - @on_delete.setter - def on_delete(self, on_delete): - """Sets the on_delete of this ForeignKeyCreateDto. - - - :param on_delete: The on_delete of this ForeignKeyCreateDto. # noqa: E501 - :type: str - """ - allowed_values = ["restrict", "cascade", "set_null", "no_action", "set_default"] # noqa: E501 - if on_delete not in allowed_values: - raise ValueError( - "Invalid value for `on_delete` ({0}), must be one of {1}" # noqa: E501 - .format(on_delete, allowed_values) - ) - - self._on_delete = on_delete - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ForeignKeyCreateDto, 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, ForeignKeyCreateDto): - 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/models/foreign_key_dto.py b/swagger/api/api_table/models/foreign_key_dto.py deleted file mode 100644 index 7d82c5a446d22c932da20677e36cb2805c402277..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/foreign_key_dto.py +++ /dev/null @@ -1,226 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ForeignKeyDto(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 = { - 'columns': 'list[ColumnDto]', - 'referenced_table': 'TableBriefDto', - 'referenced_columns': 'list[ColumnDto]', - 'on_update': 'str', - 'on_delete': 'str' - } - - attribute_map = { - 'columns': 'columns', - 'referenced_table': 'referenced_table', - 'referenced_columns': 'referenced_columns', - 'on_update': 'on_update', - 'on_delete': 'on_delete' - } - - def __init__(self, columns=None, referenced_table=None, referenced_columns=None, on_update=None, on_delete=None): # noqa: E501 - """ForeignKeyDto - a model defined in Swagger""" # noqa: E501 - self._columns = None - self._referenced_table = None - self._referenced_columns = None - self._on_update = None - self._on_delete = None - self.discriminator = None - if columns is not None: - self.columns = columns - if referenced_table is not None: - self.referenced_table = referenced_table - if referenced_columns is not None: - self.referenced_columns = referenced_columns - if on_update is not None: - self.on_update = on_update - if on_delete is not None: - self.on_delete = on_delete - - @property - def columns(self): - """Gets the columns of this ForeignKeyDto. # noqa: E501 - - - :return: The columns of this ForeignKeyDto. # noqa: E501 - :rtype: list[ColumnDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this ForeignKeyDto. - - - :param columns: The columns of this ForeignKeyDto. # noqa: E501 - :type: list[ColumnDto] - """ - - self._columns = columns - - @property - def referenced_table(self): - """Gets the referenced_table of this ForeignKeyDto. # noqa: E501 - - - :return: The referenced_table of this ForeignKeyDto. # noqa: E501 - :rtype: TableBriefDto - """ - return self._referenced_table - - @referenced_table.setter - def referenced_table(self, referenced_table): - """Sets the referenced_table of this ForeignKeyDto. - - - :param referenced_table: The referenced_table of this ForeignKeyDto. # noqa: E501 - :type: TableBriefDto - """ - - self._referenced_table = referenced_table - - @property - def referenced_columns(self): - """Gets the referenced_columns of this ForeignKeyDto. # noqa: E501 - - - :return: The referenced_columns of this ForeignKeyDto. # noqa: E501 - :rtype: list[ColumnDto] - """ - return self._referenced_columns - - @referenced_columns.setter - def referenced_columns(self, referenced_columns): - """Sets the referenced_columns of this ForeignKeyDto. - - - :param referenced_columns: The referenced_columns of this ForeignKeyDto. # noqa: E501 - :type: list[ColumnDto] - """ - - self._referenced_columns = referenced_columns - - @property - def on_update(self): - """Gets the on_update of this ForeignKeyDto. # noqa: E501 - - - :return: The on_update of this ForeignKeyDto. # noqa: E501 - :rtype: str - """ - return self._on_update - - @on_update.setter - def on_update(self, on_update): - """Sets the on_update of this ForeignKeyDto. - - - :param on_update: The on_update of this ForeignKeyDto. # noqa: E501 - :type: str - """ - allowed_values = ["restrict", "cascade", "set_null", "no_action", "set_default"] # noqa: E501 - if on_update not in allowed_values: - raise ValueError( - "Invalid value for `on_update` ({0}), must be one of {1}" # noqa: E501 - .format(on_update, allowed_values) - ) - - self._on_update = on_update - - @property - def on_delete(self): - """Gets the on_delete of this ForeignKeyDto. # noqa: E501 - - - :return: The on_delete of this ForeignKeyDto. # noqa: E501 - :rtype: str - """ - return self._on_delete - - @on_delete.setter - def on_delete(self, on_delete): - """Sets the on_delete of this ForeignKeyDto. - - - :param on_delete: The on_delete of this ForeignKeyDto. # noqa: E501 - :type: str - """ - allowed_values = ["restrict", "cascade", "set_null", "no_action", "set_default"] # noqa: E501 - if on_delete not in allowed_values: - raise ValueError( - "Invalid value for `on_delete` ({0}), must be one of {1}" # noqa: E501 - .format(on_delete, allowed_values) - ) - - self._on_delete = on_delete - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ForeignKeyDto, 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, ForeignKeyDto): - 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/models/granted_authority_dto.py b/swagger/api/api_table/models/granted_authority_dto.py deleted file mode 100644 index c52fdbe55002c9d0c9662eecdb335c20dca41a10..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/granted_authority_dto.py +++ /dev/null @@ -1,110 +0,0 @@ -# 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 GrantedAuthorityDto(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 = { - 'authority': 'str' - } - - attribute_map = { - 'authority': 'authority' - } - - def __init__(self, authority=None): # noqa: E501 - """GrantedAuthorityDto - a model defined in Swagger""" # noqa: E501 - self._authority = None - self.discriminator = None - if authority is not None: - self.authority = authority - - @property - def authority(self): - """Gets the authority of this GrantedAuthorityDto. # noqa: E501 - - - :return: The authority of this GrantedAuthorityDto. # noqa: E501 - :rtype: str - """ - return self._authority - - @authority.setter - def authority(self, authority): - """Sets the authority of this GrantedAuthorityDto. - - - :param authority: The authority of this GrantedAuthorityDto. # noqa: E501 - :type: str - """ - - self._authority = authority - - 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(GrantedAuthorityDto, 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, GrantedAuthorityDto): - 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/models/identifier_dto.py b/swagger/api/api_table/models/identifier_dto.py deleted file mode 100644 index 2869cb2e91471a1a3db6db3b9f4735e9e4338b83..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# 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 IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "trusted", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - 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/models/image_brief_dto.py b/swagger/api/api_table/models/image_brief_dto.py deleted file mode 100644 index f2968cd2019a2d6891b2739ad5840b6b76298b4a..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/image_brief_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# 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 ImageBriefDto(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' - } - - attribute_map = { - 'id': 'id', - 'repository': 'repository', - 'tag': 'tag' - } - - 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 - self.discriminator = None - self.id = id - self.repository = repository - self.tag = tag - - @property - def id(self): - """Gets the id of this ImageBriefDto. # 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 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. - - - :param repository: The repository of this ImageBriefDto. # 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 ImageBriefDto. # noqa: E501 - - - :return: The tag of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. - - - :param tag: The tag of this ImageBriefDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ImageBriefDto, 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, ImageBriefDto): - 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/models/image_date_dto.py b/swagger/api/api_table/models/image_date_dto.py deleted file mode 100644 index e54f98f4f60005f2b46976e76bfa639aae94c39b..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_table/models/image_dto.py b/swagger/api/api_table/models/image_dto.py deleted file mode 100644 index be59e175d1cec5537f62842bb43f82dbd86aa70b..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/image_dto.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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 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', - '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', - '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, 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._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.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 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_table/models/image_env_item_dto.py b/swagger/api/api_table/models/image_env_item_dto.py deleted file mode 100644 index f590642a18218c87978e2537acf780b1081f5d37..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/image_env_item_dto.py +++ /dev/null @@ -1,198 +0,0 @@ -# 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 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_table/models/license_dto.py b/swagger/api/api_table/models/license_dto.py deleted file mode 100644 index 77cfc3e08b2ebd527a86175beb16566203e8425a..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# 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 LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - 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/models/related_identifier_dto.py b/swagger/api/api_table/models/related_identifier_dto.py deleted file mode 100644 index 27b0667a2acf48d1c314a52e6e8784b669a65bd2..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# 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 RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - 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/models/table_brief_dto.py b/swagger/api/api_table/models/table_brief_dto.py deleted file mode 100644 index 1bd6d77e04839e35d751fe547433b0c93affccb9..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/table_brief_dto.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableBriefDto(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', - 'description': 'str', - 'owner': 'UserBriefDto', - 'columns': 'list[ColumnBriefDto]', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'owner': 'owner', - 'columns': 'columns', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 - """TableBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._owner = None - self._columns = None - self._internal_name = None - self.discriminator = None - self.id = id - self.name = name - self.description = description - self.owner = owner - self.columns = columns - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 - - - :return: The id of this TableBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableBriefDto. - - - :param id: The id of this TableBriefDto. # 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 TableBriefDto. # noqa: E501 - - - :return: The name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableBriefDto. - - - :param name: The name of this TableBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableBriefDto. # noqa: E501 - - - :return: The description of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableBriefDto. - - - :param description: The description of this TableBriefDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def owner(self): - """Gets the owner of this TableBriefDto. # noqa: E501 - - - :return: The owner of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this TableBriefDto. - - - :param owner: The owner of this TableBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def 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 - - - :return: The internal_name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. - - - :param internal_name: The internal_name of this TableBriefDto. # 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 - - 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(TableBriefDto, 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, TableBriefDto): - 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/models/table_create_dto.py b/swagger/api/api_table/models/table_create_dto.py deleted file mode 100644 index b20eae865781efd779c91fd2141303f93472110c..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/table_create_dto.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableCreateDto(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', - 'description': 'str', - 'columns': 'list[ColumnCreateDto]', - 'constraints': 'ConstraintsCreateDto' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'columns': 'columns', - 'constraints': 'constraints' - } - - def __init__(self, name=None, description=None, columns=None, constraints=None): # noqa: E501 - """TableCreateDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._description = None - self._columns = None - self._constraints = None - self.discriminator = None - self.name = name - self.description = description - self.columns = columns - if constraints is not None: - self.constraints = constraints - - @property - def name(self): - """Gets the name of this TableCreateDto. # noqa: E501 - - - :return: The name of this TableCreateDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableCreateDto. - - - :param name: The name of this TableCreateDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableCreateDto. # noqa: E501 - - - :return: The description of this TableCreateDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableCreateDto. - - - :param description: The description of this TableCreateDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def columns(self): - """Gets the columns of this TableCreateDto. # noqa: E501 - - - :return: The columns of this TableCreateDto. # noqa: E501 - :rtype: list[ColumnCreateDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this TableCreateDto. - - - :param columns: The columns of this TableCreateDto. # noqa: E501 - :type: list[ColumnCreateDto] - """ - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - - self._columns = columns - - @property - def constraints(self): - """Gets the constraints of this TableCreateDto. # noqa: E501 - - - :return: The constraints of this TableCreateDto. # noqa: E501 - :rtype: ConstraintsCreateDto - """ - return self._constraints - - @constraints.setter - def constraints(self, constraints): - """Sets the constraints of this TableCreateDto. - - - :param constraints: The constraints of this TableCreateDto. # noqa: E501 - :type: ConstraintsCreateDto - """ - - self._constraints = constraints - - 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(TableCreateDto, 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, TableCreateDto): - 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/models/table_dto.py b/swagger/api/api_table/models/table_dto.py deleted file mode 100644 index ba08ec69411f236408bbbacdc20321bf15fe5c6b..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/table_dto.py +++ /dev/null @@ -1,406 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableDto(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', - 'creator': 'UserBriefDto', - 'owner': 'UserBriefDto', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[ColumnDto]', - 'constraints': 'ConstraintsDto', - 'internal_name': 'str', - 'queue_name': 'str', - 'routing_key': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'creator': 'creator', - 'owner': 'owner', - 'description': 'description', - 'created': 'created', - 'columns': 'columns', - 'constraints': 'constraints', - 'internal_name': 'internal_name', - 'queue_name': 'queue_name', - 'routing_key': 'routing_key', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, creator=None, owner=None, description=None, created=None, columns=None, constraints=None, internal_name=None, queue_name=None, routing_key=None, is_public=None): # noqa: E501 - """TableDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._creator = None - self._owner = None - self._description = None - self._created = None - self._columns = None - self._constraints = None - 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 - self.creator = creator - self.owner = owner - self.description = description - if created is not None: - self.created = created - self.columns = columns - if constraints is not None: - self.constraints = constraints - self.internal_name = internal_name - self.queue_name = queue_name - self.routing_key = routing_key - self.is_public = is_public - - @property - def id(self): - """Gets the id of this TableDto. # noqa: E501 - - - :return: The id of this TableDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableDto. - - - :param id: The id of this TableDto. # 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 TableDto. # noqa: E501 - - - :return: The name of this TableDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableDto. - - - :param name: The name of this TableDto. # 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 creator(self): - """Gets the creator of this TableDto. # noqa: E501 - - - :return: The creator of this TableDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._creator - - @creator.setter - def creator(self, creator): - """Sets the creator of this TableDto. - - - :param creator: The creator of this TableDto. # 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 owner(self): - """Gets the owner of this TableDto. # noqa: E501 - - - :return: The owner of this TableDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this TableDto. - - - :param owner: The owner of this TableDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def description(self): - """Gets the description of this TableDto. # noqa: E501 - - - :return: The description of this TableDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableDto. - - - :param description: The description of this TableDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def created(self): - """Gets the created of this TableDto. # noqa: E501 - - - :return: The created of this TableDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this TableDto. - - - :param created: The created of this TableDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def columns(self): - """Gets the columns of this TableDto. # noqa: E501 - - - :return: The columns of this TableDto. # noqa: E501 - :rtype: list[ColumnDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this TableDto. - - - :param columns: The columns of this TableDto. # noqa: E501 - :type: list[ColumnDto] - """ - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - - self._columns = columns - - @property - def constraints(self): - """Gets the constraints of this TableDto. # noqa: E501 - - - :return: The constraints of this TableDto. # noqa: E501 - :rtype: ConstraintsDto - """ - return self._constraints - - @constraints.setter - def constraints(self, constraints): - """Sets the constraints of this TableDto. - - - :param constraints: The constraints of this TableDto. # noqa: E501 - :type: ConstraintsDto - """ - - self._constraints = constraints - - @property - def internal_name(self): - """Gets the internal_name of this TableDto. # noqa: E501 - - - :return: The internal_name of this TableDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableDto. - - - :param internal_name: The internal_name of this TableDto. # 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 queue_name(self): - """Gets the queue_name of this TableDto. # noqa: E501 - - - :return: The queue_name of this TableDto. # noqa: E501 - :rtype: str - """ - return self._queue_name - - @queue_name.setter - def queue_name(self, queue_name): - """Sets the queue_name of this TableDto. - - - :param queue_name: The queue_name of this TableDto. # noqa: E501 - :type: str - """ - if queue_name is None: - raise ValueError("Invalid value for `queue_name`, must not be `None`") # noqa: E501 - - self._queue_name = queue_name - - @property - def routing_key(self): - """Gets the routing_key of this TableDto. # noqa: E501 - - - :return: The routing_key of this TableDto. # noqa: E501 - :rtype: str - """ - return self._routing_key - - @routing_key.setter - def routing_key(self, routing_key): - """Sets the routing_key of this TableDto. - - - :param routing_key: The routing_key of this TableDto. # noqa: E501 - :type: str - """ - if routing_key is None: - raise ValueError("Invalid value for `routing_key`, must not be `None`") # noqa: E501 - - 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 = {} - - 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(TableDto, 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, TableDto): - 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/models/unit_dto.py b/swagger/api/api_table/models/unit_dto.py deleted file mode 100644 index 64df3baac4001bd53e79ecd9b99427a6f5d2918f..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/unit_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnitDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'uri': 'str', - 'name': 'str', - 'description': 'str', - 'created': 'datetime', - 'columns': 'list[ColumnBriefDto]' - } - - attribute_map = { - 'uri': 'uri', - 'name': 'name', - 'description': 'description', - 'created': 'created', - 'columns': 'columns' - } - - def __init__(self, uri=None, name=None, description=None, created=None, columns=None): # noqa: E501 - """UnitDto - a model defined in Swagger""" # noqa: E501 - self._uri = None - self._name = None - self._description = None - self._created = None - self._columns = None - self.discriminator = None - self.uri = uri - if name is not None: - self.name = name - if description is not None: - self.description = description - self.created = created - self.columns = columns - - @property - def uri(self): - """Gets the uri of this UnitDto. # noqa: E501 - - - :return: The uri of this UnitDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this UnitDto. - - - :param uri: The uri of this UnitDto. # noqa: E501 - :type: str - """ - if uri is None: - raise ValueError("Invalid value for `uri`, must not be `None`") # noqa: E501 - - self._uri = uri - - @property - def name(self): - """Gets the name of this UnitDto. # noqa: E501 - - - :return: The name of this UnitDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UnitDto. - - - :param name: The name of this UnitDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this UnitDto. # noqa: E501 - - - :return: The description of this UnitDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this UnitDto. - - - :param description: The description of this UnitDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def created(self): - """Gets the created of this UnitDto. # noqa: E501 - - - :return: The created of this UnitDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this UnitDto. - - - :param created: The created of this UnitDto. # noqa: E501 - :type: datetime - """ - if created is None: - raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501 - - self._created = created - - @property - def columns(self): - """Gets the columns of this UnitDto. # noqa: E501 - - - :return: The columns of this UnitDto. # noqa: E501 - :rtype: list[ColumnBriefDto] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this UnitDto. - - - :param columns: The columns of this UnitDto. # noqa: E501 - :type: list[ColumnBriefDto] - """ - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - - self._columns = columns - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnitDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UnitDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_table/models/user_brief_dto.py b/swagger/api/api_table/models/user_brief_dto.py deleted file mode 100644 index c81aaecdaccc540aeb84d02f88d1c992c19d0e9c..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/user_brief_dto.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBriefDto. - - - :param id: The id of this UserBriefDto. # noqa: E501 - :type: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this UserBriefDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBriefDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserBriefDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def name(self): - """Gets the name of this UserBriefDto. # noqa: E501 - - - :return: The name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBriefDto. - - - :param name: The name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def orcid(self): - """Gets the orcid of this UserBriefDto. # noqa: E501 - - - :return: The orcid of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserBriefDto. - - - :param orcid: The orcid of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def given_name(self): - """Gets the given_name of this UserBriefDto. # noqa: E501 - - - :return: The given_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserBriefDto. - - - :param given_name: The given_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserBriefDto. # noqa: E501 - - - :return: The family_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserBriefDto. - - - :param family_name: The family_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @property - def email_verified(self): - """Gets the email_verified of this UserBriefDto. # noqa: E501 - - - :return: The email_verified of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserBriefDto. - - - :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_table/models/user_dto.py b/swagger/api/api_table/models/user_dto.py deleted file mode 100644 index 99f248e34706ed3e1682448728ed824003340a4b..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/user_dto.py +++ /dev/null @@ -1,510 +0,0 @@ -# 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 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', - 'roles': 'list[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', - 'roles': 'roles', - '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, roles=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._roles = 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 - self.roles = roles - 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 roles(self): - """Gets the roles of this UserDto. # noqa: E501 - - Roles of the user # noqa: E501 - - :return: The roles of this UserDto. # noqa: E501 - :rtype: list[str] - """ - return self._roles - - @roles.setter - def roles(self, roles): - """Sets the roles of this UserDto. - - Roles of the user # noqa: E501 - - :param roles: The roles of this UserDto. # noqa: E501 - :type: list[str] - """ - if roles is None: - raise ValueError("Invalid value for `roles`, must not be `None`") # noqa: E501 - - self._roles = roles - - @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_table/models/view_brief_dto.py b/swagger/api/api_table/models/view_brief_dto.py deleted file mode 100644 index 8b78e85761fef27f5ff56b50aa2bfdf951f37bad..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/models/view_brief_dto.py +++ /dev/null @@ -1,353 +0,0 @@ -# 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/api/api_table/rest.py b/swagger/api/api_table/rest.py deleted file mode 100644 index 6249e4476b9dd46754e31f377c673d994f8221f0..0000000000000000000000000000000000000000 --- a/swagger/api/api_table/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository Table Service API - - Service that manages the tables # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_units/__init__.py b/swagger/api/api_units/__init__.py deleted file mode 100644 index 4c957b741e1db37d91b16cf96b692225e94af901..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_units.api.default_api import DefaultApi -# import ApiClient -from api_units.api_client import ApiClient -from api_units.configuration import Configuration -# import models into sdk package -from api_units.models.units_savecolumnsconcept_body import UnitsSavecolumnsconceptBody -from api_units.models.units_saveconcept_body import UnitsSaveconceptBody -from api_units.models.units_suggest_body import UnitsSuggestBody diff --git a/swagger/api/api_units/api/__init__.py b/swagger/api/api_units/api/__init__.py deleted file mode 100644 index e0a0fa250b70cb3f7dea9bcc5941dea5a85d763f..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/api/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_units.api.default_api import DefaultApi diff --git a/swagger/api/api_units/api/default_api.py b/swagger/api/api_units/api/default_api.py deleted file mode 100644 index 9de20b4fd5c4600ed24a84f4255b683d99b77536..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/api/default_api.py +++ /dev/null @@ -1,500 +0,0 @@ -# coding: utf-8 - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_units.api_client import ApiClient - - -class DefaultApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def api_units_savecolumnsconcept_post(self, body, **kwargs): # noqa: E501 - """Save concepts to MDB # noqa: E501 - - This is a simple API for saving units and 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_units_savecolumnsconcept_post(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitsSavecolumnsconceptBody body: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_units_savecolumnsconcept_post_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.api_units_savecolumnsconcept_post_with_http_info(body, **kwargs) # noqa: E501 - return data - - def api_units_savecolumnsconcept_post_with_http_info(self, body, **kwargs): # noqa: E501 - """Save concepts to MDB # noqa: E501 - - This is a simple API for saving units and 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_units_savecolumnsconcept_post_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitsSavecolumnsconceptBody body: to-do description (required) - :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_units_savecolumnsconcept_post" % 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 `api_units_savecolumnsconcept_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `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/units/savecolumnsconcept', 'POST', - 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_units_saveconcept_post(self, body, **kwargs): # noqa: E501 - """Save concepts to MDB # noqa: E501 - - This is a simple API for saving units and 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_units_saveconcept_post(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitsSaveconceptBody body: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_units_saveconcept_post_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.api_units_saveconcept_post_with_http_info(body, **kwargs) # noqa: E501 - return data - - def api_units_saveconcept_post_with_http_info(self, body, **kwargs): # noqa: E501 - """Save concepts to MDB # noqa: E501 - - This is a simple API for saving units and 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_units_saveconcept_post_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitsSaveconceptBody body: to-do description (required) - :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_units_saveconcept_post" % 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 `api_units_saveconcept_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `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/units/saveconcept', 'POST', - 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_units_suggest_post(self, body, **kwargs): # noqa: E501 - """Autosuggest units # noqa: E501 - - This is a simple API which returns a list of suggested 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_units_suggest_post(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitsSuggestBody body: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_units_suggest_post_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.api_units_suggest_post_with_http_info(body, **kwargs) # noqa: E501 - return data - - def api_units_suggest_post_with_http_info(self, body, **kwargs): # noqa: E501 - """Autosuggest units # noqa: E501 - - This is a simple API which returns a list of suggested 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_units_suggest_post_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UnitsSuggestBody body: to-do description (required) - :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_units_suggest_post" % 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 `api_units_suggest_post`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `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/units/suggest', 'POST', - 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_units_uri_uname_get(self, uname, **kwargs): # noqa: E501 - """Get URI of units # noqa: E501 - - This is a simple API for getting the URI of a certain unit in OM. # 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_units_uri_uname_get(uname, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str uname: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_units_uri_uname_get_with_http_info(uname, **kwargs) # noqa: E501 - else: - (data) = self.api_units_uri_uname_get_with_http_info(uname, **kwargs) # noqa: E501 - return data - - def api_units_uri_uname_get_with_http_info(self, uname, **kwargs): # noqa: E501 - """Get URI of units # noqa: E501 - - This is a simple API for getting the URI of a certain unit in OM. # 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_units_uri_uname_get_with_http_info(uname, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str uname: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['uname'] # 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_units_uri_uname_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'uname' is set - if ('uname' not in params or - params['uname'] is None): - raise ValueError("Missing the required parameter `uname` when calling `api_units_uri_uname_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'uname' in params: - path_params['uname'] = params['uname'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/units/uri/{uname}', 'GET', - 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_units_validate_unit_get(self, unit, **kwargs): # noqa: E501 - """Validate units # noqa: E501 - - This is a simple API for validating 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_units_validate_unit_get(unit, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str unit: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.api_units_validate_unit_get_with_http_info(unit, **kwargs) # noqa: E501 - else: - (data) = self.api_units_validate_unit_get_with_http_info(unit, **kwargs) # noqa: E501 - return data - - def api_units_validate_unit_get_with_http_info(self, unit, **kwargs): # noqa: E501 - """Validate units # noqa: E501 - - This is a simple API for validating 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_units_validate_unit_get_with_http_info(unit, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str unit: to-do description (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['unit'] # 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_units_validate_unit_get" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'unit' is set - if ('unit' not in params or - params['unit'] is None): - raise ValueError("Missing the required parameter `unit` when calling `api_units_validate_unit_get`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'unit' in params: - path_params['unit'] = params['unit'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/units/validate/{unit}', 'GET', - 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_units/api_client.py b/swagger/api/api_units/api_client.py deleted file mode 100644 index 36201d73283cdae2ea1e5cfb656c63a6de6f74d8..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_units.configuration import Configuration -import api_units.models -from api_units import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_units.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_units/configuration.py b/swagger/api/api_units/configuration.py deleted file mode 100644 index d9746a635357a967d7864586c7e7f480262dba9b..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_units") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.0.1\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_units/models/__init__.py b/swagger/api/api_units/models/__init__.py deleted file mode 100644 index 08e7322d4595851ab810ec897cd98917b07fdeb2..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/models/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from api_units.models.units_savecolumnsconcept_body import UnitsSavecolumnsconceptBody -from api_units.models.units_saveconcept_body import UnitsSaveconceptBody -from api_units.models.units_suggest_body import UnitsSuggestBody diff --git a/swagger/api/api_units/models/units_savecolumnsconcept_body.py b/swagger/api/api_units/models/units_savecolumnsconcept_body.py deleted file mode 100644 index 1237b414feffa530b7b014493c40e6daf6ae40da..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/models/units_savecolumnsconcept_body.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnitsSavecolumnsconceptBody(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 = { - 'cdbid': 'int', - 'cid': 'int', - 'tid': 'int', - 'uri': 'str' - } - - attribute_map = { - 'cdbid': 'cdbid', - 'cid': 'cid', - 'tid': 'tid', - 'uri': 'uri' - } - - def __init__(self, cdbid=None, cid=None, tid=None, uri=None): # noqa: E501 - """UnitsSavecolumnsconceptBody - a model defined in Swagger""" # noqa: E501 - self._cdbid = None - self._cid = None - self._tid = None - self._uri = None - self.discriminator = None - if cdbid is not None: - self.cdbid = cdbid - if cid is not None: - self.cid = cid - if tid is not None: - self.tid = tid - if uri is not None: - self.uri = uri - - @property - def cdbid(self): - """Gets the cdbid of this UnitsSavecolumnsconceptBody. # noqa: E501 - - - :return: The cdbid of this UnitsSavecolumnsconceptBody. # noqa: E501 - :rtype: int - """ - return self._cdbid - - @cdbid.setter - def cdbid(self, cdbid): - """Sets the cdbid of this UnitsSavecolumnsconceptBody. - - - :param cdbid: The cdbid of this UnitsSavecolumnsconceptBody. # noqa: E501 - :type: int - """ - - self._cdbid = cdbid - - @property - def cid(self): - """Gets the cid of this UnitsSavecolumnsconceptBody. # noqa: E501 - - - :return: The cid of this UnitsSavecolumnsconceptBody. # noqa: E501 - :rtype: int - """ - return self._cid - - @cid.setter - def cid(self, cid): - """Sets the cid of this UnitsSavecolumnsconceptBody. - - - :param cid: The cid of this UnitsSavecolumnsconceptBody. # noqa: E501 - :type: int - """ - - self._cid = cid - - @property - def tid(self): - """Gets the tid of this UnitsSavecolumnsconceptBody. # noqa: E501 - - - :return: The tid of this UnitsSavecolumnsconceptBody. # noqa: E501 - :rtype: int - """ - return self._tid - - @tid.setter - def tid(self, tid): - """Sets the tid of this UnitsSavecolumnsconceptBody. - - - :param tid: The tid of this UnitsSavecolumnsconceptBody. # noqa: E501 - :type: int - """ - - self._tid = tid - - @property - def uri(self): - """Gets the uri of this UnitsSavecolumnsconceptBody. # noqa: E501 - - - :return: The uri of this UnitsSavecolumnsconceptBody. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this UnitsSavecolumnsconceptBody. - - - :param uri: The uri of this UnitsSavecolumnsconceptBody. # noqa: E501 - :type: str - """ - - self._uri = uri - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnitsSavecolumnsconceptBody, 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, UnitsSavecolumnsconceptBody): - 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_units/models/units_saveconcept_body.py b/swagger/api/api_units/models/units_saveconcept_body.py deleted file mode 100644 index 16fcdacc063f5f608a6e65034ada792420a0961e..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/models/units_saveconcept_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnitsSaveconceptBody(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 - """UnitsSaveconceptBody - a model defined in Swagger""" # noqa: E501 - self._name = None - self._uri = None - self.discriminator = None - if name is not None: - self.name = name - if uri is not None: - self.uri = uri - - @property - def name(self): - """Gets the name of this UnitsSaveconceptBody. # noqa: E501 - - - :return: The name of this UnitsSaveconceptBody. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UnitsSaveconceptBody. - - - :param name: The name of this UnitsSaveconceptBody. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def uri(self): - """Gets the uri of this UnitsSaveconceptBody. # noqa: E501 - - - :return: The uri of this UnitsSaveconceptBody. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this UnitsSaveconceptBody. - - - :param uri: The uri of this UnitsSaveconceptBody. # noqa: E501 - :type: str - """ - - self._uri = uri - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UnitsSaveconceptBody, 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, UnitsSaveconceptBody): - 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_units/models/units_suggest_body.py b/swagger/api/api_units/models/units_suggest_body.py deleted file mode 100644 index 7aaa2366f8bed8b81c00f6db2871d11670c663a5..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/models/units_suggest_body.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UnitsSuggestBody(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 = { - 'offset': 'int', - 'ustring': 'str' - } - - attribute_map = { - 'offset': 'offset', - 'ustring': 'ustring' - } - - def __init__(self, offset=None, ustring=None): # noqa: E501 - """UnitsSuggestBody - a model defined in Swagger""" # noqa: E501 - self._offset = None - self._ustring = None - self.discriminator = None - if offset is not None: - self.offset = offset - if ustring is not None: - self.ustring = ustring - - @property - def offset(self): - """Gets the offset of this UnitsSuggestBody. # noqa: E501 - - - :return: The offset of this UnitsSuggestBody. # noqa: E501 - :rtype: int - """ - return self._offset - - @offset.setter - def offset(self, offset): - """Sets the offset of this UnitsSuggestBody. - - - :param offset: The offset of this UnitsSuggestBody. # noqa: E501 - :type: int - """ - - self._offset = offset - - @property - def ustring(self): - """Gets the ustring of this UnitsSuggestBody. # noqa: E501 - - - :return: The ustring of this UnitsSuggestBody. # noqa: E501 - :rtype: str - """ - return self._ustring - - @ustring.setter - def ustring(self, ustring): - """Sets the ustring of this UnitsSuggestBody. - - - :param ustring: The ustring of this UnitsSuggestBody. # noqa: E501 - :type: str - """ - - self._ustring = ustring - - 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(UnitsSuggestBody, 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, UnitsSuggestBody): - 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_units/rest.py b/swagger/api/api_units/rest.py deleted file mode 100644 index a4b96071cbd53eb501a9fc5eac1909569705d449..0000000000000000000000000000000000000000 --- a/swagger/api/api_units/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - units - - powered by Flasgger # noqa: E501 - - OpenAPI spec version: 0.0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message diff --git a/swagger/api/api_user/__init__.py b/swagger/api/api_user/__init__.py deleted file mode 100644 index 78cbb9a1d493bdcccec72f4c42ff4fa8102b9b79..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/__init__.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import apis into sdk package -from api_user.api.maintenance_endpoint_api import MaintenanceEndpointApi -from api_user.api.user_endpoint_api import UserEndpointApi -# import ApiClient -from api_user.api_client import ApiClient -from api_user.configuration import Configuration -# import models into sdk package -from api_user.models.api_error_dto import ApiErrorDto -from api_user.models.banner_message_brief_dto import BannerMessageBriefDto -from api_user.models.banner_message_create_dto import BannerMessageCreateDto -from api_user.models.banner_message_dto import BannerMessageDto -from api_user.models.banner_message_not_found_exception import BannerMessageNotFoundException -from api_user.models.banner_message_not_found_exception_cause import BannerMessageNotFoundExceptionCause -from api_user.models.banner_message_not_found_exception_cause_stack_trace import BannerMessageNotFoundExceptionCauseStackTrace -from api_user.models.banner_message_not_found_exception_cause_suppressed import BannerMessageNotFoundExceptionCauseSuppressed -from api_user.models.banner_message_update_dto import BannerMessageUpdateDto -from api_user.models.column_brief_dto import ColumnBriefDto -from api_user.models.container_dto import ContainerDto -from api_user.models.creator_dto import CreatorDto -from api_user.models.database_access_dto import DatabaseAccessDto -from api_user.models.database_dto import DatabaseDto -from api_user.models.identifier_dto import IdentifierDto -from api_user.models.image_brief_dto import ImageBriefDto -from api_user.models.image_date_dto import ImageDateDto -from api_user.models.image_dto import ImageDto -from api_user.models.license_dto import LicenseDto -from api_user.models.related_identifier_dto import RelatedIdentifierDto -from api_user.models.signup_request_dto import SignupRequestDto -from api_user.models.table_brief_dto import TableBriefDto -from api_user.models.user_attribute_dto import UserAttributeDto -from api_user.models.user_brief_dto import UserBriefDto -from api_user.models.user_dto import UserDto -from api_user.models.user_password_dto import UserPasswordDto -from api_user.models.user_theme_set_dto import UserThemeSetDto -from api_user.models.user_update_dto import UserUpdateDto -from api_user.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_user/api/__init__.py b/swagger/api/api_user/api/__init__.py deleted file mode 100644 index a5f47db2a514b2b43675450d3b96d99f212ed5ee..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/api/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import absolute_import - -# flake8: noqa - -# import apis into api package -from api_user.api.maintenance_endpoint_api import MaintenanceEndpointApi -from api_user.api.user_endpoint_api import UserEndpointApi diff --git a/swagger/api/api_user/api/maintenance_endpoint_api.py b/swagger/api/api_user/api/maintenance_endpoint_api.py deleted file mode 100644 index a2541950bdade740a2de2e700e222e79cc4c7ac8..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/api/maintenance_endpoint_api.py +++ /dev/null @@ -1,591 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_user.api_client import ApiClient - - -class MaintenanceEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def active(self, **kwargs): # noqa: E501 - """Find active maintenance messages # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.active(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[BannerMessageBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.active_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.active_with_http_info(**kwargs) # noqa: E501 - return data - - def active_with_http_info(self, **kwargs): # noqa: E501 - """Find active maintenance messages # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.active_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[BannerMessageBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method active" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/maintenance/message/active', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BannerMessageBriefDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def create1(self, body, **kwargs): # noqa: E501 - """Create maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create1(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param BannerMessageCreateDto body: (required) - :return: BannerMessageBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create1_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create1_with_http_info(body, **kwargs) # noqa: E501 - return data - - def create1_with_http_info(self, body, **kwargs): # noqa: E501 - """Create maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create1_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param BannerMessageCreateDto body: (required) - :return: BannerMessageBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/maintenance/message', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='BannerMessageBriefDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def delete(self, id, **kwargs): # noqa: E501 - """Delete maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.delete_with_http_info(id, **kwargs) # noqa: E501 - return data - - def delete_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method delete" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `delete`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/maintenance/message/{id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find1(self, id, **kwargs): # noqa: E501 - """Find one maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find1(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: BannerMessageDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find1_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find1_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find1_with_http_info(self, id, **kwargs): # noqa: E501 - """Find one maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find1_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int id: (required) - :return: BannerMessageDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find1" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find1`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/maintenance/message/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='BannerMessageDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def list(self, **kwargs): # noqa: E501 - """Find maintenance messages # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[BannerMessageDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.list_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.list_with_http_info(**kwargs) # noqa: E501 - return data - - def list_with_http_info(self, **kwargs): # noqa: E501 - """Find maintenance messages # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[BannerMessageDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method list" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/maintenance/message', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[BannerMessageDto]', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def update(self, body, id, **kwargs): # noqa: E501 - """Update maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param BannerMessageUpdateDto body: (required) - :param int id: (required) - :return: BannerMessageBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.update_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.update_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def update_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Update maintenance message # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param BannerMessageUpdateDto body: (required) - :param int id: (required) - :return: BannerMessageBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method update" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `update`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `update`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/maintenance/message/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='BannerMessageBriefDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_user/api/user_endpoint_api.py b/swagger/api/api_user/api/user_endpoint_api.py deleted file mode 100644 index 00c0293e8b1a76f08a9c732c34be972e511b7a3b..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/api/user_endpoint_api.py +++ /dev/null @@ -1,623 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import re # noqa: F401 - -# python 2 and python 3 compatibility library -import six - -from api_user.api_client import ApiClient - - -class UserEndpointApi(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - Ref: https://github.com/swagger-api/swagger-codegen - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - def create(self, body, **kwargs): # noqa: E501 - """Create user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SignupRequestDto body: (required) - :return: UserBriefDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.create_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.create_with_http_info(body, **kwargs) # noqa: E501 - return data - - def create_with_http_info(self, body, **kwargs): # noqa: E501 - """Create user # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param SignupRequestDto body: (required) - :return: UserBriefDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method create" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `create`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserBriefDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find(self, id, **kwargs): # noqa: E501 - """Get a user info # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_with_http_info(id, **kwargs) # noqa: E501 - else: - (data) = self.find_with_http_info(id, **kwargs) # noqa: E501 - return data - - def find_with_http_info(self, id, **kwargs): # noqa: E501 - """Get a user info # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_with_http_info(id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find" % key - ) - params[key] = val - del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `find`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/{id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) - - def find_all(self, **kwargs): # noqa: E501 - """Find all users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[UserBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.find_all_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.find_all_with_http_info(**kwargs) # noqa: E501 - return data - - def find_all_with_http_info(self, **kwargs): # noqa: E501 - """Find all users # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.find_all_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: list[UserBriefDto] - If the method is called asynchronously, - returns the request thread. - """ - - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method find_all" % key - ) - params[key] = val - del params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - return self.api_client.call_api( - '/api/user', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='list[UserBriefDto]', # 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 modify(self, body, id, **kwargs): # noqa: E501 - """Modify user information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserUpdateDto body: (required) - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.modify_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.modify_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def modify_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Modify user information # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.modify_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserUpdateDto body: (required) - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method modify" % 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 `modify`") # 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 `modify`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/{id}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # 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 password(self, body, id, **kwargs): # noqa: E501 - """Modify user password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.password(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserPasswordDto body: (required) - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.password_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.password_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def password_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Modify user password # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.password_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserPasswordDto body: (required) - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method password" % 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 `password`") # 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 `password`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/{id}/password', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # 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 theme(self, body, id, **kwargs): # noqa: E501 - """Modify user theme # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.theme(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserThemeSetDto body: (required) - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.theme_with_http_info(body, id, **kwargs) # noqa: E501 - else: - (data) = self.theme_with_http_info(body, id, **kwargs) # noqa: E501 - return data - - def theme_with_http_info(self, body, id, **kwargs): # noqa: E501 - """Modify user theme # noqa: E501 - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.theme_with_http_info(body, id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param UserThemeSetDto body: (required) - :param str id: (required) - :return: UserDto - If the method is called asynchronously, - returns the request thread. - """ - - all_params = ['body', 'id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - - params = locals() - for key, val in six.iteritems(params['kwargs']): - if key not in all_params: - raise TypeError( - "Got an unexpected keyword argument '%s'" - " to method theme" % 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 `theme`") # 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 `theme`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - - query_params = [] - - header_params = {} - - form_params = [] - local_var_files = {} - - body_params = None - if 'body' in params: - body_params = params['body'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 - - return self.api_client.call_api( - '/api/user/{id}/theme', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='UserDto', # noqa: E501 - auth_settings=auth_settings, - async_req=params.get('async_req'), - _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', True), - _request_timeout=params.get('_request_timeout'), - collection_formats=collection_formats) diff --git a/swagger/api/api_user/api_client.py b/swagger/api/api_user/api_client.py deleted file mode 100644 index 99717f703848a28f54d1331ca33c76996ae7550b..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/api_client.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -from __future__ import absolute_import - -import datetime -import json -import mimetypes -from multiprocessing.pool import ThreadPool -import os -import re -import tempfile - -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import quote - -from api_user.configuration import Configuration -import api_user.models -from api_user import rest - - -class ApiClient(object): - """Generic API client for Swagger client library builds. - - Swagger generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the Swagger - templates. - - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int if six.PY3 else long, # noqa: F821 - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - - self.pool = ThreadPool() - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.0.0/python' - - def __del__(self): - self.pool.close() - self.pool.join() - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - url = self.configuration.host + resource_path - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is swagger model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in six.iteritems(obj.swagger_types) - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in six.iteritems(obj_dict)} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in six.iteritems(data)} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(api_user.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None): - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Builds form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in six.iteritems(files): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - response_data = response.data - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - else: - f.write(response_data) - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return six.text_type(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return a original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'): - return data - - kwargs = {} - if klass.swagger_types is not None: - for attr, attr_type in six.iteritems(klass.swagger_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if (isinstance(instance, dict) and - klass.swagger_types is not None and - isinstance(data, dict)): - for key, value in data.items(): - if key not in klass.swagger_types: - instance[key] = value - if self.__hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance diff --git a/swagger/api/api_user/configuration.py b/swagger/api/api_user/configuration.py deleted file mode 100644 index c87979328d4af2a7983322444a21a7fc3b88aacb..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/configuration.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -import six -from six.moves import http_client as httplib - - -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): - """NOTE: This class is auto generated by the swagger code generator program. - - Ref: https://github.com/swagger-api/swagger-codegen - Do not edit the class manually. - """ - - def __init__(self): - """Constructor""" - # Default Base url - self.host = "http://localhost:9095" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # function to refresh API key if expired - self.refresh_api_key_hook = None - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - # Logging Settings - self.logger = {} - self.logger["package_logger"] = logging.getLogger("api_user") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - - # Proxy URL - self.proxy = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_file_handler) - if self.logger_stream_handler: - logger.removeHandler(self.logger_stream_handler) - else: - # If not set logging file, - # then add stream handler and remove file handler. - self.logger_stream_handler = logging.StreamHandler() - self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in six.iteritems(self.logger): - logger.addHandler(self.logger_stream_handler) - if self.logger_file_handler: - logger.removeHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in six.iteritems(self.logger): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook: - self.refresh_api_key_hook(self) - - key = self.api_key.get(identifier) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - } - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api/api_user/models/__init__.py b/swagger/api/api_user/models/__init__.py deleted file mode 100644 index 983301c900577632dcf7561caa9e5b16e3c11c60..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from api_user.models.api_error_dto import ApiErrorDto -from api_user.models.banner_message_brief_dto import BannerMessageBriefDto -from api_user.models.banner_message_create_dto import BannerMessageCreateDto -from api_user.models.banner_message_dto import BannerMessageDto -from api_user.models.banner_message_not_found_exception import BannerMessageNotFoundException -from api_user.models.banner_message_not_found_exception_cause import BannerMessageNotFoundExceptionCause -from api_user.models.banner_message_not_found_exception_cause_stack_trace import BannerMessageNotFoundExceptionCauseStackTrace -from api_user.models.banner_message_not_found_exception_cause_suppressed import BannerMessageNotFoundExceptionCauseSuppressed -from api_user.models.banner_message_update_dto import BannerMessageUpdateDto -from api_user.models.column_brief_dto import ColumnBriefDto -from api_user.models.container_dto import ContainerDto -from api_user.models.creator_dto import CreatorDto -from api_user.models.database_access_dto import DatabaseAccessDto -from api_user.models.database_dto import DatabaseDto -from api_user.models.identifier_dto import IdentifierDto -from api_user.models.image_brief_dto import ImageBriefDto -from api_user.models.image_date_dto import ImageDateDto -from api_user.models.image_dto import ImageDto -from api_user.models.license_dto import LicenseDto -from api_user.models.related_identifier_dto import RelatedIdentifierDto -from api_user.models.signup_request_dto import SignupRequestDto -from api_user.models.table_brief_dto import TableBriefDto -from api_user.models.user_attribute_dto import UserAttributeDto -from api_user.models.user_brief_dto import UserBriefDto -from api_user.models.user_dto import UserDto -from api_user.models.user_password_dto import UserPasswordDto -from api_user.models.user_theme_set_dto import UserThemeSetDto -from api_user.models.user_update_dto import UserUpdateDto -from api_user.models.view_brief_dto import ViewBriefDto diff --git a/swagger/api/api_user/models/api_error_dto.py b/swagger/api/api_user/models/api_error_dto.py deleted file mode 100644 index af0ee1858bf45c77756d6cfd383eb8e1f5ec5221..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/api_error_dto.py +++ /dev/null @@ -1,171 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ApiErrorDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'status': 'str', - 'message': 'str', - 'code': 'str' - } - - attribute_map = { - 'status': 'status', - 'message': 'message', - 'code': 'code' - } - - def __init__(self, status=None, message=None, code=None): # noqa: E501 - """ApiErrorDto - a model defined in Swagger""" # noqa: E501 - self._status = None - self._message = None - self._code = None - self.discriminator = None - self.status = status - self.message = message - self.code = code - - @property - def status(self): - """Gets the status of this ApiErrorDto. # noqa: E501 - - - :return: The status of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this ApiErrorDto. - - - :param status: The status of this ApiErrorDto. # noqa: E501 - :type: str - """ - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - allowed_values = ["100 CONTINUE", "101 SWITCHING_PROTOCOLS", "102 PROCESSING", "103 EARLY_HINTS", "103 CHECKPOINT", "200 OK", "201 CREATED", "202 ACCEPTED", "203 NON_AUTHORITATIVE_INFORMATION", "204 NO_CONTENT", "205 RESET_CONTENT", "206 PARTIAL_CONTENT", "207 MULTI_STATUS", "208 ALREADY_REPORTED", "226 IM_USED", "300 MULTIPLE_CHOICES", "301 MOVED_PERMANENTLY", "302 FOUND", "302 MOVED_TEMPORARILY", "303 SEE_OTHER", "304 NOT_MODIFIED", "305 USE_PROXY", "307 TEMPORARY_REDIRECT", "308 PERMANENT_REDIRECT", "400 BAD_REQUEST", "401 UNAUTHORIZED", "402 PAYMENT_REQUIRED", "403 FORBIDDEN", "404 NOT_FOUND", "405 METHOD_NOT_ALLOWED", "406 NOT_ACCEPTABLE", "407 PROXY_AUTHENTICATION_REQUIRED", "408 REQUEST_TIMEOUT", "409 CONFLICT", "410 GONE", "411 LENGTH_REQUIRED", "412 PRECONDITION_FAILED", "413 PAYLOAD_TOO_LARGE", "413 REQUEST_ENTITY_TOO_LARGE", "414 URI_TOO_LONG", "414 REQUEST_URI_TOO_LONG", "415 UNSUPPORTED_MEDIA_TYPE", "416 REQUESTED_RANGE_NOT_SATISFIABLE", "417 EXPECTATION_FAILED", "418 I_AM_A_TEAPOT", "419 INSUFFICIENT_SPACE_ON_RESOURCE", "420 METHOD_FAILURE", "421 DESTINATION_LOCKED", "422 UNPROCESSABLE_ENTITY", "423 LOCKED", "424 FAILED_DEPENDENCY", "425 TOO_EARLY", "426 UPGRADE_REQUIRED", "428 PRECONDITION_REQUIRED", "429 TOO_MANY_REQUESTS", "431 REQUEST_HEADER_FIELDS_TOO_LARGE", "451 UNAVAILABLE_FOR_LEGAL_REASONS", "500 INTERNAL_SERVER_ERROR", "501 NOT_IMPLEMENTED", "502 BAD_GATEWAY", "503 SERVICE_UNAVAILABLE", "504 GATEWAY_TIMEOUT", "505 HTTP_VERSION_NOT_SUPPORTED", "506 VARIANT_ALSO_NEGOTIATES", "507 INSUFFICIENT_STORAGE", "508 LOOP_DETECTED", "509 BANDWIDTH_LIMIT_EXCEEDED", "510 NOT_EXTENDED", "511 NETWORK_AUTHENTICATION_REQUIRED"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def message(self): - """Gets the message of this ApiErrorDto. # noqa: E501 - - - :return: The message of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this ApiErrorDto. - - - :param message: The message of this ApiErrorDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def code(self): - """Gets the code of this ApiErrorDto. # noqa: E501 - - - :return: The code of this ApiErrorDto. # noqa: E501 - :rtype: str - """ - return self._code - - @code.setter - def code(self, code): - """Sets the code of this ApiErrorDto. - - - :param code: The code of this ApiErrorDto. # noqa: E501 - :type: str - """ - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - - self._code = code - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ApiErrorDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ApiErrorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_brief_dto.py b/swagger/api/api_user/models/banner_message_brief_dto.py deleted file mode 100644 index 222bd0cc9d4ca19fb79944d32d930d64009058bf..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_brief_dto.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'type': 'str', - 'message': 'str', - 'link': 'str', - 'link_text': 'str' - } - - attribute_map = { - 'type': 'type', - 'message': 'message', - 'link': 'link', - 'link_text': 'link_text' - } - - def __init__(self, type=None, message=None, link=None, link_text=None): # noqa: E501 - """BannerMessageBriefDto - a model defined in Swagger""" # noqa: E501 - self._type = None - self._message = None - self._link = None - self._link_text = None - self.discriminator = None - self.type = type - self.message = message - if link is not None: - self.link = link - if link_text is not None: - self.link_text = link_text - - @property - def type(self): - """Gets the type of this BannerMessageBriefDto. # noqa: E501 - - - :return: The type of this BannerMessageBriefDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this BannerMessageBriefDto. - - - :param type: The type of this BannerMessageBriefDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["error", "warning", "info"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def message(self): - """Gets the message of this BannerMessageBriefDto. # noqa: E501 - - - :return: The message of this BannerMessageBriefDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageBriefDto. - - - :param message: The message of this BannerMessageBriefDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def link(self): - """Gets the link of this BannerMessageBriefDto. # noqa: E501 - - - :return: The link of this BannerMessageBriefDto. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this BannerMessageBriefDto. - - - :param link: The link of this BannerMessageBriefDto. # noqa: E501 - :type: str - """ - - self._link = link - - @property - def link_text(self): - """Gets the link_text of this BannerMessageBriefDto. # noqa: E501 - - - :return: The link_text of this BannerMessageBriefDto. # noqa: E501 - :rtype: str - """ - return self._link_text - - @link_text.setter - def link_text(self, link_text): - """Sets the link_text of this BannerMessageBriefDto. - - - :param link_text: The link_text of this BannerMessageBriefDto. # noqa: E501 - :type: str - """ - - self._link_text = link_text - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_create_dto.py b/swagger/api/api_user/models/banner_message_create_dto.py deleted file mode 100644 index ed5102bfe14101e8557d88d1f858c822e942cf06..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_create_dto.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageCreateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'type': 'str', - 'message': 'str', - 'link': 'str', - 'link_text': 'str', - 'display_start': 'datetime', - 'display_end': 'datetime' - } - - attribute_map = { - 'type': 'type', - 'message': 'message', - 'link': 'link', - 'link_text': 'link_text', - 'display_start': 'display_start', - 'display_end': 'display_end' - } - - def __init__(self, type=None, message=None, link=None, link_text=None, display_start=None, display_end=None): # noqa: E501 - """BannerMessageCreateDto - a model defined in Swagger""" # noqa: E501 - self._type = None - self._message = None - self._link = None - self._link_text = None - self._display_start = None - self._display_end = None - self.discriminator = None - self.type = type - self.message = message - if link is not None: - self.link = link - if link_text is not None: - self.link_text = link_text - if display_start is not None: - self.display_start = display_start - if display_end is not None: - self.display_end = display_end - - @property - def type(self): - """Gets the type of this BannerMessageCreateDto. # noqa: E501 - - - :return: The type of this BannerMessageCreateDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this BannerMessageCreateDto. - - - :param type: The type of this BannerMessageCreateDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["error", "warning", "info"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def message(self): - """Gets the message of this BannerMessageCreateDto. # noqa: E501 - - - :return: The message of this BannerMessageCreateDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageCreateDto. - - - :param message: The message of this BannerMessageCreateDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def link(self): - """Gets the link of this BannerMessageCreateDto. # noqa: E501 - - - :return: The link of this BannerMessageCreateDto. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this BannerMessageCreateDto. - - - :param link: The link of this BannerMessageCreateDto. # noqa: E501 - :type: str - """ - - self._link = link - - @property - def link_text(self): - """Gets the link_text of this BannerMessageCreateDto. # noqa: E501 - - - :return: The link_text of this BannerMessageCreateDto. # noqa: E501 - :rtype: str - """ - return self._link_text - - @link_text.setter - def link_text(self, link_text): - """Sets the link_text of this BannerMessageCreateDto. - - - :param link_text: The link_text of this BannerMessageCreateDto. # noqa: E501 - :type: str - """ - - self._link_text = link_text - - @property - def display_start(self): - """Gets the display_start of this BannerMessageCreateDto. # noqa: E501 - - - :return: The display_start of this BannerMessageCreateDto. # noqa: E501 - :rtype: datetime - """ - return self._display_start - - @display_start.setter - def display_start(self, display_start): - """Sets the display_start of this BannerMessageCreateDto. - - - :param display_start: The display_start of this BannerMessageCreateDto. # noqa: E501 - :type: datetime - """ - - self._display_start = display_start - - @property - def display_end(self): - """Gets the display_end of this BannerMessageCreateDto. # noqa: E501 - - - :return: The display_end of this BannerMessageCreateDto. # noqa: E501 - :rtype: datetime - """ - return self._display_end - - @display_end.setter - def display_end(self, display_end): - """Sets the display_end of this BannerMessageCreateDto. - - - :param display_end: The display_end of this BannerMessageCreateDto. # noqa: E501 - :type: datetime - """ - - self._display_end = display_end - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageCreateDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageCreateDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_dto.py b/swagger/api/api_user/models/banner_message_dto.py deleted file mode 100644 index b155e551a479643ac4def166d3d62d2e4a462d97..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_dto.py +++ /dev/null @@ -1,275 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'message': 'str', - 'link': 'str', - 'link_text': 'str', - 'display_start': 'datetime', - 'display_end': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'message': 'message', - 'link': 'link', - 'link_text': 'link_text', - 'display_start': 'display_start', - 'display_end': 'display_end' - } - - def __init__(self, id=None, type=None, message=None, link=None, link_text=None, display_start=None, display_end=None): # noqa: E501 - """BannerMessageDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._message = None - self._link = None - self._link_text = None - self._display_start = None - self._display_end = None - self.discriminator = None - self.id = id - self.type = type - self.message = message - if link is not None: - self.link = link - if link_text is not None: - self.link_text = link_text - if display_start is not None: - self.display_start = display_start - if display_end is not None: - self.display_end = display_end - - @property - def id(self): - """Gets the id of this BannerMessageDto. # noqa: E501 - - - :return: The id of this BannerMessageDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this BannerMessageDto. - - - :param id: The id of this BannerMessageDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def type(self): - """Gets the type of this BannerMessageDto. # noqa: E501 - - - :return: The type of this BannerMessageDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this BannerMessageDto. - - - :param type: The type of this BannerMessageDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["error", "warning", "info"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def message(self): - """Gets the message of this BannerMessageDto. # noqa: E501 - - - :return: The message of this BannerMessageDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageDto. - - - :param message: The message of this BannerMessageDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def link(self): - """Gets the link of this BannerMessageDto. # noqa: E501 - - - :return: The link of this BannerMessageDto. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this BannerMessageDto. - - - :param link: The link of this BannerMessageDto. # noqa: E501 - :type: str - """ - - self._link = link - - @property - def link_text(self): - """Gets the link_text of this BannerMessageDto. # noqa: E501 - - - :return: The link_text of this BannerMessageDto. # noqa: E501 - :rtype: str - """ - return self._link_text - - @link_text.setter - def link_text(self, link_text): - """Sets the link_text of this BannerMessageDto. - - - :param link_text: The link_text of this BannerMessageDto. # noqa: E501 - :type: str - """ - - self._link_text = link_text - - @property - def display_start(self): - """Gets the display_start of this BannerMessageDto. # noqa: E501 - - - :return: The display_start of this BannerMessageDto. # noqa: E501 - :rtype: datetime - """ - return self._display_start - - @display_start.setter - def display_start(self, display_start): - """Sets the display_start of this BannerMessageDto. - - - :param display_start: The display_start of this BannerMessageDto. # noqa: E501 - :type: datetime - """ - - self._display_start = display_start - - @property - def display_end(self): - """Gets the display_end of this BannerMessageDto. # noqa: E501 - - - :return: The display_end of this BannerMessageDto. # noqa: E501 - :rtype: datetime - """ - return self._display_end - - @display_end.setter - def display_end(self, display_end): - """Sets the display_end of this BannerMessageDto. - - - :param display_end: The display_end of this BannerMessageDto. # noqa: E501 - :type: datetime - """ - - self._display_end = display_end - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception.py b/swagger/api/api_user/models/banner_message_not_found_exception.py deleted file mode 100644 index 952f747b6b829302bbb70d7523bd3ed2e57fd46c..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_not_found_exception.py +++ /dev/null @@ -1,214 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageNotFoundException(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'cause': 'BannerMessageNotFoundExceptionCause', - 'stack_trace': 'list[BannerMessageNotFoundExceptionCauseStackTrace]', - 'message': 'str', - 'suppressed': 'list[BannerMessageNotFoundExceptionCauseSuppressed]', - 'localized_message': 'str' - } - - attribute_map = { - 'cause': 'cause', - 'stack_trace': 'stackTrace', - 'message': 'message', - 'suppressed': 'suppressed', - 'localized_message': 'localizedMessage' - } - - def __init__(self, cause=None, stack_trace=None, message=None, suppressed=None, localized_message=None): # noqa: E501 - """BannerMessageNotFoundException - a model defined in Swagger""" # noqa: E501 - self._cause = None - self._stack_trace = None - self._message = None - self._suppressed = None - self._localized_message = None - self.discriminator = None - if cause is not None: - self.cause = cause - if stack_trace is not None: - self.stack_trace = stack_trace - if message is not None: - self.message = message - if suppressed is not None: - self.suppressed = suppressed - if localized_message is not None: - self.localized_message = localized_message - - @property - def cause(self): - """Gets the cause of this BannerMessageNotFoundException. # noqa: E501 - - - :return: The cause of this BannerMessageNotFoundException. # noqa: E501 - :rtype: BannerMessageNotFoundExceptionCause - """ - return self._cause - - @cause.setter - def cause(self, cause): - """Sets the cause of this BannerMessageNotFoundException. - - - :param cause: The cause of this BannerMessageNotFoundException. # noqa: E501 - :type: BannerMessageNotFoundExceptionCause - """ - - self._cause = cause - - @property - def stack_trace(self): - """Gets the stack_trace of this BannerMessageNotFoundException. # noqa: E501 - - - :return: The stack_trace of this BannerMessageNotFoundException. # noqa: E501 - :rtype: list[BannerMessageNotFoundExceptionCauseStackTrace] - """ - return self._stack_trace - - @stack_trace.setter - def stack_trace(self, stack_trace): - """Sets the stack_trace of this BannerMessageNotFoundException. - - - :param stack_trace: The stack_trace of this BannerMessageNotFoundException. # noqa: E501 - :type: list[BannerMessageNotFoundExceptionCauseStackTrace] - """ - - self._stack_trace = stack_trace - - @property - def message(self): - """Gets the message of this BannerMessageNotFoundException. # noqa: E501 - - - :return: The message of this BannerMessageNotFoundException. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageNotFoundException. - - - :param message: The message of this BannerMessageNotFoundException. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def suppressed(self): - """Gets the suppressed of this BannerMessageNotFoundException. # noqa: E501 - - - :return: The suppressed of this BannerMessageNotFoundException. # noqa: E501 - :rtype: list[BannerMessageNotFoundExceptionCauseSuppressed] - """ - return self._suppressed - - @suppressed.setter - def suppressed(self, suppressed): - """Sets the suppressed of this BannerMessageNotFoundException. - - - :param suppressed: The suppressed of this BannerMessageNotFoundException. # noqa: E501 - :type: list[BannerMessageNotFoundExceptionCauseSuppressed] - """ - - self._suppressed = suppressed - - @property - def localized_message(self): - """Gets the localized_message of this BannerMessageNotFoundException. # noqa: E501 - - - :return: The localized_message of this BannerMessageNotFoundException. # noqa: E501 - :rtype: str - """ - return self._localized_message - - @localized_message.setter - def localized_message(self, localized_message): - """Sets the localized_message of this BannerMessageNotFoundException. - - - :param localized_message: The localized_message of this BannerMessageNotFoundException. # noqa: E501 - :type: str - """ - - self._localized_message = localized_message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageNotFoundException, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageNotFoundException): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception_cause.py b/swagger/api/api_user/models/banner_message_not_found_exception_cause.py deleted file mode 100644 index 9684ec9b571701c629ad1f3ebc12d788a084b7fa..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_not_found_exception_cause.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageNotFoundExceptionCause(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'stack_trace': 'list[BannerMessageNotFoundExceptionCauseStackTrace]', - 'message': 'str', - 'suppressed': 'list[BannerMessageNotFoundExceptionCauseSuppressed]', - 'localized_message': 'str' - } - - attribute_map = { - 'stack_trace': 'stackTrace', - 'message': 'message', - 'suppressed': 'suppressed', - 'localized_message': 'localizedMessage' - } - - def __init__(self, stack_trace=None, message=None, suppressed=None, localized_message=None): # noqa: E501 - """BannerMessageNotFoundExceptionCause - a model defined in Swagger""" # noqa: E501 - self._stack_trace = None - self._message = None - self._suppressed = None - self._localized_message = None - self.discriminator = None - if stack_trace is not None: - self.stack_trace = stack_trace - if message is not None: - self.message = message - if suppressed is not None: - self.suppressed = suppressed - if localized_message is not None: - self.localized_message = localized_message - - @property - def stack_trace(self): - """Gets the stack_trace of this BannerMessageNotFoundExceptionCause. # noqa: E501 - - - :return: The stack_trace of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :rtype: list[BannerMessageNotFoundExceptionCauseStackTrace] - """ - return self._stack_trace - - @stack_trace.setter - def stack_trace(self, stack_trace): - """Sets the stack_trace of this BannerMessageNotFoundExceptionCause. - - - :param stack_trace: The stack_trace of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :type: list[BannerMessageNotFoundExceptionCauseStackTrace] - """ - - self._stack_trace = stack_trace - - @property - def message(self): - """Gets the message of this BannerMessageNotFoundExceptionCause. # noqa: E501 - - - :return: The message of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageNotFoundExceptionCause. - - - :param message: The message of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def suppressed(self): - """Gets the suppressed of this BannerMessageNotFoundExceptionCause. # noqa: E501 - - - :return: The suppressed of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :rtype: list[BannerMessageNotFoundExceptionCauseSuppressed] - """ - return self._suppressed - - @suppressed.setter - def suppressed(self, suppressed): - """Sets the suppressed of this BannerMessageNotFoundExceptionCause. - - - :param suppressed: The suppressed of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :type: list[BannerMessageNotFoundExceptionCauseSuppressed] - """ - - self._suppressed = suppressed - - @property - def localized_message(self): - """Gets the localized_message of this BannerMessageNotFoundExceptionCause. # noqa: E501 - - - :return: The localized_message of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :rtype: str - """ - return self._localized_message - - @localized_message.setter - def localized_message(self, localized_message): - """Sets the localized_message of this BannerMessageNotFoundExceptionCause. - - - :param localized_message: The localized_message of this BannerMessageNotFoundExceptionCause. # noqa: E501 - :type: str - """ - - self._localized_message = localized_message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageNotFoundExceptionCause, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageNotFoundExceptionCause): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception_cause_stack_trace.py b/swagger/api/api_user/models/banner_message_not_found_exception_cause_stack_trace.py deleted file mode 100644 index 8013cd308a6fe0296826b66d36853cb47c043330..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_not_found_exception_cause_stack_trace.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageNotFoundExceptionCauseStackTrace(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'class_loader_name': 'str', - 'module_name': 'str', - 'module_version': 'str', - 'method_name': 'str', - 'file_name': 'str', - 'line_number': 'int', - 'native_method': 'bool', - 'class_name': 'str' - } - - attribute_map = { - 'class_loader_name': 'classLoaderName', - 'module_name': 'moduleName', - 'module_version': 'moduleVersion', - 'method_name': 'methodName', - 'file_name': 'fileName', - 'line_number': 'lineNumber', - 'native_method': 'nativeMethod', - 'class_name': 'className' - } - - def __init__(self, class_loader_name=None, module_name=None, module_version=None, method_name=None, file_name=None, line_number=None, native_method=None, class_name=None): # noqa: E501 - """BannerMessageNotFoundExceptionCauseStackTrace - a model defined in Swagger""" # noqa: E501 - self._class_loader_name = None - self._module_name = None - self._module_version = None - self._method_name = None - self._file_name = None - self._line_number = None - self._native_method = None - self._class_name = None - self.discriminator = None - if class_loader_name is not None: - self.class_loader_name = class_loader_name - if module_name is not None: - self.module_name = module_name - if module_version is not None: - self.module_version = module_version - if method_name is not None: - self.method_name = method_name - if file_name is not None: - self.file_name = file_name - if line_number is not None: - self.line_number = line_number - if native_method is not None: - self.native_method = native_method - if class_name is not None: - self.class_name = class_name - - @property - def class_loader_name(self): - """Gets the class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: str - """ - return self._class_loader_name - - @class_loader_name.setter - def class_loader_name(self, class_loader_name): - """Sets the class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param class_loader_name: The class_loader_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: str - """ - - self._class_loader_name = class_loader_name - - @property - def module_name(self): - """Gets the module_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The module_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: str - """ - return self._module_name - - @module_name.setter - def module_name(self, module_name): - """Sets the module_name of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param module_name: The module_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: str - """ - - self._module_name = module_name - - @property - def module_version(self): - """Gets the module_version of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The module_version of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: str - """ - return self._module_version - - @module_version.setter - def module_version(self, module_version): - """Sets the module_version of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param module_version: The module_version of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: str - """ - - self._module_version = module_version - - @property - def method_name(self): - """Gets the method_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The method_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: str - """ - return self._method_name - - @method_name.setter - def method_name(self, method_name): - """Sets the method_name of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param method_name: The method_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: str - """ - - self._method_name = method_name - - @property - def file_name(self): - """Gets the file_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The file_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: str - """ - return self._file_name - - @file_name.setter - def file_name(self, file_name): - """Sets the file_name of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param file_name: The file_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: str - """ - - self._file_name = file_name - - @property - def line_number(self): - """Gets the line_number of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The line_number of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: int - """ - return self._line_number - - @line_number.setter - def line_number(self, line_number): - """Sets the line_number of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param line_number: The line_number of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: int - """ - - self._line_number = line_number - - @property - def native_method(self): - """Gets the native_method of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The native_method of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: bool - """ - return self._native_method - - @native_method.setter - def native_method(self, native_method): - """Sets the native_method of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param native_method: The native_method of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: bool - """ - - self._native_method = native_method - - @property - def class_name(self): - """Gets the class_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - - - :return: The class_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :rtype: str - """ - return self._class_name - - @class_name.setter - def class_name(self, class_name): - """Sets the class_name of this BannerMessageNotFoundExceptionCauseStackTrace. - - - :param class_name: The class_name of this BannerMessageNotFoundExceptionCauseStackTrace. # noqa: E501 - :type: str - """ - - self._class_name = class_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageNotFoundExceptionCauseStackTrace, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageNotFoundExceptionCauseStackTrace): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_not_found_exception_cause_suppressed.py b/swagger/api/api_user/models/banner_message_not_found_exception_cause_suppressed.py deleted file mode 100644 index 88913aa80c3056e20977f368f2f826e6a49b09e0..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_not_found_exception_cause_suppressed.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageNotFoundExceptionCauseSuppressed(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'stack_trace': 'list[BannerMessageNotFoundExceptionCauseStackTrace]', - 'message': 'str', - 'localized_message': 'str' - } - - attribute_map = { - 'stack_trace': 'stackTrace', - 'message': 'message', - 'localized_message': 'localizedMessage' - } - - def __init__(self, stack_trace=None, message=None, localized_message=None): # noqa: E501 - """BannerMessageNotFoundExceptionCauseSuppressed - a model defined in Swagger""" # noqa: E501 - self._stack_trace = None - self._message = None - self._localized_message = None - self.discriminator = None - if stack_trace is not None: - self.stack_trace = stack_trace - if message is not None: - self.message = message - if localized_message is not None: - self.localized_message = localized_message - - @property - def stack_trace(self): - """Gets the stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - - - :return: The stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - :rtype: list[BannerMessageNotFoundExceptionCauseStackTrace] - """ - return self._stack_trace - - @stack_trace.setter - def stack_trace(self, stack_trace): - """Sets the stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. - - - :param stack_trace: The stack_trace of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - :type: list[BannerMessageNotFoundExceptionCauseStackTrace] - """ - - self._stack_trace = stack_trace - - @property - def message(self): - """Gets the message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - - - :return: The message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageNotFoundExceptionCauseSuppressed. - - - :param message: The message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - :type: str - """ - - self._message = message - - @property - def localized_message(self): - """Gets the localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - - - :return: The localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - :rtype: str - """ - return self._localized_message - - @localized_message.setter - def localized_message(self, localized_message): - """Sets the localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. - - - :param localized_message: The localized_message of this BannerMessageNotFoundExceptionCauseSuppressed. # noqa: E501 - :type: str - """ - - self._localized_message = localized_message - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageNotFoundExceptionCauseSuppressed, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageNotFoundExceptionCauseSuppressed): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/banner_message_update_dto.py b/swagger/api/api_user/models/banner_message_update_dto.py deleted file mode 100644 index 54d78650da4d9eb34fb24e046dfb4c4251ba2a2c..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/banner_message_update_dto.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class BannerMessageUpdateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'type': 'str', - 'message': 'str', - 'link': 'str', - 'link_text': 'str', - 'display_start': 'datetime', - 'display_end': 'datetime' - } - - attribute_map = { - 'type': 'type', - 'message': 'message', - 'link': 'link', - 'link_text': 'link_text', - 'display_start': 'display_start', - 'display_end': 'display_end' - } - - def __init__(self, type=None, message=None, link=None, link_text=None, display_start=None, display_end=None): # noqa: E501 - """BannerMessageUpdateDto - a model defined in Swagger""" # noqa: E501 - self._type = None - self._message = None - self._link = None - self._link_text = None - self._display_start = None - self._display_end = None - self.discriminator = None - self.type = type - self.message = message - if link is not None: - self.link = link - if link_text is not None: - self.link_text = link_text - if display_start is not None: - self.display_start = display_start - if display_end is not None: - self.display_end = display_end - - @property - def type(self): - """Gets the type of this BannerMessageUpdateDto. # noqa: E501 - - - :return: The type of this BannerMessageUpdateDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this BannerMessageUpdateDto. - - - :param type: The type of this BannerMessageUpdateDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["error", "warning", "info"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def message(self): - """Gets the message of this BannerMessageUpdateDto. # noqa: E501 - - - :return: The message of this BannerMessageUpdateDto. # noqa: E501 - :rtype: str - """ - return self._message - - @message.setter - def message(self, message): - """Sets the message of this BannerMessageUpdateDto. - - - :param message: The message of this BannerMessageUpdateDto. # noqa: E501 - :type: str - """ - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - - self._message = message - - @property - def link(self): - """Gets the link of this BannerMessageUpdateDto. # noqa: E501 - - - :return: The link of this BannerMessageUpdateDto. # noqa: E501 - :rtype: str - """ - return self._link - - @link.setter - def link(self, link): - """Sets the link of this BannerMessageUpdateDto. - - - :param link: The link of this BannerMessageUpdateDto. # noqa: E501 - :type: str - """ - - self._link = link - - @property - def link_text(self): - """Gets the link_text of this BannerMessageUpdateDto. # noqa: E501 - - - :return: The link_text of this BannerMessageUpdateDto. # noqa: E501 - :rtype: str - """ - return self._link_text - - @link_text.setter - def link_text(self, link_text): - """Sets the link_text of this BannerMessageUpdateDto. - - - :param link_text: The link_text of this BannerMessageUpdateDto. # noqa: E501 - :type: str - """ - - self._link_text = link_text - - @property - def display_start(self): - """Gets the display_start of this BannerMessageUpdateDto. # noqa: E501 - - - :return: The display_start of this BannerMessageUpdateDto. # noqa: E501 - :rtype: datetime - """ - return self._display_start - - @display_start.setter - def display_start(self, display_start): - """Sets the display_start of this BannerMessageUpdateDto. - - - :param display_start: The display_start of this BannerMessageUpdateDto. # noqa: E501 - :type: datetime - """ - - self._display_start = display_start - - @property - def display_end(self): - """Gets the display_end of this BannerMessageUpdateDto. # noqa: E501 - - - :return: The display_end of this BannerMessageUpdateDto. # noqa: E501 - :rtype: datetime - """ - return self._display_end - - @display_end.setter - def display_end(self, display_end): - """Sets the display_end of this BannerMessageUpdateDto. - - - :param display_end: The display_end of this BannerMessageUpdateDto. # noqa: E501 - :type: datetime - """ - - self._display_end = display_end - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(BannerMessageUpdateDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, BannerMessageUpdateDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/column_brief_dto.py b/swagger/api/api_user/models/column_brief_dto.py deleted file mode 100644 index 2abec82518e769f93fdbabf35e77db97b9dd4d97..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/column_brief_dto.py +++ /dev/null @@ -1,252 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ColumnBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'name': 'str', - 'database_id': 'int', - 'table_id': 'int', - 'internal_name': 'str', - 'column_type': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'database_id': 'database_id', - 'table_id': 'table_id', - 'internal_name': 'internal_name', - 'column_type': 'column_type' - } - - def __init__(self, id=None, name=None, database_id=None, table_id=None, internal_name=None, column_type=None): # noqa: E501 - """ColumnBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._database_id = None - self._table_id = None - self._internal_name = None - self._column_type = None - self.discriminator = None - self.id = id - self.name = name - self.database_id = database_id - self.table_id = table_id - self.internal_name = internal_name - self.column_type = column_type - - @property - def id(self): - """Gets the id of this ColumnBriefDto. # noqa: E501 - - - :return: The id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this ColumnBriefDto. - - - :param id: The id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def name(self): - """Gets the name of this ColumnBriefDto. # noqa: E501 - - - :return: The name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this ColumnBriefDto. - - - :param name: The name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def database_id(self): - """Gets the database_id of this ColumnBriefDto. # noqa: E501 - - - :return: The database_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this ColumnBriefDto. - - - :param database_id: The database_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def table_id(self): - """Gets the table_id of this ColumnBriefDto. # noqa: E501 - - - :return: The table_id of this ColumnBriefDto. # noqa: E501 - :rtype: int - """ - return self._table_id - - @table_id.setter - def table_id(self, table_id): - """Sets the table_id of this ColumnBriefDto. - - - :param table_id: The table_id of this ColumnBriefDto. # noqa: E501 - :type: int - """ - if table_id is None: - raise ValueError("Invalid value for `table_id`, must not be `None`") # noqa: E501 - - self._table_id = table_id - - @property - def internal_name(self): - """Gets the internal_name of this ColumnBriefDto. # noqa: E501 - - - :return: The internal_name of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this ColumnBriefDto. - - - :param internal_name: The internal_name of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if internal_name is None: - raise ValueError("Invalid value for `internal_name`, must not be `None`") # noqa: E501 - - self._internal_name = internal_name - - @property - def column_type(self): - """Gets the column_type of this ColumnBriefDto. # noqa: E501 - - - :return: The column_type of this ColumnBriefDto. # noqa: E501 - :rtype: str - """ - return self._column_type - - @column_type.setter - def column_type(self, column_type): - """Sets the column_type of this ColumnBriefDto. - - - :param column_type: The column_type of this ColumnBriefDto. # noqa: E501 - :type: str - """ - if column_type is None: - raise ValueError("Invalid value for `column_type`, must not be `None`") # noqa: E501 - allowed_values = ["enum", "number", "decimal", "string", "text", "boolean", "date", "timestamp", "blob"] # noqa: E501 - if column_type not in allowed_values: - raise ValueError( - "Invalid value for `column_type` ({0}), must be one of {1}" # noqa: E501 - .format(column_type, allowed_values) - ) - - self._column_type = column_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(ColumnBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ColumnBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/container_dto.py b/swagger/api/api_user/models/container_dto.py deleted file mode 100644 index c11ffbd4351205c3273e3c4fd881c76b768958e4..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/container_dto.py +++ /dev/null @@ -1,408 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'database': 'DatabaseDto', - 'running': 'bool', - 'image': 'ImageBriefDto', - 'port': 'int', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'internal_name': 'str', - 'ip_address': 'str' - } - - attribute_map = { - 'id': 'id', - 'hash': 'hash', - 'name': 'name', - 'state': 'state', - 'database': 'database', - 'running': 'running', - '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, running=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 - self._name = None - self._state = None - self._database = None - self._running = None - self._image = None - self._port = None - self._owner = 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 database is not None: - self.database = database - self.running = running - if image is not None: - 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: - 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 database(self): - """Gets the database of this ContainerDto. # noqa: E501 - - - :return: The database of this ContainerDto. # noqa: E501 - :rtype: DatabaseDto - """ - return self._database - - @database.setter - def database(self, database): - """Sets the database of this ContainerDto. - - - :param database: The database of this ContainerDto. # noqa: E501 - :type: DatabaseDto - """ - - self._database = database - - @property - def running(self): - """Gets the running of this ContainerDto. # noqa: E501 - - - :return: The running of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._running - - @running.setter - def running(self, running): - """Sets the running of this ContainerDto. - - - :param running: The running of this ContainerDto. # noqa: E501 - :type: bool - """ - if running is None: - raise ValueError("Invalid value for `running`, must not be `None`") # noqa: E501 - - self._running = running - - @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 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 - - - :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_user/models/creator_dto.py b/swagger/api/api_user/models/creator_dto.py deleted file mode 100644 index 1e2c22d786d3f580c2f159b84029c65e0e6b1a3a..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/creator_dto.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class CreatorDto(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', - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'id': 'id', - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, id=None, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """CreatorDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - self.id = id - self.firstname = firstname - self.lastname = lastname - if affiliation is not None: - self.affiliation = affiliation - if orcid is not None: - self.orcid = orcid - - @property - def id(self): - """Gets the id of this CreatorDto. # noqa: E501 - - - :return: The id of this CreatorDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this CreatorDto. - - - :param id: The id of this CreatorDto. # 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 firstname(self): - """Gets the firstname of this CreatorDto. # noqa: E501 - - - :return: The firstname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this CreatorDto. - - - :param firstname: The firstname of this CreatorDto. # noqa: E501 - :type: str - """ - if firstname is None: - raise ValueError("Invalid value for `firstname`, must not be `None`") # noqa: E501 - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this CreatorDto. # noqa: E501 - - - :return: The lastname of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this CreatorDto. - - - :param lastname: The lastname of this CreatorDto. # noqa: E501 - :type: str - """ - if lastname is None: - raise ValueError("Invalid value for `lastname`, must not be `None`") # noqa: E501 - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this CreatorDto. # noqa: E501 - - - :return: The affiliation of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this CreatorDto. - - - :param affiliation: The affiliation of this CreatorDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this CreatorDto. # noqa: E501 - - - :return: The orcid of this CreatorDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this CreatorDto. - - - :param orcid: The orcid of this CreatorDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(CreatorDto, 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, CreatorDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/database_access_dto.py b/swagger/api/api_user/models/database_access_dto.py deleted file mode 100644 index 71627727398648c41c9ca2c3cff8b9ee7ada3ca1..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/database_access_dto.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DatabaseAccessDto(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 = { - 'user': 'UserDto', - 'type': 'str', - 'created': 'datetime' - } - - attribute_map = { - 'user': 'user', - 'type': 'type', - 'created': 'created' - } - - def __init__(self, user=None, type=None, created=None): # noqa: E501 - """DatabaseAccessDto - a model defined in Swagger""" # noqa: E501 - self._user = None - self._type = None - self._created = None - self.discriminator = None - self.user = user - self.type = type - if created is not None: - self.created = created - - @property - def user(self): - """Gets the user of this DatabaseAccessDto. # noqa: E501 - - - :return: The user of this DatabaseAccessDto. # noqa: E501 - :rtype: UserDto - """ - return self._user - - @user.setter - def user(self, user): - """Sets the user of this DatabaseAccessDto. - - - :param user: The user of this DatabaseAccessDto. # noqa: E501 - :type: UserDto - """ - if user is None: - raise ValueError("Invalid value for `user`, must not be `None`") # noqa: E501 - - self._user = user - - @property - def type(self): - """Gets the type of this DatabaseAccessDto. # noqa: E501 - - - :return: The type of this DatabaseAccessDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DatabaseAccessDto. - - - :param type: The type of this DatabaseAccessDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["read", "write_own", "write_all"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def created(self): - """Gets the created of this DatabaseAccessDto. # noqa: E501 - - - :return: The created of this DatabaseAccessDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this DatabaseAccessDto. - - - :param created: The created of this DatabaseAccessDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - 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(DatabaseAccessDto, 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, DatabaseAccessDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/database_dto.py b/swagger/api/api_user/models/database_dto.py deleted file mode 100644 index 618d9009712b1c15f75f8ca6b14cc47ed07b0900..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/database_dto.py +++ /dev/null @@ -1,480 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'identifier': 'IdentifierDto', - 'description': 'str', - 'tables': 'list[TableBriefDto]', - 'views': 'list[ViewBriefDto]', - 'image': 'ImageDto', - 'container': 'ContainerDto', - 'accesses': 'list[DatabaseAccessDto]', - 'creator': 'UserBriefDto', - 'owner': 'UserBriefDto', - 'created': 'datetime', - 'exchange_name': 'str', - 'internal_name': 'str', - 'is_public': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'identifier': 'identifier', - 'description': 'description', - 'tables': 'tables', - 'views': 'views', - 'image': 'image', - 'container': 'container', - 'accesses': 'accesses', - 'creator': 'creator', - 'owner': 'owner', - 'created': 'created', - 'exchange_name': 'exchange_name', - 'internal_name': 'internal_name', - 'is_public': 'is_public' - } - - def __init__(self, id=None, name=None, identifier=None, description=None, tables=None, views=None, image=None, container=None, accesses=None, creator=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 - self._identifier = None - self._description = None - self._tables = None - self._views = None - self._image = None - self._container = None - self._accesses = None - self._creator = None - self._owner = None - self._created = None - self._exchange_name = None - self._internal_name = None - self._is_public = None - self.discriminator = None - self.id = id - self.name = name - 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 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 - self.creator = creator - self.owner = owner - if created is not None: - self.created = created - self.exchange_name = exchange_name - 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 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 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 - - - :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 accesses(self): - """Gets the accesses of this DatabaseDto. # noqa: E501 - - - :return: The accesses of this DatabaseDto. # noqa: E501 - :rtype: list[DatabaseAccessDto] - """ - return self._accesses - - @accesses.setter - def accesses(self, accesses): - """Sets the accesses of this DatabaseDto. - - - :param accesses: The accesses of this DatabaseDto. # noqa: E501 - :type: list[DatabaseAccessDto] - """ - - self._accesses = accesses - - @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 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 - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @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 exchange_name(self): - """Gets the exchange_name of this DatabaseDto. # noqa: E501 - - - :return: The exchange_name of this DatabaseDto. # noqa: E501 - :rtype: str - """ - return self._exchange_name - - @exchange_name.setter - def exchange_name(self, exchange_name): - """Sets the exchange_name of this DatabaseDto. - - - :param exchange_name: The exchange_name of this DatabaseDto. # noqa: E501 - :type: str - """ - if exchange_name is None: - raise ValueError("Invalid value for `exchange_name`, must not be `None`") # noqa: E501 - - self._exchange_name = exchange_name - - @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_user/models/identifier_dto.py b/swagger/api/api_user/models/identifier_dto.py deleted file mode 100644 index fef15d9c4eec45fddbe5d9723dbd1fe263b5b310..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/identifier_dto.py +++ /dev/null @@ -1,767 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class IdentifierDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'int', - 'type': 'str', - 'title': 'str', - 'description': 'str', - 'query': 'str', - 'execution': 'datetime', - 'visibility': 'str', - 'doi': 'str', - 'publisher': 'str', - 'language': 'str', - 'license': 'LicenseDto', - 'creators': 'list[CreatorDto]', - 'created': 'datetime', - 'container_id': 'int', - 'database_id': 'int', - 'query_id': 'int', - 'query_normalized': 'str', - 'related': 'list[RelatedIdentifierDto]', - 'query_hash': 'str', - 'result_hash': 'str', - 'result_number': 'int', - 'publication_day': 'int', - 'publication_month': 'int', - 'publication_year': 'int', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'title': 'title', - 'description': 'description', - 'query': 'query', - 'execution': 'execution', - 'visibility': 'visibility', - 'doi': 'doi', - 'publisher': 'publisher', - 'language': 'language', - 'license': 'license', - 'creators': 'creators', - 'created': 'created', - 'container_id': 'container id', - 'database_id': 'database id', - 'query_id': 'query id', - 'query_normalized': 'query_normalized', - 'related': 'related', - 'query_hash': 'query_hash', - 'result_hash': 'result_hash', - 'result_number': 'result_number', - 'publication_day': 'publication_day', - 'publication_month': 'publication_month', - 'publication_year': 'publication_year', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, type=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, language=None, license=None, creators=None, created=None, container_id=None, database_id=None, query_id=None, query_normalized=None, related=None, query_hash=None, result_hash=None, result_number=None, publication_day=None, publication_month=None, publication_year=None, last_modified=None): # noqa: E501 - """IdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._type = None - self._title = None - self._description = None - self._query = None - self._execution = None - self._visibility = None - self._doi = None - self._publisher = None - self._language = None - self._license = None - self._creators = None - self._created = None - self._container_id = None - self._database_id = None - self._query_id = None - self._query_normalized = None - self._related = None - self._query_hash = None - self._result_hash = None - self._result_number = None - self._publication_day = None - self._publication_month = None - self._publication_year = None - self._last_modified = None - self.discriminator = None - if id is not None: - self.id = id - self.type = type - self.title = title - if description is not None: - self.description = description - self.query = query - self.execution = execution - self.visibility = visibility - if doi is not None: - self.doi = doi - if publisher is not None: - self.publisher = publisher - if language is not None: - self.language = language - if license is not None: - self.license = license - self.creators = creators - if created is not None: - self.created = created - self.container_id = container_id - self.database_id = database_id - if query_id is not None: - self.query_id = query_id - self.query_normalized = query_normalized - if related is not None: - self.related = related - self.query_hash = query_hash - self.result_hash = result_hash - self.result_number = result_number - if publication_day is not None: - self.publication_day = publication_day - if publication_month is not None: - self.publication_month = publication_month - self.publication_year = publication_year - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this IdentifierDto. # noqa: E501 - - - :return: The id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this IdentifierDto. - - - :param id: The id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._id = id - - @property - def type(self): - """Gets the type of this IdentifierDto. # noqa: E501 - - - :return: The type of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this IdentifierDto. - - - :param type: The type of this IdentifierDto. # noqa: E501 - :type: str - """ - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["database", "subset"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def title(self): - """Gets the title of this IdentifierDto. # noqa: E501 - - - :return: The title of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this IdentifierDto. - - - :param title: The title of this IdentifierDto. # noqa: E501 - :type: str - """ - if title is None: - raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 - - self._title = title - - @property - def description(self): - """Gets the description of this IdentifierDto. # noqa: E501 - - - :return: The description of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this IdentifierDto. - - - :param description: The description of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def query(self): - """Gets the query of this IdentifierDto. # noqa: E501 - - - :return: The query of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query - - @query.setter - def query(self, query): - """Sets the query of this IdentifierDto. - - - :param query: The query of this IdentifierDto. # 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 execution(self): - """Gets the execution of this IdentifierDto. # noqa: E501 - - - :return: The execution of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._execution - - @execution.setter - def execution(self, execution): - """Sets the execution of this IdentifierDto. - - - :param execution: The execution of this IdentifierDto. # noqa: E501 - :type: datetime - """ - if execution is None: - raise ValueError("Invalid value for `execution`, must not be `None`") # noqa: E501 - - self._execution = execution - - @property - def visibility(self): - """Gets the visibility of this IdentifierDto. # noqa: E501 - - - :return: The visibility of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._visibility - - @visibility.setter - def visibility(self, visibility): - """Sets the visibility of this IdentifierDto. - - - :param visibility: The visibility of this IdentifierDto. # noqa: E501 - :type: str - """ - if visibility is None: - raise ValueError("Invalid value for `visibility`, must not be `None`") # noqa: E501 - allowed_values = ["everyone", "self"] # noqa: E501 - if visibility not in allowed_values: - raise ValueError( - "Invalid value for `visibility` ({0}), must be one of {1}" # noqa: E501 - .format(visibility, allowed_values) - ) - - self._visibility = visibility - - @property - def doi(self): - """Gets the doi of this IdentifierDto. # noqa: E501 - - - :return: The doi of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._doi - - @doi.setter - def doi(self, doi): - """Sets the doi of this IdentifierDto. - - - :param doi: The doi of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._doi = doi - - @property - def publisher(self): - """Gets the publisher of this IdentifierDto. # noqa: E501 - - - :return: The publisher of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._publisher - - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this IdentifierDto. - - - :param publisher: The publisher of this IdentifierDto. # noqa: E501 - :type: str - """ - - self._publisher = publisher - - @property - def language(self): - """Gets the language of this IdentifierDto. # noqa: E501 - - - :return: The language of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._language - - @language.setter - def language(self, language): - """Sets the language of this IdentifierDto. - - - :param language: The language of this IdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["ab", "aa", "af", "ak", "sq", "am", "ar", "an", "hy", "as", "av", "ae", "ay", "az", "bm", "ba", "eu", "be", "bn", "bh", "bi", "bs", "br", "bg", "my", "ca", "km", "ch", "ce", "ny", "zh", "cu", "cv", "kw", "co", "cr", "hr", "cs", "da", "dv", "nl", "dz", "en", "eo", "et", "ee", "fo", "fj", "fi", "fr", "ff", "gd", "gl", "lg", "ka", "de", "ki", "el", "kl", "gn", "gu", "ht", "ha", "he", "hz", "hi", "ho", "hu", "is", "io", "ig", "id", "ia", "ie", "iu", "ik", "ga", "it", "ja", "jv", "kn", "kr", "ks", "kk", "rw", "kv", "kg", "ko", "kj", "ku", "ky", "lo", "la", "lv", "lb", "li", "ln", "lt", "lu", "mk", "mg", "ms", "ml", "mt", "gv", "mi", "mr", "mh", "ro", "mn", "na", "nv", "nd", "ng", "ne", "se", "no", "nb", "nn", "ii", "oc", "oj", "or", "om", "os", "pi", "pa", "ps", "fa", "pl", "pt", "qu", "rm", "rn", "ru", "sm", "sg", "sa", "sc", "sr", "sn", "sd", "si", "sk", "sl", "so", "st", "nr", "es", "su", "sw", "ss", "sv", "tl", "ty", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tn", "tr", "tk", "tw", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "cy", "fy", "wo", "xh", "yi", "yo", "za", "zu"] # noqa: E501 - if language not in allowed_values: - raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) - ) - - self._language = language - - @property - def license(self): - """Gets the license of this IdentifierDto. # noqa: E501 - - - :return: The license of this IdentifierDto. # noqa: E501 - :rtype: LicenseDto - """ - return self._license - - @license.setter - def license(self, license): - """Sets the license of this IdentifierDto. - - - :param license: The license of this IdentifierDto. # noqa: E501 - :type: LicenseDto - """ - - self._license = license - - @property - def creators(self): - """Gets the creators of this IdentifierDto. # noqa: E501 - - - :return: The creators of this IdentifierDto. # noqa: E501 - :rtype: list[CreatorDto] - """ - return self._creators - - @creators.setter - def creators(self, creators): - """Sets the creators of this IdentifierDto. - - - :param creators: The creators of this IdentifierDto. # noqa: E501 - :type: list[CreatorDto] - """ - if creators is None: - raise ValueError("Invalid value for `creators`, must not be `None`") # noqa: E501 - - self._creators = creators - - @property - def created(self): - """Gets the created of this IdentifierDto. # noqa: E501 - - - :return: The created of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this IdentifierDto. - - - :param created: The created of this IdentifierDto. # noqa: E501 - :type: datetime - """ - - self._created = created - - @property - def container_id(self): - """Gets the container_id of this IdentifierDto. # noqa: E501 - - - :return: The container_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._container_id - - @container_id.setter - def container_id(self, container_id): - """Sets the container_id of this IdentifierDto. - - - :param container_id: The container_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if container_id is None: - raise ValueError("Invalid value for `container_id`, must not be `None`") # noqa: E501 - - self._container_id = container_id - - @property - def database_id(self): - """Gets the database_id of this IdentifierDto. # noqa: E501 - - - :return: The database_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._database_id - - @database_id.setter - def database_id(self, database_id): - """Sets the database_id of this IdentifierDto. - - - :param database_id: The database_id of this IdentifierDto. # noqa: E501 - :type: int - """ - if database_id is None: - raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - - self._database_id = database_id - - @property - def query_id(self): - """Gets the query_id of this IdentifierDto. # noqa: E501 - - - :return: The query_id of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._query_id - - @query_id.setter - def query_id(self, query_id): - """Sets the query_id of this IdentifierDto. - - - :param query_id: The query_id of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._query_id = query_id - - @property - def query_normalized(self): - """Gets the query_normalized of this IdentifierDto. # noqa: E501 - - - :return: The query_normalized of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_normalized - - @query_normalized.setter - def query_normalized(self, query_normalized): - """Sets the query_normalized of this IdentifierDto. - - - :param query_normalized: The query_normalized of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_normalized is None: - raise ValueError("Invalid value for `query_normalized`, must not be `None`") # noqa: E501 - - self._query_normalized = query_normalized - - @property - def related(self): - """Gets the related of this IdentifierDto. # noqa: E501 - - - :return: The related of this IdentifierDto. # noqa: E501 - :rtype: list[RelatedIdentifierDto] - """ - return self._related - - @related.setter - def related(self, related): - """Sets the related of this IdentifierDto. - - - :param related: The related of this IdentifierDto. # noqa: E501 - :type: list[RelatedIdentifierDto] - """ - - self._related = related - - @property - def query_hash(self): - """Gets the query_hash of this IdentifierDto. # noqa: E501 - - query hash in sha512 # noqa: E501 - - :return: The query_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._query_hash - - @query_hash.setter - def query_hash(self, query_hash): - """Sets the query_hash of this IdentifierDto. - - query hash in sha512 # noqa: E501 - - :param query_hash: The query_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if query_hash is None: - raise ValueError("Invalid value for `query_hash`, must not be `None`") # noqa: E501 - - self._query_hash = query_hash - - @property - def result_hash(self): - """Gets the result_hash of this IdentifierDto. # noqa: E501 - - - :return: The result_hash of this IdentifierDto. # noqa: E501 - :rtype: str - """ - return self._result_hash - - @result_hash.setter - def result_hash(self, result_hash): - """Sets the result_hash of this IdentifierDto. - - - :param result_hash: The result_hash of this IdentifierDto. # noqa: E501 - :type: str - """ - if result_hash is None: - raise ValueError("Invalid value for `result_hash`, must not be `None`") # noqa: E501 - - self._result_hash = result_hash - - @property - def result_number(self): - """Gets the result_number of this IdentifierDto. # noqa: E501 - - - :return: The result_number of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._result_number - - @result_number.setter - def result_number(self, result_number): - """Sets the result_number of this IdentifierDto. - - - :param result_number: The result_number of this IdentifierDto. # noqa: E501 - :type: int - """ - if result_number is None: - raise ValueError("Invalid value for `result_number`, must not be `None`") # noqa: E501 - - self._result_number = result_number - - @property - def publication_day(self): - """Gets the publication_day of this IdentifierDto. # noqa: E501 - - - :return: The publication_day of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_day - - @publication_day.setter - def publication_day(self, publication_day): - """Sets the publication_day of this IdentifierDto. - - - :param publication_day: The publication_day of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_day = publication_day - - @property - def publication_month(self): - """Gets the publication_month of this IdentifierDto. # noqa: E501 - - - :return: The publication_month of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_month - - @publication_month.setter - def publication_month(self, publication_month): - """Sets the publication_month of this IdentifierDto. - - - :param publication_month: The publication_month of this IdentifierDto. # noqa: E501 - :type: int - """ - - self._publication_month = publication_month - - @property - def publication_year(self): - """Gets the publication_year of this IdentifierDto. # noqa: E501 - - - :return: The publication_year of this IdentifierDto. # noqa: E501 - :rtype: int - """ - return self._publication_year - - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this IdentifierDto. - - - :param publication_year: The publication_year of this IdentifierDto. # noqa: E501 - :type: int - """ - if publication_year is None: - raise ValueError("Invalid value for `publication_year`, must not be `None`") # noqa: E501 - - self._publication_year = publication_year - - @property - def last_modified(self): - """Gets the last_modified of this IdentifierDto. # noqa: E501 - - - :return: The last_modified of this IdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this IdentifierDto. - - - :param last_modified: The last_modified of this IdentifierDto. # 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(IdentifierDto, 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, IdentifierDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/image_brief_dto.py b/swagger/api/api_user/models/image_brief_dto.py deleted file mode 100644 index ad702ef6e10e1253688f9cb6482991408e5a53b6..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/image_brief_dto.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class ImageBriefDto(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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None): # noqa: E501 - """ImageBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self.discriminator = None - self.id = id - self.registry = registry - self.repository = repository - self.tag = tag - - @property - def id(self): - """Gets the id of this ImageBriefDto. # 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 registry(self): - """Gets the registry of this ImageBriefDto. # noqa: E501 - - - :return: The registry of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageBriefDto. - - - :param registry: The registry of this ImageBriefDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageBriefDto. # noqa: E501 - - - :return: The repository of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._repository - - @repository.setter - def repository(self, repository): - """Sets the repository of this ImageBriefDto. - - - :param repository: The repository of this ImageBriefDto. # 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 ImageBriefDto. # noqa: E501 - - - :return: The tag of this ImageBriefDto. # noqa: E501 - :rtype: str - """ - return self._tag - - @tag.setter - def tag(self, tag): - """Sets the tag of this ImageBriefDto. - - - :param tag: The tag of this ImageBriefDto. # noqa: E501 - :type: str - """ - if tag is None: - raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 - - self._tag = tag - - 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(ImageBriefDto, 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, ImageBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/image_date_dto.py b/swagger/api/api_user/models/image_date_dto.py deleted file mode 100644 index 2fb5c70b83867030ca553f7f9976345274c583e2..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/image_date_dto.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_user/models/image_dto.py b/swagger/api/api_user/models/image_dto.py deleted file mode 100644 index 3e0d8092179773cdf2cf2af0c8ac422bcfbc6235..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/image_dto.py +++ /dev/null @@ -1,404 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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', - 'registry': 'str', - 'repository': 'str', - 'tag': 'str', - 'dialect': 'str', - 'hash': 'str', - 'compiled': 'datetime', - 'size': 'int', - 'driver_class': 'str', - 'date_formats': 'list[ImageDateDto]', - 'jdbc_method': 'str', - 'default_port': 'int' - } - - attribute_map = { - 'id': 'id', - 'registry': 'registry', - 'repository': 'repository', - 'tag': 'tag', - 'dialect': 'dialect', - 'hash': 'hash', - 'compiled': 'compiled', - 'size': 'size', - 'driver_class': 'driver_class', - 'date_formats': 'date_formats', - 'jdbc_method': 'jdbc_method', - 'default_port': 'default_port' - } - - def __init__(self, id=None, registry=None, repository=None, tag=None, dialect=None, hash=None, compiled=None, size=None, driver_class=None, date_formats=None, jdbc_method=None, default_port=None): # noqa: E501 - """ImageDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._registry = None - self._repository = None - self._tag = None - self._dialect = None - self._hash = None - self._compiled = None - self._size = None - self._driver_class = None - self._date_formats = None - self._jdbc_method = None - self._default_port = None - self.discriminator = None - self.id = id - self.registry = registry - 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.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 registry(self): - """Gets the registry of this ImageDto. # noqa: E501 - - - :return: The registry of this ImageDto. # noqa: E501 - :rtype: str - """ - return self._registry - - @registry.setter - def registry(self, registry): - """Sets the registry of this ImageDto. - - - :param registry: The registry of this ImageDto. # noqa: E501 - :type: str - """ - if registry is None: - raise ValueError("Invalid value for `registry`, must not be `None`") # noqa: E501 - - self._registry = registry - - @property - def repository(self): - """Gets the repository of this ImageDto. # noqa: E501 - - - :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 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_user/models/license_dto.py b/swagger/api/api_user/models/license_dto.py deleted file mode 100644 index 2dc3f25ff36dde1b4576eba585635c2788fd082f..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/license_dto.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class LicenseDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'identifier': 'str', - 'uri': 'str' - } - - attribute_map = { - 'identifier': 'identifier', - 'uri': 'uri' - } - - def __init__(self, identifier=None, uri=None): # noqa: E501 - """LicenseDto - a model defined in Swagger""" # noqa: E501 - self._identifier = None - self._uri = None - self.discriminator = None - self.identifier = identifier - self.uri = uri - - @property - def identifier(self): - """Gets the identifier of this LicenseDto. # noqa: E501 - - - :return: The identifier of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._identifier - - @identifier.setter - def identifier(self, identifier): - """Sets the identifier of this LicenseDto. - - - :param identifier: The identifier of this LicenseDto. # noqa: E501 - :type: str - """ - if identifier is None: - raise ValueError("Invalid value for `identifier`, must not be `None`") # noqa: E501 - - self._identifier = identifier - - @property - def uri(self): - """Gets the uri of this LicenseDto. # noqa: E501 - - - :return: The uri of this LicenseDto. # noqa: E501 - :rtype: str - """ - return self._uri - - @uri.setter - def uri(self, uri): - """Sets the uri of this LicenseDto. - - - :param uri: The uri of this LicenseDto. # 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(LicenseDto, 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, LicenseDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/related_identifier_dto.py b/swagger/api/api_user/models/related_identifier_dto.py deleted file mode 100644 index 76cb9a398a68a611563d19ac19a568053af51bec..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/related_identifier_dto.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class RelatedIdentifierDto(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', - 'value': 'str', - 'type': 'str', - 'relation': 'str', - 'created': 'datetime', - 'last_modified': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'value': 'value', - 'type': 'type', - 'relation': 'relation', - 'created': 'created', - 'last_modified': 'last_modified' - } - - def __init__(self, id=None, value=None, type=None, relation=None, created=None, last_modified=None): # noqa: E501 - """RelatedIdentifierDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._value = None - self._type = None - self._relation = None - self._created = None - self._last_modified = None - self.discriminator = None - self.id = id - self.value = value - if type is not None: - self.type = type - if relation is not None: - self.relation = relation - self.created = created - if last_modified is not None: - self.last_modified = last_modified - - @property - def id(self): - """Gets the id of this RelatedIdentifierDto. # noqa: E501 - - - :return: The id of this RelatedIdentifierDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this RelatedIdentifierDto. - - - :param id: The id of this RelatedIdentifierDto. # 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 value(self): - """Gets the value of this RelatedIdentifierDto. # noqa: E501 - - - :return: The value of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this RelatedIdentifierDto. - - - :param value: The value of this RelatedIdentifierDto. # 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 RelatedIdentifierDto. # noqa: E501 - - - :return: The type of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RelatedIdentifierDto. - - - :param type: The type of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["DOI", "URL", "URN", "ARK", "arXiv", "bibcode", "EAN13", "EISSN", "Handle", "IGSN", "ISBN", "ISTC", "LISSN", "LSID", "PMID", "PURL", "UPC", "w3id"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def relation(self): - """Gets the relation of this RelatedIdentifierDto. # noqa: E501 - - - :return: The relation of this RelatedIdentifierDto. # noqa: E501 - :rtype: str - """ - return self._relation - - @relation.setter - def relation(self, relation): - """Sets the relation of this RelatedIdentifierDto. - - - :param relation: The relation of this RelatedIdentifierDto. # noqa: E501 - :type: str - """ - allowed_values = ["IsCitedBy", "Cites", "IsSupplementTo", "IsSupplementedBy", "IsContinuedBy", "Continues", "IsDescribedBy", "Describes", "HasMetadata", "IsMetadataFor", "HasVersion", "IsVersionOf", "IsNewVersionOf", "IsPreviousVersionOf", "IsPartOf", "HasPart", "IsPublishedIn", "IsReferencedBy", "References", "IsDocumentedBy", "Documents", "IsCompiledBy", "Compiles", "IsVariantFormOf", "IsOriginalFormOf", "IsIdenticalTo", "IsReviewedBy", "Reviews", "IsDerivedFrom", "IsSourceOf", "IsRequiredBy", "Requires", "IsObsoletedBy", "Obsoletes"] # noqa: E501 - if relation not in allowed_values: - raise ValueError( - "Invalid value for `relation` ({0}), must be one of {1}" # noqa: E501 - .format(relation, allowed_values) - ) - - self._relation = relation - - @property - def created(self): - """Gets the created of this RelatedIdentifierDto. # noqa: E501 - - - :return: The created of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._created - - @created.setter - def created(self, created): - """Sets the created of this RelatedIdentifierDto. - - - :param created: The created of this RelatedIdentifierDto. # 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 last_modified(self): - """Gets the last_modified of this RelatedIdentifierDto. # noqa: E501 - - - :return: The last_modified of this RelatedIdentifierDto. # noqa: E501 - :rtype: datetime - """ - return self._last_modified - - @last_modified.setter - def last_modified(self, last_modified): - """Sets the last_modified of this RelatedIdentifierDto. - - - :param last_modified: The last_modified of this RelatedIdentifierDto. # 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(RelatedIdentifierDto, 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, RelatedIdentifierDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/signup_request_dto.py b/swagger/api/api_user/models/signup_request_dto.py deleted file mode 100644 index 976b0eabb0d7e6849dc2092ea8a76d0815a5a260..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/signup_request_dto.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class SignupRequestDto(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 = { - 'username': 'str', - 'email': 'str', - 'password': 'str' - } - - attribute_map = { - 'username': 'username', - 'email': 'email', - 'password': 'password' - } - - def __init__(self, username=None, email=None, password=None): # noqa: E501 - """SignupRequestDto - a model defined in Swagger""" # noqa: E501 - self._username = None - self._email = None - self._password = None - self.discriminator = None - self.username = username - self.email = email - self.password = password - - @property - def username(self): - """Gets the username of this SignupRequestDto. # noqa: E501 - - - :return: The username of this SignupRequestDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this SignupRequestDto. - - - :param username: The username of this SignupRequestDto. # 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 email(self): - """Gets the email of this SignupRequestDto. # noqa: E501 - - - :return: The email of this SignupRequestDto. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this SignupRequestDto. - - - :param email: The email of this SignupRequestDto. # 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 password(self): - """Gets the password of this SignupRequestDto. # noqa: E501 - - - :return: The password of this SignupRequestDto. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this SignupRequestDto. - - - :param password: The password of this SignupRequestDto. # noqa: E501 - :type: str - """ - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - 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(SignupRequestDto, 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, SignupRequestDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/table_brief_dto.py b/swagger/api/api_user/models/table_brief_dto.py deleted file mode 100644 index 04ad24fd5220ea3c7850f714edc68fe16f055de5..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/table_brief_dto.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TableBriefDto(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', - 'description': 'str', - 'owner': 'UserBriefDto', - 'columns': 'list[ColumnBriefDto]', - 'internal_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'owner': 'owner', - 'columns': 'columns', - 'internal_name': 'internal_name' - } - - def __init__(self, id=None, name=None, description=None, owner=None, columns=None, internal_name=None): # noqa: E501 - """TableBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._owner = None - self._columns = None - self._internal_name = None - self.discriminator = None - self.id = id - self.name = name - self.description = description - self.owner = owner - self.columns = columns - self.internal_name = internal_name - - @property - def id(self): - """Gets the id of this TableBriefDto. # noqa: E501 - - - :return: The id of this TableBriefDto. # noqa: E501 - :rtype: int - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TableBriefDto. - - - :param id: The id of this TableBriefDto. # 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 TableBriefDto. # noqa: E501 - - - :return: The name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TableBriefDto. - - - :param name: The name of this TableBriefDto. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def description(self): - """Gets the description of this TableBriefDto. # noqa: E501 - - - :return: The description of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TableBriefDto. - - - :param description: The description of this TableBriefDto. # noqa: E501 - :type: str - """ - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - - self._description = description - - @property - def owner(self): - """Gets the owner of this TableBriefDto. # noqa: E501 - - - :return: The owner of this TableBriefDto. # noqa: E501 - :rtype: UserBriefDto - """ - return self._owner - - @owner.setter - def owner(self, owner): - """Sets the owner of this TableBriefDto. - - - :param owner: The owner of this TableBriefDto. # noqa: E501 - :type: UserBriefDto - """ - if owner is None: - raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501 - - self._owner = owner - - @property - def 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 - - - :return: The internal_name of this TableBriefDto. # noqa: E501 - :rtype: str - """ - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this TableBriefDto. - - - :param internal_name: The internal_name of this TableBriefDto. # 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 - - 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(TableBriefDto, 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, TableBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/user_attribute_dto.py b/swagger/api/api_user/models/user_attribute_dto.py deleted file mode 100644 index 75779ded04a777c0a03b6ac5b05eed112caf60fe..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/user_attribute_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserAttributeDto(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', - 'value': 'str' - } - - attribute_map = { - 'name': 'name', - 'value': 'value' - } - - def __init__(self, name=None, value=None): # noqa: E501 - """UserAttributeDto - a model defined in Swagger""" # noqa: E501 - self._name = None - self._value = None - self.discriminator = None - if name is not None: - self.name = name - if value is not None: - self.value = value - - @property - def name(self): - """Gets the name of this UserAttributeDto. # noqa: E501 - - - :return: The name of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserAttributeDto. - - - :param name: The name of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def value(self): - """Gets the value of this UserAttributeDto. # noqa: E501 - - - :return: The value of this UserAttributeDto. # noqa: E501 - :rtype: str - """ - return self._value - - @value.setter - def value(self, value): - """Sets the value of this UserAttributeDto. - - - :param value: The value of this UserAttributeDto. # noqa: E501 - :type: str - """ - - self._value = value - - 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(UserAttributeDto, 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, UserAttributeDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/user_brief_dto.py b/swagger/api/api_user/models/user_brief_dto.py deleted file mode 100644 index 4b00f1f0ee669790b80c6d23d7d643366d1e24d3..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/user_brief_dto.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserBriefDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'id': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserBriefDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - if email_verified is not None: - self.email_verified = email_verified - - @property - def id(self): - """Gets the id of this UserBriefDto. # noqa: E501 - - - :return: The id of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this UserBriefDto. - - - :param id: The id of this UserBriefDto. # noqa: E501 - :type: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this UserBriefDto. # noqa: E501 - - Only contains lowercase characters # noqa: E501 - - :return: The username of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._username - - @username.setter - def username(self, username): - """Sets the username of this UserBriefDto. - - Only contains lowercase characters # noqa: E501 - - :param username: The username of this UserBriefDto. # noqa: E501 - :type: str - """ - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - - self._username = username - - @property - def name(self): - """Gets the name of this UserBriefDto. # noqa: E501 - - - :return: The name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserBriefDto. - - - :param name: The name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def orcid(self): - """Gets the orcid of this UserBriefDto. # noqa: E501 - - - :return: The orcid of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserBriefDto. - - - :param orcid: The orcid of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - @property - def given_name(self): - """Gets the given_name of this UserBriefDto. # noqa: E501 - - - :return: The given_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserBriefDto. - - - :param given_name: The given_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserBriefDto. # noqa: E501 - - - :return: The family_name of this UserBriefDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserBriefDto. - - - :param family_name: The family_name of this UserBriefDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @property - def email_verified(self): - """Gets the email_verified of this UserBriefDto. # noqa: E501 - - - :return: The email_verified of this UserBriefDto. # noqa: E501 - :rtype: bool - """ - return self._email_verified - - @email_verified.setter - def email_verified(self, email_verified): - """Sets the email_verified of this UserBriefDto. - - - :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 - :type: bool - """ - - self._email_verified = email_verified - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(UserBriefDto, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UserBriefDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/user_dto.py b/swagger/api/api_user/models/user_dto.py deleted file mode 100644 index bd1f7d94086f1fac6aef91cda31ee7ccc083096e..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/user_dto.py +++ /dev/null @@ -1,402 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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': 'str', - 'username': 'str', - 'name': 'str', - 'orcid': 'str', - 'attributes': 'list[UserAttributeDto]', - 'containers': 'list[ContainerDto]', - 'databases': 'list[ContainerDto]', - 'identifiers': 'list[ContainerDto]', - 'email': 'str', - 'given_name': 'str', - 'family_name': 'str', - 'email_verified': 'bool' - } - - attribute_map = { - 'id': 'id', - 'username': 'username', - 'name': 'name', - 'orcid': 'orcid', - 'attributes': 'attributes', - 'containers': 'containers', - 'databases': 'databases', - 'identifiers': 'identifiers', - 'email': 'email', - 'given_name': 'given_name', - 'family_name': 'family_name', - 'email_verified': 'email_verified' - } - - def __init__(self, id=None, username=None, name=None, orcid=None, attributes=None, containers=None, databases=None, identifiers=None, email=None, given_name=None, family_name=None, email_verified=None): # noqa: E501 - """UserDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._username = None - self._name = None - self._orcid = None - self._attributes = None - self._containers = None - self._databases = None - self._identifiers = None - self._email = None - self._given_name = None - self._family_name = None - self._email_verified = None - self.discriminator = None - self.id = id - self.username = username - if name is not None: - self.name = name - if orcid is not None: - self.orcid = orcid - if attributes is not None: - self.attributes = attributes - 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 given_name is not None: - self.given_name = given_name - if family_name is not None: - self.family_name = family_name - 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: str - """ - 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: str - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - - self._id = id - - @property - def username(self): - """Gets the username of this 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 name(self): - """Gets the name of this UserDto. # noqa: E501 - - - :return: The name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this UserDto. - - - :param name: The name of this UserDto. # noqa: E501 - :type: str - """ - - self._name = name - - @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 attributes(self): - """Gets the attributes of this UserDto. # noqa: E501 - - - :return: The attributes of this UserDto. # noqa: E501 - :rtype: list[UserAttributeDto] - """ - return self._attributes - - @attributes.setter - def attributes(self, attributes): - """Sets the attributes of this UserDto. - - - :param attributes: The attributes of this UserDto. # noqa: E501 - :type: list[UserAttributeDto] - """ - - self._attributes = attributes - - @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 given_name(self): - """Gets the given_name of this UserDto. # noqa: E501 - - - :return: The given_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._given_name - - @given_name.setter - def given_name(self, given_name): - """Sets the given_name of this UserDto. - - - :param given_name: The given_name of this UserDto. # noqa: E501 - :type: str - """ - - self._given_name = given_name - - @property - def family_name(self): - """Gets the family_name of this UserDto. # noqa: E501 - - - :return: The family_name of this UserDto. # noqa: E501 - :rtype: str - """ - return self._family_name - - @family_name.setter - def family_name(self, family_name): - """Sets the family_name of this UserDto. - - - :param family_name: The family_name of this UserDto. # noqa: E501 - :type: str - """ - - self._family_name = family_name - - @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_user/models/user_password_dto.py b/swagger/api/api_user/models/user_password_dto.py deleted file mode 100644 index 201db5ae2c1c3f3b182ff9dfef184379f08821c8..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/user_password_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserPasswordDto(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 = { - 'password': 'str' - } - - attribute_map = { - 'password': 'password' - } - - def __init__(self, password=None): # noqa: E501 - """UserPasswordDto - a model defined in Swagger""" # noqa: E501 - self._password = None - self.discriminator = None - self.password = password - - @property - def password(self): - """Gets the password of this UserPasswordDto. # noqa: E501 - - - :return: The password of this UserPasswordDto. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this UserPasswordDto. - - - :param password: The password of this UserPasswordDto. # noqa: E501 - :type: str - """ - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - - self._password = password - - 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(UserPasswordDto, 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, UserPasswordDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/user_theme_set_dto.py b/swagger/api/api_user/models/user_theme_set_dto.py deleted file mode 100644 index 690a1fe1b0f7357e8ac2d37a046f2bbd74ecdfb6..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/user_theme_set_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserThemeSetDto(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 = { - 'theme_dark': 'bool' - } - - attribute_map = { - 'theme_dark': 'theme_dark' - } - - def __init__(self, theme_dark=None): # noqa: E501 - """UserThemeSetDto - a model defined in Swagger""" # noqa: E501 - self._theme_dark = None - self.discriminator = None - self.theme_dark = theme_dark - - @property - def theme_dark(self): - """Gets the theme_dark of this UserThemeSetDto. # noqa: E501 - - - :return: The theme_dark of this UserThemeSetDto. # noqa: E501 - :rtype: bool - """ - return self._theme_dark - - @theme_dark.setter - def theme_dark(self, theme_dark): - """Sets the theme_dark of this UserThemeSetDto. - - - :param theme_dark: The theme_dark of this UserThemeSetDto. # 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 - - 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(UserThemeSetDto, 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, UserThemeSetDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/user_update_dto.py b/swagger/api/api_user/models/user_update_dto.py deleted file mode 100644 index 13f81268bc84c1c1260f24b531713affccdb0c4b..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/user_update_dto.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UserUpdateDto(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'firstname': 'str', - 'lastname': 'str', - 'affiliation': 'str', - 'orcid': 'str' - } - - attribute_map = { - 'firstname': 'firstname', - 'lastname': 'lastname', - 'affiliation': 'affiliation', - 'orcid': 'orcid' - } - - def __init__(self, firstname=None, lastname=None, affiliation=None, orcid=None): # noqa: E501 - """UserUpdateDto - a model defined in Swagger""" # noqa: E501 - self._firstname = None - self._lastname = None - self._affiliation = None - self._orcid = None - self.discriminator = None - 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 - - @property - def firstname(self): - """Gets the firstname of this UserUpdateDto. # noqa: E501 - - - :return: The firstname of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._firstname - - @firstname.setter - def firstname(self, firstname): - """Sets the firstname of this UserUpdateDto. - - - :param firstname: The firstname of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._firstname = firstname - - @property - def lastname(self): - """Gets the lastname of this UserUpdateDto. # noqa: E501 - - - :return: The lastname of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._lastname - - @lastname.setter - def lastname(self, lastname): - """Sets the lastname of this UserUpdateDto. - - - :param lastname: The lastname of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._lastname = lastname - - @property - def affiliation(self): - """Gets the affiliation of this UserUpdateDto. # noqa: E501 - - - :return: The affiliation of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._affiliation - - @affiliation.setter - def affiliation(self, affiliation): - """Sets the affiliation of this UserUpdateDto. - - - :param affiliation: The affiliation of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._affiliation = affiliation - - @property - def orcid(self): - """Gets the orcid of this UserUpdateDto. # noqa: E501 - - - :return: The orcid of this UserUpdateDto. # noqa: E501 - :rtype: str - """ - return self._orcid - - @orcid.setter - def orcid(self, orcid): - """Sets the orcid of this UserUpdateDto. - - - :param orcid: The orcid of this UserUpdateDto. # noqa: E501 - :type: str - """ - - self._orcid = orcid - - 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(UserUpdateDto, 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, UserUpdateDto): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/swagger/api/api_user/models/view_brief_dto.py b/swagger/api/api_user/models/view_brief_dto.py deleted file mode 100644 index 7f8f8f1b6800e96db63af4f85c9b2cee6001d3c5..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/models/view_brief_dto.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class 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_user/rest.py b/swagger/api/api_user/rest.py deleted file mode 100644 index 14b917c73ac156b3318686503b3fd5507137d9b7..0000000000000000000000000000000000000000 --- a/swagger/api/api_user/rest.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - Database Repository User Service API - - Service that manages the users # noqa: E501 - - OpenAPI spec version: 1.2.0 - Contact: andreas.rauber@tuwien.ac.at - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -import io -import json -import logging -import re -import ssl - -import certifi -# python 2 and python 3 compatibility library -import six -from six.moves.urllib.parse import urlencode - -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') - - -logger = logging.getLogger(__name__) - - -class RESTResponse(io.IOBase): - - def __init__(self, resp): - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_request_timeout) - elif (isinstance(_request_timeout, tuple) and - len(_request_timeout) == 2): - timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1]) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = '{}' - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # log response body - logger.debug("response body: %s", r.data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - -class ApiException(Exception): - - def __init__(self, status=None, reason=None, http_resp=None): - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message