diff --git a/swagger/api-authentication.yaml b/swagger/api-authentication.yaml index 4bbf26e8f89c33608ab5daf523dc7d7cbdfe0494..ed46efa13530a5bf8a5a2375712b65f163882bec 100644 --- a/swagger/api-authentication.yaml +++ b/swagger/api-authentication.yaml @@ -60,9 +60,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/UserDto' - security: - - bearerAuth: [] + $ref: '#/components/schemas/UserBriefDto' put: tags: - user-endpoint @@ -905,33 +903,34 @@ components: type: string ip_address: type: string - is_public: - type: boolean DatabaseDto: required: - - creator - - exchange - - id - - internal_name - - name - - publication_year + - database creator + - database description + - database exchange + - database id + - database internal name + - database name type: object properties: - id: + database id: type: integer format: int64 - name: + example: 1 + database name: type: string - exchange: + example: Weather Australia + database exchange: type: string - creator: + database creator: $ref: '#/components/schemas/UserBriefDto' - subjects: + database subjects: type: array items: type: string - language: + database language: type: string + example: EN enum: - ab - aa @@ -1117,34 +1116,43 @@ components: - yo - za - zu - license: + database license: $ref: '#/components/schemas/LicenseDto' - description: + database description: type: string - publisher: + example: Weather Australia 2009-2021 + database publisher: type: string - contact: + example: TU Wien + database contact person: $ref: '#/components/schemas/UserDto' tables: type: array items: $ref: '#/components/schemas/TableBriefDto' - image: + database container image: $ref: '#/components/schemas/ImageDto' container: $ref: '#/components/schemas/ContainerDto' - created: + database creation time: type: string format: date-time deleted: type: string format: date-time - internal_name: + database internal name: type: string - publication_year: + example: weather_australia + database publication year: + type: integer + format: int32 + database publication month: type: integer format: int32 - is_public: + database publication day: + type: integer + format: int32 + database public: type: boolean GrantedAuthorityDto: type: object @@ -1262,6 +1270,7 @@ components: type: string uri: type: string + example: MIT2 TableBriefDto: required: - creator @@ -1281,6 +1290,7 @@ components: type: string UserBriefDto: required: + - email_verified - id - theme_dark - username @@ -1305,9 +1315,12 @@ components: type: string theme_dark: type: boolean + email_verified: + type: boolean UserDto: required: - email + - email_verified - id - theme_dark - username diff --git a/swagger/api-authentication/swagger_client/api/user_endpoint_api.py b/swagger/api-authentication/swagger_client/api/user_endpoint_api.py index 7fd649489bd349e137030c7fbcdff7dd7b32b3ea..2dbf8f9a85bd1ced7054bae149076257c14a70e4 100644 --- a/swagger/api-authentication/swagger_client/api/user_endpoint_api.py +++ b/swagger/api-authentication/swagger_client/api/user_endpoint_api.py @@ -231,7 +231,7 @@ class UserEndpointApi(object): >>> result = thread.get() :param async_req bool - :return: list[UserDto] + :return: list[UserBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -251,7 +251,7 @@ class UserEndpointApi(object): >>> result = thread.get() :param async_req bool - :return: list[UserDto] + :return: list[UserBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -289,7 +289,7 @@ class UserEndpointApi(object): ['*/*']) # noqa: E501 # Authentication setting - auth_settings = ['bearerAuth'] # noqa: E501 + auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/user', 'GET', @@ -299,7 +299,7 @@ class UserEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='list[UserDto]', # noqa: E501 + 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'), diff --git a/swagger/api-authentication/swagger_client/models/container_dto.py b/swagger/api-authentication/swagger_client/models/container_dto.py index 71a769288040f3fb38230ef7e08120681a04c8c2..30ead8278f5a12958bd17dcac9f08d4527cd9d84 100644 --- a/swagger/api-authentication/swagger_client/models/container_dto.py +++ b/swagger/api-authentication/swagger_client/models/container_dto.py @@ -37,8 +37,7 @@ class ContainerDto(object): 'port': 'int', 'created': 'datetime', 'internal_name': 'str', - 'ip_address': 'str', - 'is_public': 'bool' + 'ip_address': 'str' } attribute_map = { @@ -51,11 +50,10 @@ class ContainerDto(object): 'port': 'port', 'created': 'created', 'internal_name': 'internal_name', - 'ip_address': 'ip_address', - 'is_public': 'is_public' + 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -67,7 +65,6 @@ class ContainerDto(object): self._created = None self._internal_name = None self._ip_address = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -84,8 +81,6 @@ class ContainerDto(object): self.internal_name = internal_name if ip_address is not None: self.ip_address = ip_address - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -313,27 +308,6 @@ class ContainerDto(object): self._ip_address = ip_address - @property - def is_public(self): - """Gets the is_public of this ContainerDto. # noqa: E501 - - - :return: The is_public of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerDto. - - - :param is_public: The is_public of this ContainerDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-authentication/swagger_client/models/database_dto.py b/swagger/api-authentication/swagger_client/models/database_dto.py index baeaf0e46fa9a534e439e687533e6e6e86300d83..6119a4d801d552d4994ae04eae81b457e5c98622 100644 --- a/swagger/api-authentication/swagger_client/models/database_dto.py +++ b/swagger/api-authentication/swagger_client/models/database_dto.py @@ -28,322 +28,334 @@ class DatabaseDto(object): and the value is json key in definition. """ swagger_types = { - 'id': 'int', - 'name': 'str', - 'exchange': 'str', - 'creator': 'UserBriefDto', - 'subjects': 'list[str]', - 'language': 'str', - 'license': 'LicenseDto', - 'description': 'str', - 'publisher': 'str', - 'contact': 'UserDto', + 'database_id': 'int', + 'database_name': 'str', + 'database_exchange': 'str', + 'database_creator': 'UserBriefDto', + 'database_subjects': 'list[str]', + 'database_language': 'str', + 'database_license': 'LicenseDto', + 'database_description': 'str', + 'database_publisher': 'str', + 'database_contact_person': 'UserDto', 'tables': 'list[TableBriefDto]', - 'image': 'ImageDto', + 'database_container_image': 'ImageDto', 'container': 'ContainerDto', - 'created': 'datetime', + 'database_creation_time': 'datetime', 'deleted': 'datetime', - 'internal_name': 'str', - 'publication_year': 'int', - 'is_public': 'bool' + 'database_internal_name': 'str', + 'database_publication_year': 'int', + 'database_publication_month': 'int', + 'database_publication_day': 'int', + 'database_public': 'bool' } attribute_map = { - 'id': 'id', - 'name': 'name', - 'exchange': 'exchange', - 'creator': 'creator', - 'subjects': 'subjects', - 'language': 'language', - 'license': 'license', - 'description': 'description', - 'publisher': 'publisher', - 'contact': 'contact', + 'database_id': 'database id', + 'database_name': 'database name', + 'database_exchange': 'database exchange', + 'database_creator': 'database creator', + 'database_subjects': 'database subjects', + 'database_language': 'database language', + 'database_license': 'database license', + 'database_description': 'database description', + 'database_publisher': 'database publisher', + 'database_contact_person': 'database contact person', 'tables': 'tables', - 'image': 'image', + 'database_container_image': 'database container image', 'container': 'container', - 'created': 'created', + 'database_creation_time': 'database creation time', 'deleted': 'deleted', - 'internal_name': 'internal_name', - 'publication_year': 'publication_year', - 'is_public': 'is_public' + 'database_internal_name': 'database internal name', + 'database_publication_year': 'database publication year', + 'database_publication_month': 'database publication month', + 'database_publication_day': 'database publication day', + 'database_public': 'database public' } - def __init__(self, id=None, name=None, exchange=None, creator=None, subjects=None, language=None, license=None, description=None, publisher=None, contact=None, tables=None, image=None, container=None, created=None, deleted=None, internal_name=None, publication_year=None, is_public=None): # noqa: E501 + def __init__(self, database_id=None, database_name=None, database_exchange=None, database_creator=None, database_subjects=None, database_language=None, database_license=None, database_description=None, database_publisher=None, database_contact_person=None, tables=None, database_container_image=None, container=None, database_creation_time=None, deleted=None, database_internal_name=None, database_publication_year=None, database_publication_month=None, database_publication_day=None, database_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._exchange = None - self._creator = None - self._subjects = None - self._language = None - self._license = None - self._description = None - self._publisher = None - self._contact = None + self._database_id = None + self._database_name = None + self._database_exchange = None + self._database_creator = None + self._database_subjects = None + self._database_language = None + self._database_license = None + self._database_description = None + self._database_publisher = None + self._database_contact_person = None self._tables = None - self._image = None + self._database_container_image = None self._container = None - self._created = None + self._database_creation_time = None self._deleted = None - self._internal_name = None - self._publication_year = None - self._is_public = None + self._database_internal_name = None + self._database_publication_year = None + self._database_publication_month = None + self._database_publication_day = None + self._database_public = None self.discriminator = None - self.id = id - self.name = name - self.exchange = exchange - self.creator = creator - if subjects is not None: - self.subjects = subjects - if language is not None: - self.language = language - if license is not None: - self.license = license - if description is not None: - self.description = description - if publisher is not None: - self.publisher = publisher - if contact is not None: - self.contact = contact + self.database_id = database_id + self.database_name = database_name + self.database_exchange = database_exchange + self.database_creator = database_creator + if database_subjects is not None: + self.database_subjects = database_subjects + if database_language is not None: + self.database_language = database_language + if database_license is not None: + self.database_license = database_license + self.database_description = database_description + if database_publisher is not None: + self.database_publisher = database_publisher + if database_contact_person is not None: + self.database_contact_person = database_contact_person if tables is not None: self.tables = tables - if image is not None: - self.image = image + if database_container_image is not None: + self.database_container_image = database_container_image if container is not None: self.container = container - if created is not None: - self.created = created + if database_creation_time is not None: + self.database_creation_time = database_creation_time if deleted is not None: self.deleted = deleted - self.internal_name = internal_name - self.publication_year = publication_year - if is_public is not None: - self.is_public = is_public + self.database_internal_name = database_internal_name + if database_publication_year is not None: + self.database_publication_year = database_publication_year + if database_publication_month is not None: + self.database_publication_month = database_publication_month + if database_publication_day is not None: + self.database_publication_day = database_publication_day + if database_public is not None: + self.database_public = database_public @property - def id(self): - """Gets the id of this DatabaseDto. # noqa: E501 + def database_id(self): + """Gets the database_id of this DatabaseDto. # noqa: E501 - :return: The id of this DatabaseDto. # noqa: E501 + :return: The database_id of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._id + return self._database_id - @id.setter - def id(self, id): - """Sets the id of this DatabaseDto. + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this DatabaseDto. - :param id: The id of this DatabaseDto. # noqa: E501 + :param database_id: The database_id of this DatabaseDto. # noqa: E501 :type: int """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - self._id = id + self._database_id = database_id @property - def name(self): - """Gets the name of this DatabaseDto. # noqa: E501 + def database_name(self): + """Gets the database_name of this DatabaseDto. # noqa: E501 - :return: The name of this DatabaseDto. # noqa: E501 + :return: The database_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._name + return self._database_name - @name.setter - def name(self, name): - """Sets the name of this DatabaseDto. + @database_name.setter + def database_name(self, database_name): + """Sets the database_name of this DatabaseDto. - :param name: The name of this DatabaseDto. # noqa: E501 + :param database_name: The database_name of this DatabaseDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if database_name is None: + raise ValueError("Invalid value for `database_name`, must not be `None`") # noqa: E501 - self._name = name + self._database_name = database_name @property - def exchange(self): - """Gets the exchange of this DatabaseDto. # noqa: E501 + def database_exchange(self): + """Gets the database_exchange of this DatabaseDto. # noqa: E501 - :return: The exchange of this DatabaseDto. # noqa: E501 + :return: The database_exchange of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._exchange + return self._database_exchange - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this DatabaseDto. + @database_exchange.setter + def database_exchange(self, database_exchange): + """Sets the database_exchange of this DatabaseDto. - :param exchange: The exchange of this DatabaseDto. # noqa: E501 + :param database_exchange: The database_exchange of this DatabaseDto. # noqa: E501 :type: str """ - if exchange is None: - raise ValueError("Invalid value for `exchange`, must not be `None`") # noqa: E501 + if database_exchange is None: + raise ValueError("Invalid value for `database_exchange`, must not be `None`") # noqa: E501 - self._exchange = exchange + self._database_exchange = database_exchange @property - def creator(self): - """Gets the creator of this DatabaseDto. # noqa: E501 + def database_creator(self): + """Gets the database_creator of this DatabaseDto. # noqa: E501 - :return: The creator of this DatabaseDto. # noqa: E501 + :return: The database_creator of this DatabaseDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._database_creator - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseDto. + @database_creator.setter + def database_creator(self, database_creator): + """Sets the database_creator of this DatabaseDto. - :param creator: The creator of this DatabaseDto. # noqa: E501 + :param database_creator: The database_creator of this DatabaseDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if database_creator is None: + raise ValueError("Invalid value for `database_creator`, must not be `None`") # noqa: E501 - self._creator = creator + self._database_creator = database_creator @property - def subjects(self): - """Gets the subjects of this DatabaseDto. # noqa: E501 + def database_subjects(self): + """Gets the database_subjects of this DatabaseDto. # noqa: E501 - :return: The subjects of this DatabaseDto. # noqa: E501 + :return: The database_subjects of this DatabaseDto. # noqa: E501 :rtype: list[str] """ - return self._subjects + return self._database_subjects - @subjects.setter - def subjects(self, subjects): - """Sets the subjects of this DatabaseDto. + @database_subjects.setter + def database_subjects(self, database_subjects): + """Sets the database_subjects of this DatabaseDto. - :param subjects: The subjects of this DatabaseDto. # noqa: E501 + :param database_subjects: The database_subjects of this DatabaseDto. # noqa: E501 :type: list[str] """ - self._subjects = subjects + self._database_subjects = database_subjects @property - def language(self): - """Gets the language of this DatabaseDto. # noqa: E501 + def database_language(self): + """Gets the database_language of this DatabaseDto. # noqa: E501 - :return: The language of this DatabaseDto. # noqa: E501 + :return: The database_language of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._language + return self._database_language - @language.setter - def language(self, language): - """Sets the language of this DatabaseDto. + @database_language.setter + def database_language(self, database_language): + """Sets the database_language of this DatabaseDto. - :param language: The language of this DatabaseDto. # noqa: E501 + :param database_language: The database_language of this DatabaseDto. # 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: + if database_language not in allowed_values: raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) + "Invalid value for `database_language` ({0}), must be one of {1}" # noqa: E501 + .format(database_language, allowed_values) ) - self._language = language + self._database_language = database_language @property - def license(self): - """Gets the license of this DatabaseDto. # noqa: E501 + def database_license(self): + """Gets the database_license of this DatabaseDto. # noqa: E501 - :return: The license of this DatabaseDto. # noqa: E501 + :return: The database_license of this DatabaseDto. # noqa: E501 :rtype: LicenseDto """ - return self._license + return self._database_license - @license.setter - def license(self, license): - """Sets the license of this DatabaseDto. + @database_license.setter + def database_license(self, database_license): + """Sets the database_license of this DatabaseDto. - :param license: The license of this DatabaseDto. # noqa: E501 + :param database_license: The database_license of this DatabaseDto. # noqa: E501 :type: LicenseDto """ - self._license = license + self._database_license = database_license @property - def description(self): - """Gets the description of this DatabaseDto. # noqa: E501 + def database_description(self): + """Gets the database_description of this DatabaseDto. # noqa: E501 - :return: The description of this DatabaseDto. # noqa: E501 + :return: The database_description of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._description + return self._database_description - @description.setter - def description(self, description): - """Sets the description of this DatabaseDto. + @database_description.setter + def database_description(self, database_description): + """Sets the database_description of this DatabaseDto. - :param description: The description of this DatabaseDto. # noqa: E501 + :param database_description: The database_description of this DatabaseDto. # noqa: E501 :type: str """ + if database_description is None: + raise ValueError("Invalid value for `database_description`, must not be `None`") # noqa: E501 - self._description = description + self._database_description = database_description @property - def publisher(self): - """Gets the publisher of this DatabaseDto. # noqa: E501 + def database_publisher(self): + """Gets the database_publisher of this DatabaseDto. # noqa: E501 - :return: The publisher of this DatabaseDto. # noqa: E501 + :return: The database_publisher of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._publisher + return self._database_publisher - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this DatabaseDto. + @database_publisher.setter + def database_publisher(self, database_publisher): + """Sets the database_publisher of this DatabaseDto. - :param publisher: The publisher of this DatabaseDto. # noqa: E501 + :param database_publisher: The database_publisher of this DatabaseDto. # noqa: E501 :type: str """ - self._publisher = publisher + self._database_publisher = database_publisher @property - def contact(self): - """Gets the contact of this DatabaseDto. # noqa: E501 + def database_contact_person(self): + """Gets the database_contact_person of this DatabaseDto. # noqa: E501 - :return: The contact of this DatabaseDto. # noqa: E501 + :return: The database_contact_person of this DatabaseDto. # noqa: E501 :rtype: UserDto """ - return self._contact + return self._database_contact_person - @contact.setter - def contact(self, contact): - """Sets the contact of this DatabaseDto. + @database_contact_person.setter + def database_contact_person(self, database_contact_person): + """Sets the database_contact_person of this DatabaseDto. - :param contact: The contact of this DatabaseDto. # noqa: E501 + :param database_contact_person: The database_contact_person of this DatabaseDto. # noqa: E501 :type: UserDto """ - self._contact = contact + self._database_contact_person = database_contact_person @property def tables(self): @@ -367,25 +379,25 @@ class DatabaseDto(object): self._tables = tables @property - def image(self): - """Gets the image of this DatabaseDto. # noqa: E501 + def database_container_image(self): + """Gets the database_container_image of this DatabaseDto. # noqa: E501 - :return: The image of this DatabaseDto. # noqa: E501 + :return: The database_container_image of this DatabaseDto. # noqa: E501 :rtype: ImageDto """ - return self._image + return self._database_container_image - @image.setter - def image(self, image): - """Sets the image of this DatabaseDto. + @database_container_image.setter + def database_container_image(self, database_container_image): + """Sets the database_container_image of this DatabaseDto. - :param image: The image of this DatabaseDto. # noqa: E501 + :param database_container_image: The database_container_image of this DatabaseDto. # noqa: E501 :type: ImageDto """ - self._image = image + self._database_container_image = database_container_image @property def container(self): @@ -409,25 +421,25 @@ class DatabaseDto(object): self._container = container @property - def created(self): - """Gets the created of this DatabaseDto. # noqa: E501 + def database_creation_time(self): + """Gets the database_creation_time of this DatabaseDto. # noqa: E501 - :return: The created of this DatabaseDto. # noqa: E501 + :return: The database_creation_time of this DatabaseDto. # noqa: E501 :rtype: datetime """ - return self._created + return self._database_creation_time - @created.setter - def created(self, created): - """Sets the created of this DatabaseDto. + @database_creation_time.setter + def database_creation_time(self, database_creation_time): + """Sets the database_creation_time of this DatabaseDto. - :param created: The created of this DatabaseDto. # noqa: E501 + :param database_creation_time: The database_creation_time of this DatabaseDto. # noqa: E501 :type: datetime """ - self._created = created + self._database_creation_time = database_creation_time @property def deleted(self): @@ -451,71 +463,111 @@ class DatabaseDto(object): self._deleted = deleted @property - def internal_name(self): - """Gets the internal_name of this DatabaseDto. # noqa: E501 + def database_internal_name(self): + """Gets the database_internal_name of this DatabaseDto. # noqa: E501 - :return: The internal_name of this DatabaseDto. # noqa: E501 + :return: The database_internal_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._internal_name + return self._database_internal_name - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this DatabaseDto. + @database_internal_name.setter + def database_internal_name(self, database_internal_name): + """Sets the database_internal_name of this DatabaseDto. - :param internal_name: The internal_name of this DatabaseDto. # noqa: E501 + :param database_internal_name: The database_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 + if database_internal_name is None: + raise ValueError("Invalid value for `database_internal_name`, must not be `None`") # noqa: E501 - self._internal_name = internal_name + self._database_internal_name = database_internal_name @property - def publication_year(self): - """Gets the publication_year of this DatabaseDto. # noqa: E501 + def database_publication_year(self): + """Gets the database_publication_year of this DatabaseDto. # noqa: E501 - :return: The publication_year of this DatabaseDto. # noqa: E501 + :return: The database_publication_year of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._publication_year + return self._database_publication_year - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this DatabaseDto. + @database_publication_year.setter + def database_publication_year(self, database_publication_year): + """Sets the database_publication_year of this DatabaseDto. - :param publication_year: The publication_year of this DatabaseDto. # noqa: E501 + :param database_publication_year: The database_publication_year of this DatabaseDto. # 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 + self._database_publication_year = database_publication_year @property - def is_public(self): - """Gets the is_public of this DatabaseDto. # noqa: E501 + def database_publication_month(self): + """Gets the database_publication_month of this DatabaseDto. # noqa: E501 - :return: The is_public of this DatabaseDto. # noqa: E501 + :return: The database_publication_month of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_month + + @database_publication_month.setter + def database_publication_month(self, database_publication_month): + """Sets the database_publication_month of this DatabaseDto. + + + :param database_publication_month: The database_publication_month of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_month = database_publication_month + + @property + def database_publication_day(self): + """Gets the database_publication_day of this DatabaseDto. # noqa: E501 + + + :return: The database_publication_day of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_day + + @database_publication_day.setter + def database_publication_day(self, database_publication_day): + """Sets the database_publication_day of this DatabaseDto. + + + :param database_publication_day: The database_publication_day of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_day = database_publication_day + + @property + def database_public(self): + """Gets the database_public of this DatabaseDto. # noqa: E501 + + + :return: The database_public of this DatabaseDto. # noqa: E501 :rtype: bool """ - return self._is_public + return self._database_public - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseDto. + @database_public.setter + def database_public(self, database_public): + """Sets the database_public of this DatabaseDto. - :param is_public: The is_public of this DatabaseDto. # noqa: E501 + :param database_public: The database_public of this DatabaseDto. # noqa: E501 :type: bool """ - self._is_public = is_public + self._database_public = database_public def to_dict(self): """Returns the model properties as a dict""" diff --git a/swagger/api-authentication/swagger_client/models/user_brief_dto.py b/swagger/api-authentication/swagger_client/models/user_brief_dto.py index 8213de7efc6d744b5e71dc4434fda2cc80898992..7b904d8e7a7eccc8d285001ca74db5346faa06e5 100644 --- a/swagger/api-authentication/swagger_client/models/user_brief_dto.py +++ b/swagger/api-authentication/swagger_client/models/user_brief_dto.py @@ -36,7 +36,8 @@ class UserBriefDto(object): 'orcid': 'str', 'titles_before': 'str', 'titles_after': 'str', - 'theme_dark': 'bool' + 'theme_dark': 'bool', + 'email_verified': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class UserBriefDto(object): 'orcid': 'orcid', 'titles_before': 'titles_before', 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark' + 'theme_dark': 'theme_dark', + 'email_verified': 'email_verified' } - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None): # noqa: E501 + def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 """UserBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._username = None @@ -62,6 +64,7 @@ class UserBriefDto(object): self._titles_before = None self._titles_after = None self._theme_dark = None + self._email_verified = None self.discriminator = None self.id = id self.username = username @@ -78,6 +81,7 @@ class UserBriefDto(object): 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): @@ -274,6 +278,29 @@ class UserBriefDto(object): self._theme_dark = theme_dark + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + if email_verified is None: + raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 + + self._email_verified = email_verified + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-authentication/swagger_client/models/user_dto.py b/swagger/api-authentication/swagger_client/models/user_dto.py index aeaa5c73af87bc9be364275e5f0e22cb7a5fa0b5..88484dad5345dec904944dd18b6d637ada8e7bbb 100644 --- a/swagger/api-authentication/swagger_client/models/user_dto.py +++ b/swagger/api-authentication/swagger_client/models/user_dto.py @@ -105,8 +105,7 @@ class UserDto(object): if titles_after is not None: self.titles_after = titles_after self.theme_dark = theme_dark - if email_verified is not None: - self.email_verified = email_verified + self.email_verified = email_verified @property def id(self): @@ -428,6 +427,8 @@ class UserDto(object): :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 diff --git a/swagger/api-container.yaml b/swagger/api-container.yaml index 5a0197df296c73d583f16c44516868fb916b984e..3aa091c70c39f20f3e5416645d91bf6049c8186c 100644 --- a/swagger/api-container.yaml +++ b/swagger/api-container.yaml @@ -43,7 +43,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: Image not found content: '*/*': schema: @@ -61,7 +61,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "200": - description: OK + description: Found some image content: '*/*': schema: @@ -98,7 +98,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: Image not found content: '*/*': schema: @@ -115,8 +115,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK + "202": + description: Updated image content: '*/*': schema: @@ -149,13 +149,13 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: Image not found content: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' "403": - description: Forbidden + description: Unable to delete image content: '*/*': schema: @@ -167,7 +167,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "200": - description: OK + description: Deleted image content: '*/*': schema: @@ -370,7 +370,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "200": - description: OK + description: Found images content: '*/*': schema: @@ -402,7 +402,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' "404": - description: Not Found + description: Image not found content: '*/*': schema: @@ -419,8 +419,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK + "201": + description: Created image content: '*/*': schema: @@ -750,10 +750,9 @@ components: format: date-time internal_name: type: string - is_public: - type: boolean UserBriefDto: required: + - email_verified - id - theme_dark - username @@ -778,6 +777,8 @@ components: type: string theme_dark: type: boolean + email_verified: + type: boolean ImageCreateDto: required: - default_port @@ -879,33 +880,34 @@ components: type: string ip_address: type: string - is_public: - type: boolean DatabaseDto: required: - - creator - - exchange - - id - - internal_name - - name - - publication_year + - database creator + - database description + - database exchange + - database id + - database internal name + - database name type: object properties: - id: + database id: type: integer format: int64 - name: + example: 1 + database name: type: string - exchange: + example: Weather Australia + database exchange: type: string - creator: + database creator: $ref: '#/components/schemas/UserBriefDto' - subjects: + database subjects: type: array items: type: string - language: + database language: type: string + example: EN enum: - ab - aa @@ -1091,34 +1093,43 @@ components: - yo - za - zu - license: + database license: $ref: '#/components/schemas/LicenseDto' - description: + database description: type: string - publisher: + example: Weather Australia 2009-2021 + database publisher: type: string - contact: + example: TU Wien + database contact person: $ref: '#/components/schemas/UserDto' tables: type: array items: $ref: '#/components/schemas/TableBriefDto' - image: + database container image: $ref: '#/components/schemas/ImageDto' container: $ref: '#/components/schemas/ContainerDto' - created: + database creation time: type: string format: date-time deleted: type: string format: date-time - internal_name: + database internal name: type: string - publication_year: + example: weather_australia + database publication year: + type: integer + format: int32 + database publication month: + type: integer + format: int32 + database publication day: type: integer format: int32 - is_public: + database public: type: boolean GrantedAuthorityDto: type: object @@ -1135,6 +1146,7 @@ components: type: string uri: type: string + example: MIT2 TableBriefDto: required: - creator @@ -1155,6 +1167,7 @@ components: UserDto: required: - email + - email_verified - id - theme_dark - username diff --git a/swagger/api-container/swagger_client/models/container_brief_dto.py b/swagger/api-container/swagger_client/models/container_brief_dto.py index 658135d4891a777ee6738fc40c0f529de057cb4d..7f3ed360118ec874f2589ed149190f416fdc8216 100644 --- a/swagger/api-container/swagger_client/models/container_brief_dto.py +++ b/swagger/api-container/swagger_client/models/container_brief_dto.py @@ -33,8 +33,7 @@ class ContainerBriefDto(object): 'name': 'str', 'creator': 'UserBriefDto', 'created': 'datetime', - 'internal_name': 'str', - 'is_public': 'bool' + 'internal_name': 'str' } attribute_map = { @@ -43,11 +42,10 @@ class ContainerBriefDto(object): 'name': 'name', 'creator': 'creator', 'created': 'created', - 'internal_name': 'internal_name', - 'is_public': 'is_public' + 'internal_name': 'internal_name' } - def __init__(self, id=None, hash=None, name=None, creator=None, created=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, creator=None, created=None, internal_name=None): # noqa: E501 """ContainerBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -55,7 +53,6 @@ class ContainerBriefDto(object): self._creator = None self._created = None self._internal_name = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -65,8 +62,6 @@ class ContainerBriefDto(object): if created is not None: self.created = created self.internal_name = internal_name - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -202,27 +197,6 @@ class ContainerBriefDto(object): self._internal_name = internal_name - @property - def is_public(self): - """Gets the is_public of this ContainerBriefDto. # noqa: E501 - - - :return: The is_public of this ContainerBriefDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerBriefDto. - - - :param is_public: The is_public of this ContainerBriefDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-container/swagger_client/models/container_dto.py b/swagger/api-container/swagger_client/models/container_dto.py index b0c0216b6a882d95b2a8b9524e3ac2f21fea122f..d5acb90cf9a5ab1b1d1da37f64b71832da32627d 100644 --- a/swagger/api-container/swagger_client/models/container_dto.py +++ b/swagger/api-container/swagger_client/models/container_dto.py @@ -37,8 +37,7 @@ class ContainerDto(object): 'port': 'int', 'created': 'datetime', 'internal_name': 'str', - 'ip_address': 'str', - 'is_public': 'bool' + 'ip_address': 'str' } attribute_map = { @@ -51,11 +50,10 @@ class ContainerDto(object): 'port': 'port', 'created': 'created', 'internal_name': 'internal_name', - 'ip_address': 'ip_address', - 'is_public': 'is_public' + 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -67,7 +65,6 @@ class ContainerDto(object): self._created = None self._internal_name = None self._ip_address = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -84,8 +81,6 @@ class ContainerDto(object): self.internal_name = internal_name if ip_address is not None: self.ip_address = ip_address - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -313,27 +308,6 @@ class ContainerDto(object): self._ip_address = ip_address - @property - def is_public(self): - """Gets the is_public of this ContainerDto. # noqa: E501 - - - :return: The is_public of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerDto. - - - :param is_public: The is_public of this ContainerDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-container/swagger_client/models/database_dto.py b/swagger/api-container/swagger_client/models/database_dto.py index 0aa1b92b3db1bf2fd768ccff07f61361a4a56f21..95e967060fc4db7b769e9d3d3ebf7b6d63e22997 100644 --- a/swagger/api-container/swagger_client/models/database_dto.py +++ b/swagger/api-container/swagger_client/models/database_dto.py @@ -28,322 +28,334 @@ class DatabaseDto(object): and the value is json key in definition. """ swagger_types = { - 'id': 'int', - 'name': 'str', - 'exchange': 'str', - 'creator': 'UserBriefDto', - 'subjects': 'list[str]', - 'language': 'str', - 'license': 'LicenseDto', - 'description': 'str', - 'publisher': 'str', - 'contact': 'UserDto', + 'database_id': 'int', + 'database_name': 'str', + 'database_exchange': 'str', + 'database_creator': 'UserBriefDto', + 'database_subjects': 'list[str]', + 'database_language': 'str', + 'database_license': 'LicenseDto', + 'database_description': 'str', + 'database_publisher': 'str', + 'database_contact_person': 'UserDto', 'tables': 'list[TableBriefDto]', - 'image': 'ImageDto', + 'database_container_image': 'ImageDto', 'container': 'ContainerDto', - 'created': 'datetime', + 'database_creation_time': 'datetime', 'deleted': 'datetime', - 'internal_name': 'str', - 'publication_year': 'int', - 'is_public': 'bool' + 'database_internal_name': 'str', + 'database_publication_year': 'int', + 'database_publication_month': 'int', + 'database_publication_day': 'int', + 'database_public': 'bool' } attribute_map = { - 'id': 'id', - 'name': 'name', - 'exchange': 'exchange', - 'creator': 'creator', - 'subjects': 'subjects', - 'language': 'language', - 'license': 'license', - 'description': 'description', - 'publisher': 'publisher', - 'contact': 'contact', + 'database_id': 'database id', + 'database_name': 'database name', + 'database_exchange': 'database exchange', + 'database_creator': 'database creator', + 'database_subjects': 'database subjects', + 'database_language': 'database language', + 'database_license': 'database license', + 'database_description': 'database description', + 'database_publisher': 'database publisher', + 'database_contact_person': 'database contact person', 'tables': 'tables', - 'image': 'image', + 'database_container_image': 'database container image', 'container': 'container', - 'created': 'created', + 'database_creation_time': 'database creation time', 'deleted': 'deleted', - 'internal_name': 'internal_name', - 'publication_year': 'publication_year', - 'is_public': 'is_public' + 'database_internal_name': 'database internal name', + 'database_publication_year': 'database publication year', + 'database_publication_month': 'database publication month', + 'database_publication_day': 'database publication day', + 'database_public': 'database public' } - def __init__(self, id=None, name=None, exchange=None, creator=None, subjects=None, language=None, license=None, description=None, publisher=None, contact=None, tables=None, image=None, container=None, created=None, deleted=None, internal_name=None, publication_year=None, is_public=None): # noqa: E501 + def __init__(self, database_id=None, database_name=None, database_exchange=None, database_creator=None, database_subjects=None, database_language=None, database_license=None, database_description=None, database_publisher=None, database_contact_person=None, tables=None, database_container_image=None, container=None, database_creation_time=None, deleted=None, database_internal_name=None, database_publication_year=None, database_publication_month=None, database_publication_day=None, database_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._exchange = None - self._creator = None - self._subjects = None - self._language = None - self._license = None - self._description = None - self._publisher = None - self._contact = None + self._database_id = None + self._database_name = None + self._database_exchange = None + self._database_creator = None + self._database_subjects = None + self._database_language = None + self._database_license = None + self._database_description = None + self._database_publisher = None + self._database_contact_person = None self._tables = None - self._image = None + self._database_container_image = None self._container = None - self._created = None + self._database_creation_time = None self._deleted = None - self._internal_name = None - self._publication_year = None - self._is_public = None + self._database_internal_name = None + self._database_publication_year = None + self._database_publication_month = None + self._database_publication_day = None + self._database_public = None self.discriminator = None - self.id = id - self.name = name - self.exchange = exchange - self.creator = creator - if subjects is not None: - self.subjects = subjects - if language is not None: - self.language = language - if license is not None: - self.license = license - if description is not None: - self.description = description - if publisher is not None: - self.publisher = publisher - if contact is not None: - self.contact = contact + self.database_id = database_id + self.database_name = database_name + self.database_exchange = database_exchange + self.database_creator = database_creator + if database_subjects is not None: + self.database_subjects = database_subjects + if database_language is not None: + self.database_language = database_language + if database_license is not None: + self.database_license = database_license + self.database_description = database_description + if database_publisher is not None: + self.database_publisher = database_publisher + if database_contact_person is not None: + self.database_contact_person = database_contact_person if tables is not None: self.tables = tables - if image is not None: - self.image = image + if database_container_image is not None: + self.database_container_image = database_container_image if container is not None: self.container = container - if created is not None: - self.created = created + if database_creation_time is not None: + self.database_creation_time = database_creation_time if deleted is not None: self.deleted = deleted - self.internal_name = internal_name - self.publication_year = publication_year - if is_public is not None: - self.is_public = is_public + self.database_internal_name = database_internal_name + if database_publication_year is not None: + self.database_publication_year = database_publication_year + if database_publication_month is not None: + self.database_publication_month = database_publication_month + if database_publication_day is not None: + self.database_publication_day = database_publication_day + if database_public is not None: + self.database_public = database_public @property - def id(self): - """Gets the id of this DatabaseDto. # noqa: E501 + def database_id(self): + """Gets the database_id of this DatabaseDto. # noqa: E501 - :return: The id of this DatabaseDto. # noqa: E501 + :return: The database_id of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._id + return self._database_id - @id.setter - def id(self, id): - """Sets the id of this DatabaseDto. + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this DatabaseDto. - :param id: The id of this DatabaseDto. # noqa: E501 + :param database_id: The database_id of this DatabaseDto. # noqa: E501 :type: int """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - self._id = id + self._database_id = database_id @property - def name(self): - """Gets the name of this DatabaseDto. # noqa: E501 + def database_name(self): + """Gets the database_name of this DatabaseDto. # noqa: E501 - :return: The name of this DatabaseDto. # noqa: E501 + :return: The database_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._name + return self._database_name - @name.setter - def name(self, name): - """Sets the name of this DatabaseDto. + @database_name.setter + def database_name(self, database_name): + """Sets the database_name of this DatabaseDto. - :param name: The name of this DatabaseDto. # noqa: E501 + :param database_name: The database_name of this DatabaseDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if database_name is None: + raise ValueError("Invalid value for `database_name`, must not be `None`") # noqa: E501 - self._name = name + self._database_name = database_name @property - def exchange(self): - """Gets the exchange of this DatabaseDto. # noqa: E501 + def database_exchange(self): + """Gets the database_exchange of this DatabaseDto. # noqa: E501 - :return: The exchange of this DatabaseDto. # noqa: E501 + :return: The database_exchange of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._exchange + return self._database_exchange - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this DatabaseDto. + @database_exchange.setter + def database_exchange(self, database_exchange): + """Sets the database_exchange of this DatabaseDto. - :param exchange: The exchange of this DatabaseDto. # noqa: E501 + :param database_exchange: The database_exchange of this DatabaseDto. # noqa: E501 :type: str """ - if exchange is None: - raise ValueError("Invalid value for `exchange`, must not be `None`") # noqa: E501 + if database_exchange is None: + raise ValueError("Invalid value for `database_exchange`, must not be `None`") # noqa: E501 - self._exchange = exchange + self._database_exchange = database_exchange @property - def creator(self): - """Gets the creator of this DatabaseDto. # noqa: E501 + def database_creator(self): + """Gets the database_creator of this DatabaseDto. # noqa: E501 - :return: The creator of this DatabaseDto. # noqa: E501 + :return: The database_creator of this DatabaseDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._database_creator - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseDto. + @database_creator.setter + def database_creator(self, database_creator): + """Sets the database_creator of this DatabaseDto. - :param creator: The creator of this DatabaseDto. # noqa: E501 + :param database_creator: The database_creator of this DatabaseDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if database_creator is None: + raise ValueError("Invalid value for `database_creator`, must not be `None`") # noqa: E501 - self._creator = creator + self._database_creator = database_creator @property - def subjects(self): - """Gets the subjects of this DatabaseDto. # noqa: E501 + def database_subjects(self): + """Gets the database_subjects of this DatabaseDto. # noqa: E501 - :return: The subjects of this DatabaseDto. # noqa: E501 + :return: The database_subjects of this DatabaseDto. # noqa: E501 :rtype: list[str] """ - return self._subjects + return self._database_subjects - @subjects.setter - def subjects(self, subjects): - """Sets the subjects of this DatabaseDto. + @database_subjects.setter + def database_subjects(self, database_subjects): + """Sets the database_subjects of this DatabaseDto. - :param subjects: The subjects of this DatabaseDto. # noqa: E501 + :param database_subjects: The database_subjects of this DatabaseDto. # noqa: E501 :type: list[str] """ - self._subjects = subjects + self._database_subjects = database_subjects @property - def language(self): - """Gets the language of this DatabaseDto. # noqa: E501 + def database_language(self): + """Gets the database_language of this DatabaseDto. # noqa: E501 - :return: The language of this DatabaseDto. # noqa: E501 + :return: The database_language of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._language + return self._database_language - @language.setter - def language(self, language): - """Sets the language of this DatabaseDto. + @database_language.setter + def database_language(self, database_language): + """Sets the database_language of this DatabaseDto. - :param language: The language of this DatabaseDto. # noqa: E501 + :param database_language: The database_language of this DatabaseDto. # 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: + if database_language not in allowed_values: raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) + "Invalid value for `database_language` ({0}), must be one of {1}" # noqa: E501 + .format(database_language, allowed_values) ) - self._language = language + self._database_language = database_language @property - def license(self): - """Gets the license of this DatabaseDto. # noqa: E501 + def database_license(self): + """Gets the database_license of this DatabaseDto. # noqa: E501 - :return: The license of this DatabaseDto. # noqa: E501 + :return: The database_license of this DatabaseDto. # noqa: E501 :rtype: LicenseDto """ - return self._license + return self._database_license - @license.setter - def license(self, license): - """Sets the license of this DatabaseDto. + @database_license.setter + def database_license(self, database_license): + """Sets the database_license of this DatabaseDto. - :param license: The license of this DatabaseDto. # noqa: E501 + :param database_license: The database_license of this DatabaseDto. # noqa: E501 :type: LicenseDto """ - self._license = license + self._database_license = database_license @property - def description(self): - """Gets the description of this DatabaseDto. # noqa: E501 + def database_description(self): + """Gets the database_description of this DatabaseDto. # noqa: E501 - :return: The description of this DatabaseDto. # noqa: E501 + :return: The database_description of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._description + return self._database_description - @description.setter - def description(self, description): - """Sets the description of this DatabaseDto. + @database_description.setter + def database_description(self, database_description): + """Sets the database_description of this DatabaseDto. - :param description: The description of this DatabaseDto. # noqa: E501 + :param database_description: The database_description of this DatabaseDto. # noqa: E501 :type: str """ + if database_description is None: + raise ValueError("Invalid value for `database_description`, must not be `None`") # noqa: E501 - self._description = description + self._database_description = database_description @property - def publisher(self): - """Gets the publisher of this DatabaseDto. # noqa: E501 + def database_publisher(self): + """Gets the database_publisher of this DatabaseDto. # noqa: E501 - :return: The publisher of this DatabaseDto. # noqa: E501 + :return: The database_publisher of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._publisher + return self._database_publisher - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this DatabaseDto. + @database_publisher.setter + def database_publisher(self, database_publisher): + """Sets the database_publisher of this DatabaseDto. - :param publisher: The publisher of this DatabaseDto. # noqa: E501 + :param database_publisher: The database_publisher of this DatabaseDto. # noqa: E501 :type: str """ - self._publisher = publisher + self._database_publisher = database_publisher @property - def contact(self): - """Gets the contact of this DatabaseDto. # noqa: E501 + def database_contact_person(self): + """Gets the database_contact_person of this DatabaseDto. # noqa: E501 - :return: The contact of this DatabaseDto. # noqa: E501 + :return: The database_contact_person of this DatabaseDto. # noqa: E501 :rtype: UserDto """ - return self._contact + return self._database_contact_person - @contact.setter - def contact(self, contact): - """Sets the contact of this DatabaseDto. + @database_contact_person.setter + def database_contact_person(self, database_contact_person): + """Sets the database_contact_person of this DatabaseDto. - :param contact: The contact of this DatabaseDto. # noqa: E501 + :param database_contact_person: The database_contact_person of this DatabaseDto. # noqa: E501 :type: UserDto """ - self._contact = contact + self._database_contact_person = database_contact_person @property def tables(self): @@ -367,25 +379,25 @@ class DatabaseDto(object): self._tables = tables @property - def image(self): - """Gets the image of this DatabaseDto. # noqa: E501 + def database_container_image(self): + """Gets the database_container_image of this DatabaseDto. # noqa: E501 - :return: The image of this DatabaseDto. # noqa: E501 + :return: The database_container_image of this DatabaseDto. # noqa: E501 :rtype: ImageDto """ - return self._image + return self._database_container_image - @image.setter - def image(self, image): - """Sets the image of this DatabaseDto. + @database_container_image.setter + def database_container_image(self, database_container_image): + """Sets the database_container_image of this DatabaseDto. - :param image: The image of this DatabaseDto. # noqa: E501 + :param database_container_image: The database_container_image of this DatabaseDto. # noqa: E501 :type: ImageDto """ - self._image = image + self._database_container_image = database_container_image @property def container(self): @@ -409,25 +421,25 @@ class DatabaseDto(object): self._container = container @property - def created(self): - """Gets the created of this DatabaseDto. # noqa: E501 + def database_creation_time(self): + """Gets the database_creation_time of this DatabaseDto. # noqa: E501 - :return: The created of this DatabaseDto. # noqa: E501 + :return: The database_creation_time of this DatabaseDto. # noqa: E501 :rtype: datetime """ - return self._created + return self._database_creation_time - @created.setter - def created(self, created): - """Sets the created of this DatabaseDto. + @database_creation_time.setter + def database_creation_time(self, database_creation_time): + """Sets the database_creation_time of this DatabaseDto. - :param created: The created of this DatabaseDto. # noqa: E501 + :param database_creation_time: The database_creation_time of this DatabaseDto. # noqa: E501 :type: datetime """ - self._created = created + self._database_creation_time = database_creation_time @property def deleted(self): @@ -451,71 +463,111 @@ class DatabaseDto(object): self._deleted = deleted @property - def internal_name(self): - """Gets the internal_name of this DatabaseDto. # noqa: E501 + def database_internal_name(self): + """Gets the database_internal_name of this DatabaseDto. # noqa: E501 - :return: The internal_name of this DatabaseDto. # noqa: E501 + :return: The database_internal_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._internal_name + return self._database_internal_name - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this DatabaseDto. + @database_internal_name.setter + def database_internal_name(self, database_internal_name): + """Sets the database_internal_name of this DatabaseDto. - :param internal_name: The internal_name of this DatabaseDto. # noqa: E501 + :param database_internal_name: The database_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 + if database_internal_name is None: + raise ValueError("Invalid value for `database_internal_name`, must not be `None`") # noqa: E501 - self._internal_name = internal_name + self._database_internal_name = database_internal_name @property - def publication_year(self): - """Gets the publication_year of this DatabaseDto. # noqa: E501 + def database_publication_year(self): + """Gets the database_publication_year of this DatabaseDto. # noqa: E501 - :return: The publication_year of this DatabaseDto. # noqa: E501 + :return: The database_publication_year of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._publication_year + return self._database_publication_year - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this DatabaseDto. + @database_publication_year.setter + def database_publication_year(self, database_publication_year): + """Sets the database_publication_year of this DatabaseDto. - :param publication_year: The publication_year of this DatabaseDto. # noqa: E501 + :param database_publication_year: The database_publication_year of this DatabaseDto. # 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 + self._database_publication_year = database_publication_year @property - def is_public(self): - """Gets the is_public of this DatabaseDto. # noqa: E501 + def database_publication_month(self): + """Gets the database_publication_month of this DatabaseDto. # noqa: E501 - :return: The is_public of this DatabaseDto. # noqa: E501 + :return: The database_publication_month of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_month + + @database_publication_month.setter + def database_publication_month(self, database_publication_month): + """Sets the database_publication_month of this DatabaseDto. + + + :param database_publication_month: The database_publication_month of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_month = database_publication_month + + @property + def database_publication_day(self): + """Gets the database_publication_day of this DatabaseDto. # noqa: E501 + + + :return: The database_publication_day of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_day + + @database_publication_day.setter + def database_publication_day(self, database_publication_day): + """Sets the database_publication_day of this DatabaseDto. + + + :param database_publication_day: The database_publication_day of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_day = database_publication_day + + @property + def database_public(self): + """Gets the database_public of this DatabaseDto. # noqa: E501 + + + :return: The database_public of this DatabaseDto. # noqa: E501 :rtype: bool """ - return self._is_public + return self._database_public - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseDto. + @database_public.setter + def database_public(self, database_public): + """Sets the database_public of this DatabaseDto. - :param is_public: The is_public of this DatabaseDto. # noqa: E501 + :param database_public: The database_public of this DatabaseDto. # noqa: E501 :type: bool """ - self._is_public = is_public + self._database_public = database_public def to_dict(self): """Returns the model properties as a dict""" diff --git a/swagger/api-container/swagger_client/models/user_brief_dto.py b/swagger/api-container/swagger_client/models/user_brief_dto.py index ddb4329455802dba29aedbe33ea4c272e8d0e118..4ca5e34dcb464f9ba974617485f62ba5e74da8f9 100644 --- a/swagger/api-container/swagger_client/models/user_brief_dto.py +++ b/swagger/api-container/swagger_client/models/user_brief_dto.py @@ -36,7 +36,8 @@ class UserBriefDto(object): 'orcid': 'str', 'titles_before': 'str', 'titles_after': 'str', - 'theme_dark': 'bool' + 'theme_dark': 'bool', + 'email_verified': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class UserBriefDto(object): 'orcid': 'orcid', 'titles_before': 'titles_before', 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark' + 'theme_dark': 'theme_dark', + 'email_verified': 'email_verified' } - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None): # noqa: E501 + def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 """UserBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._username = None @@ -62,6 +64,7 @@ class UserBriefDto(object): self._titles_before = None self._titles_after = None self._theme_dark = None + self._email_verified = None self.discriminator = None self.id = id self.username = username @@ -78,6 +81,7 @@ class UserBriefDto(object): 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): @@ -274,6 +278,29 @@ class UserBriefDto(object): self._theme_dark = theme_dark + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + if email_verified is None: + raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 + + self._email_verified = email_verified + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-container/swagger_client/models/user_dto.py b/swagger/api-container/swagger_client/models/user_dto.py index a3713fa5231999159a5fbcbf8272fd68c9b19f83..1d4b0bbf7f7aa3c801b4b2ae734fac286b9a5a87 100644 --- a/swagger/api-container/swagger_client/models/user_dto.py +++ b/swagger/api-container/swagger_client/models/user_dto.py @@ -105,8 +105,7 @@ class UserDto(object): if titles_after is not None: self.titles_after = titles_after self.theme_dark = theme_dark - if email_verified is not None: - self.email_verified = email_verified + self.email_verified = email_verified @property def id(self): @@ -428,6 +427,8 @@ class UserDto(object): :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 diff --git a/swagger/api-database.yaml b/swagger/api-database.yaml index 4bbb23cc5c2c25eee6f6a697aff3e2c3f9f02a43..9130e6a5688b851208fd740b20060ad36149a8e1 100644 --- a/swagger/api-database.yaml +++ b/swagger/api-database.yaml @@ -146,7 +146,7 @@ paths: content: '*/*': schema: - $ref: '#/components/schemas/DatabaseBriefDto' + $ref: '#/components/schemas/DatabaseDto' security: - bearerAuth: [] delete: @@ -212,6 +212,76 @@ paths: type: object security: - bearerAuth: [] + /api/container/{id}/database/{databaseId}/transfer: + put: + tags: + - container-database-endpoint + summary: Update database + operationId: transfer + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseTransferDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DatabaseDto' + security: + - bearerAuth: [] /api/container/{id}/database: get: tags: @@ -477,12 +547,11 @@ components: type: string DatabaseModifyDto: required: + - database publication year - description - - is_public - - publication_year type: object properties: - subject: + subjects: type: array items: type: string @@ -679,9 +748,17 @@ components: - yo - za - zu - is_public: - type: boolean - publication_year: + database publication year: + type: integer + format: int32 + publication_month: + maximum: 12 + minimum: 1 + type: integer + format: int32 + publication_day: + maximum: 31 + minimum: 1 type: integer format: int32 contact_person: @@ -696,93 +773,6 @@ components: type: string uri: type: string - ContainerBriefDto: - required: - - hash - - id - - internal_name - - name - type: object - properties: - id: - type: integer - format: int64 - hash: - type: string - name: - type: string - creator: - $ref: '#/components/schemas/UserBriefDto' - created: - type: string - format: date-time - internal_name: - type: string - is_public: - type: boolean - DatabaseBriefDto: - required: - - id - - name - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - description: - type: string - engine: - type: string - container: - $ref: '#/components/schemas/ContainerBriefDto' - creator: - $ref: '#/components/schemas/UserBriefDto' - created: - type: string - format: date-time - is_public: - type: boolean - UserBriefDto: - required: - - id - - theme_dark - - username - type: object - properties: - id: - type: integer - format: int64 - username: - type: string - firstname: - type: string - lastname: - type: string - affiliation: - type: string - orcid: - type: string - titles_before: - type: string - titles_after: - type: string - theme_dark: - type: boolean - DatabaseCreateDto: - required: - - description - - is_public - - name - type: object - properties: - name: - type: string - description: - type: string - is_public: - type: boolean ContainerDto: required: - created @@ -824,33 +814,34 @@ components: type: string ip_address: type: string - is_public: - type: boolean DatabaseDto: required: - - creator - - exchange - - id - - internal_name - - name - - publication_year + - database creator + - database description + - database exchange + - database id + - database internal name + - database name type: object properties: - id: + database id: type: integer format: int64 - name: + example: 1 + database name: type: string - exchange: + example: Weather Australia + database exchange: type: string - creator: + database creator: $ref: '#/components/schemas/UserBriefDto' - subjects: + database subjects: type: array items: type: string - language: + database language: type: string + example: EN enum: - ab - aa @@ -1036,34 +1027,43 @@ components: - yo - za - zu - license: + database license: $ref: '#/components/schemas/LicenseDto' - description: + database description: type: string - publisher: + example: Weather Australia 2009-2021 + database publisher: type: string - contact: + example: TU Wien + database contact person: $ref: '#/components/schemas/UserDto' tables: type: array items: $ref: '#/components/schemas/TableBriefDto' - image: + database container image: $ref: '#/components/schemas/ImageDto' container: $ref: '#/components/schemas/ContainerDto' - created: + database creation time: type: string format: date-time deleted: type: string format: date-time - internal_name: + database internal name: type: string - publication_year: + example: weather_australia + database publication year: type: integer format: int32 - is_public: + database publication month: + type: integer + format: int32 + database publication day: + type: integer + format: int32 + database public: type: boolean GrantedAuthorityDto: type: object @@ -1188,9 +1188,39 @@ components: $ref: '#/components/schemas/UserBriefDto' internal_name: type: string + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstname: + type: string + lastname: + type: string + affiliation: + type: string + orcid: + type: string + titles_before: + type: string + titles_after: + type: string + theme_dark: + type: boolean + email_verified: + type: boolean UserDto: required: - email + - email_verified - id - theme_dark - username @@ -1235,6 +1265,69 @@ components: type: boolean email_verified: type: boolean + DatabaseTransferDto: + required: + - is_public + type: object + properties: + is_public: + type: boolean + DatabaseCreateDto: + required: + - is_public + - name + type: object + properties: + name: + type: string + is_public: + type: boolean + ContainerBriefDto: + required: + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + name: + type: string + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + internal_name: + type: string + DatabaseBriefDto: + required: + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + description: + type: string + engine: + type: string + container: + $ref: '#/components/schemas/ContainerBriefDto' + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + is_public: + type: boolean securitySchemes: bearerAuth: type: http diff --git a/swagger/api-database/README.md b/swagger/api-database/README.md index bf634e328c7d5ddc35107e39004b34476e3b1961..f1e4e1f36f4054e113a3d326a6bdcbab33436f71 100644 --- a/swagger/api-database/README.md +++ b/swagger/api-database/README.md @@ -102,6 +102,20 @@ except ApiException as e: print("Exception when calling ContainerDatabaseEndpointApi->find_by_id: %s\n" % e) +# create an instance of the API class +api_instance = swagger_client.ContainerDatabaseEndpointApi(swagger_client.ApiClient(configuration)) +body = swagger_client.DatabaseTransferDto() # DatabaseTransferDto | +id = 789 # int | +database_id = 789 # int | + +try: + # Update database + api_response = api_instance.transfer(body, id, database_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ContainerDatabaseEndpointApi->transfer: %s\n" % e) + + # create an instance of the API class api_instance = swagger_client.ContainerDatabaseEndpointApi(swagger_client.ApiClient(configuration)) body = swagger_client.DatabaseModifyDto() # DatabaseModifyDto | @@ -126,6 +140,7 @@ Class | Method | HTTP request | Description *ContainerDatabaseEndpointApi* | [**delete1**](docs/ContainerDatabaseEndpointApi.md#delete1) | **DELETE** /api/container/{id}/database/{databaseId} | Delete some database *ContainerDatabaseEndpointApi* | [**find_all**](docs/ContainerDatabaseEndpointApi.md#find_all) | **GET** /api/container/{id}/database | List databases *ContainerDatabaseEndpointApi* | [**find_by_id**](docs/ContainerDatabaseEndpointApi.md#find_by_id) | **GET** /api/container/{id}/database/{databaseId} | Find some database +*ContainerDatabaseEndpointApi* | [**transfer**](docs/ContainerDatabaseEndpointApi.md#transfer) | **PUT** /api/container/{id}/database/{databaseId}/transfer | Update database *ContainerDatabaseEndpointApi* | [**update**](docs/ContainerDatabaseEndpointApi.md#update) | **PUT** /api/container/{id}/database/{databaseId} | Update database *LicenseEndpointApi* | [**delete**](docs/LicenseEndpointApi.md#delete) | **GET** /api/container/{id}/database/license | Get all licenses @@ -138,6 +153,7 @@ Class | Method | HTTP request | Description - [DatabaseCreateDto](docs/DatabaseCreateDto.md) - [DatabaseDto](docs/DatabaseDto.md) - [DatabaseModifyDto](docs/DatabaseModifyDto.md) + - [DatabaseTransferDto](docs/DatabaseTransferDto.md) - [GrantedAuthorityDto](docs/GrantedAuthorityDto.md) - [ImageBriefDto](docs/ImageBriefDto.md) - [ImageDateDto](docs/ImageDateDto.md) diff --git a/swagger/api-database/swagger_client/__init__.py b/swagger/api-database/swagger_client/__init__.py index 4cd814d5719a1e9f46437451790bd98b3c51af56..38e826da48d705d67c17a4619c360ddff08bcc67 100644 --- a/swagger/api-database/swagger_client/__init__.py +++ b/swagger/api-database/swagger_client/__init__.py @@ -28,6 +28,7 @@ from swagger_client.models.database_brief_dto import DatabaseBriefDto from swagger_client.models.database_create_dto import DatabaseCreateDto from swagger_client.models.database_dto import DatabaseDto from swagger_client.models.database_modify_dto import DatabaseModifyDto +from swagger_client.models.database_transfer_dto import DatabaseTransferDto from swagger_client.models.granted_authority_dto import GrantedAuthorityDto from swagger_client.models.image_brief_dto import ImageBriefDto from swagger_client.models.image_date_dto import ImageDateDto diff --git a/swagger/api-database/swagger_client/api/container_database_endpoint_api.py b/swagger/api-database/swagger_client/api/container_database_endpoint_api.py index 24f3fc40b1eb5c6afb335d5db81aa32580765ec6..a5b3b73744879c2baeb92eccfb670d4cbe9e7b7c 100644 --- a/swagger/api-database/swagger_client/api/container_database_endpoint_api.py +++ b/swagger/api-database/swagger_client/api/container_database_endpoint_api.py @@ -432,6 +432,119 @@ class ContainerDatabaseEndpointApi(object): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def transfer(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.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 + """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.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( + ['*/*']) # 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 update(self, body, id, database_id, **kwargs): # noqa: E501 """Update database # noqa: E501 @@ -444,7 +557,7 @@ class ContainerDatabaseEndpointApi(object): :param DatabaseModifyDto body: (required) :param int id: (required) :param int database_id: (required) - :return: DatabaseBriefDto + :return: DatabaseDto If the method is called asynchronously, returns the request thread. """ @@ -467,7 +580,7 @@ class ContainerDatabaseEndpointApi(object): :param DatabaseModifyDto body: (required) :param int id: (required) :param int database_id: (required) - :return: DatabaseBriefDto + :return: DatabaseDto If the method is called asynchronously, returns the request thread. """ @@ -537,7 +650,7 @@ class ContainerDatabaseEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='DatabaseBriefDto', # noqa: E501 + 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'), diff --git a/swagger/api-database/swagger_client/models/__init__.py b/swagger/api-database/swagger_client/models/__init__.py index 5eb5a2f20ad8023c18facc7a3911582ab7ad6c40..aaab8779487572f1c399450febe7add4da94304d 100644 --- a/swagger/api-database/swagger_client/models/__init__.py +++ b/swagger/api-database/swagger_client/models/__init__.py @@ -21,6 +21,7 @@ from swagger_client.models.database_brief_dto import DatabaseBriefDto from swagger_client.models.database_create_dto import DatabaseCreateDto from swagger_client.models.database_dto import DatabaseDto from swagger_client.models.database_modify_dto import DatabaseModifyDto +from swagger_client.models.database_transfer_dto import DatabaseTransferDto from swagger_client.models.granted_authority_dto import GrantedAuthorityDto from swagger_client.models.image_brief_dto import ImageBriefDto from swagger_client.models.image_date_dto import ImageDateDto diff --git a/swagger/api-database/swagger_client/models/container_brief_dto.py b/swagger/api-database/swagger_client/models/container_brief_dto.py index b7f5933c82c6472ea7370040574169c03edd3150..9ef9e28e3cd2d7733448f381947995b5d7a80b69 100644 --- a/swagger/api-database/swagger_client/models/container_brief_dto.py +++ b/swagger/api-database/swagger_client/models/container_brief_dto.py @@ -33,8 +33,7 @@ class ContainerBriefDto(object): 'name': 'str', 'creator': 'UserBriefDto', 'created': 'datetime', - 'internal_name': 'str', - 'is_public': 'bool' + 'internal_name': 'str' } attribute_map = { @@ -43,11 +42,10 @@ class ContainerBriefDto(object): 'name': 'name', 'creator': 'creator', 'created': 'created', - 'internal_name': 'internal_name', - 'is_public': 'is_public' + 'internal_name': 'internal_name' } - def __init__(self, id=None, hash=None, name=None, creator=None, created=None, internal_name=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, creator=None, created=None, internal_name=None): # noqa: E501 """ContainerBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -55,7 +53,6 @@ class ContainerBriefDto(object): self._creator = None self._created = None self._internal_name = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -65,8 +62,6 @@ class ContainerBriefDto(object): if created is not None: self.created = created self.internal_name = internal_name - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -202,27 +197,6 @@ class ContainerBriefDto(object): self._internal_name = internal_name - @property - def is_public(self): - """Gets the is_public of this ContainerBriefDto. # noqa: E501 - - - :return: The is_public of this ContainerBriefDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerBriefDto. - - - :param is_public: The is_public of this ContainerBriefDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-database/swagger_client/models/container_dto.py b/swagger/api-database/swagger_client/models/container_dto.py index e001f99473d271d4a4be3019a4579931610bbc82..8aec8c1ceebd97e3dc2e757e61b7629d9926ceb6 100644 --- a/swagger/api-database/swagger_client/models/container_dto.py +++ b/swagger/api-database/swagger_client/models/container_dto.py @@ -37,8 +37,7 @@ class ContainerDto(object): 'port': 'int', 'created': 'datetime', 'internal_name': 'str', - 'ip_address': 'str', - 'is_public': 'bool' + 'ip_address': 'str' } attribute_map = { @@ -51,11 +50,10 @@ class ContainerDto(object): 'port': 'port', 'created': 'created', 'internal_name': 'internal_name', - 'ip_address': 'ip_address', - 'is_public': 'is_public' + 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -67,7 +65,6 @@ class ContainerDto(object): self._created = None self._internal_name = None self._ip_address = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -84,8 +81,6 @@ class ContainerDto(object): self.internal_name = internal_name if ip_address is not None: self.ip_address = ip_address - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -313,27 +308,6 @@ class ContainerDto(object): self._ip_address = ip_address - @property - def is_public(self): - """Gets the is_public of this ContainerDto. # noqa: E501 - - - :return: The is_public of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerDto. - - - :param is_public: The is_public of this ContainerDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-database/swagger_client/models/database_create_dto.py b/swagger/api-database/swagger_client/models/database_create_dto.py index a1a6d6bc699759d833b18f43581e7bb96013adc7..abf98982263f239fb5eb2dbe828b874b5e6ef44a 100644 --- a/swagger/api-database/swagger_client/models/database_create_dto.py +++ b/swagger/api-database/swagger_client/models/database_create_dto.py @@ -29,24 +29,20 @@ class DatabaseCreateDto(object): """ swagger_types = { 'name': 'str', - 'description': 'str', 'is_public': 'bool' } attribute_map = { 'name': 'name', - 'description': 'description', 'is_public': 'is_public' } - def __init__(self, name=None, description=None, is_public=None): # noqa: E501 + def __init__(self, name=None, is_public=None): # noqa: E501 """DatabaseCreateDto - a model defined in Swagger""" # noqa: E501 self._name = None - self._description = None self._is_public = None self.discriminator = None self.name = name - self.description = description self.is_public = is_public @property @@ -72,29 +68,6 @@ class DatabaseCreateDto(object): self._name = name - @property - def description(self): - """Gets the description of this DatabaseCreateDto. # noqa: E501 - - - :return: The description of this DatabaseCreateDto. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this DatabaseCreateDto. - - - :param description: The description of this DatabaseCreateDto. # 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 is_public(self): """Gets the is_public of this DatabaseCreateDto. # noqa: E501 diff --git a/swagger/api-database/swagger_client/models/database_dto.py b/swagger/api-database/swagger_client/models/database_dto.py index 52e21473a2256ae38d006e121c8080abecc2b7ad..56899bd1051f4bf6440c22f309aae45d1d9c4e3f 100644 --- a/swagger/api-database/swagger_client/models/database_dto.py +++ b/swagger/api-database/swagger_client/models/database_dto.py @@ -28,322 +28,334 @@ class DatabaseDto(object): and the value is json key in definition. """ swagger_types = { - 'id': 'int', - 'name': 'str', - 'exchange': 'str', - 'creator': 'UserBriefDto', - 'subjects': 'list[str]', - 'language': 'str', - 'license': 'LicenseDto', - 'description': 'str', - 'publisher': 'str', - 'contact': 'UserDto', + 'database_id': 'int', + 'database_name': 'str', + 'database_exchange': 'str', + 'database_creator': 'UserBriefDto', + 'database_subjects': 'list[str]', + 'database_language': 'str', + 'database_license': 'LicenseDto', + 'database_description': 'str', + 'database_publisher': 'str', + 'database_contact_person': 'UserDto', 'tables': 'list[TableBriefDto]', - 'image': 'ImageDto', + 'database_container_image': 'ImageDto', 'container': 'ContainerDto', - 'created': 'datetime', + 'database_creation_time': 'datetime', 'deleted': 'datetime', - 'internal_name': 'str', - 'publication_year': 'int', - 'is_public': 'bool' + 'database_internal_name': 'str', + 'database_publication_year': 'int', + 'database_publication_month': 'int', + 'database_publication_day': 'int', + 'database_public': 'bool' } attribute_map = { - 'id': 'id', - 'name': 'name', - 'exchange': 'exchange', - 'creator': 'creator', - 'subjects': 'subjects', - 'language': 'language', - 'license': 'license', - 'description': 'description', - 'publisher': 'publisher', - 'contact': 'contact', + 'database_id': 'database id', + 'database_name': 'database name', + 'database_exchange': 'database exchange', + 'database_creator': 'database creator', + 'database_subjects': 'database subjects', + 'database_language': 'database language', + 'database_license': 'database license', + 'database_description': 'database description', + 'database_publisher': 'database publisher', + 'database_contact_person': 'database contact person', 'tables': 'tables', - 'image': 'image', + 'database_container_image': 'database container image', 'container': 'container', - 'created': 'created', + 'database_creation_time': 'database creation time', 'deleted': 'deleted', - 'internal_name': 'internal_name', - 'publication_year': 'publication_year', - 'is_public': 'is_public' + 'database_internal_name': 'database internal name', + 'database_publication_year': 'database publication year', + 'database_publication_month': 'database publication month', + 'database_publication_day': 'database publication day', + 'database_public': 'database public' } - def __init__(self, id=None, name=None, exchange=None, creator=None, subjects=None, language=None, license=None, description=None, publisher=None, contact=None, tables=None, image=None, container=None, created=None, deleted=None, internal_name=None, publication_year=None, is_public=None): # noqa: E501 + def __init__(self, database_id=None, database_name=None, database_exchange=None, database_creator=None, database_subjects=None, database_language=None, database_license=None, database_description=None, database_publisher=None, database_contact_person=None, tables=None, database_container_image=None, container=None, database_creation_time=None, deleted=None, database_internal_name=None, database_publication_year=None, database_publication_month=None, database_publication_day=None, database_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._exchange = None - self._creator = None - self._subjects = None - self._language = None - self._license = None - self._description = None - self._publisher = None - self._contact = None + self._database_id = None + self._database_name = None + self._database_exchange = None + self._database_creator = None + self._database_subjects = None + self._database_language = None + self._database_license = None + self._database_description = None + self._database_publisher = None + self._database_contact_person = None self._tables = None - self._image = None + self._database_container_image = None self._container = None - self._created = None + self._database_creation_time = None self._deleted = None - self._internal_name = None - self._publication_year = None - self._is_public = None + self._database_internal_name = None + self._database_publication_year = None + self._database_publication_month = None + self._database_publication_day = None + self._database_public = None self.discriminator = None - self.id = id - self.name = name - self.exchange = exchange - self.creator = creator - if subjects is not None: - self.subjects = subjects - if language is not None: - self.language = language - if license is not None: - self.license = license - if description is not None: - self.description = description - if publisher is not None: - self.publisher = publisher - if contact is not None: - self.contact = contact + self.database_id = database_id + self.database_name = database_name + self.database_exchange = database_exchange + self.database_creator = database_creator + if database_subjects is not None: + self.database_subjects = database_subjects + if database_language is not None: + self.database_language = database_language + if database_license is not None: + self.database_license = database_license + self.database_description = database_description + if database_publisher is not None: + self.database_publisher = database_publisher + if database_contact_person is not None: + self.database_contact_person = database_contact_person if tables is not None: self.tables = tables - if image is not None: - self.image = image + if database_container_image is not None: + self.database_container_image = database_container_image if container is not None: self.container = container - if created is not None: - self.created = created + if database_creation_time is not None: + self.database_creation_time = database_creation_time if deleted is not None: self.deleted = deleted - self.internal_name = internal_name - self.publication_year = publication_year - if is_public is not None: - self.is_public = is_public + self.database_internal_name = database_internal_name + if database_publication_year is not None: + self.database_publication_year = database_publication_year + if database_publication_month is not None: + self.database_publication_month = database_publication_month + if database_publication_day is not None: + self.database_publication_day = database_publication_day + if database_public is not None: + self.database_public = database_public @property - def id(self): - """Gets the id of this DatabaseDto. # noqa: E501 + def database_id(self): + """Gets the database_id of this DatabaseDto. # noqa: E501 - :return: The id of this DatabaseDto. # noqa: E501 + :return: The database_id of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._id + return self._database_id - @id.setter - def id(self, id): - """Sets the id of this DatabaseDto. + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this DatabaseDto. - :param id: The id of this DatabaseDto. # noqa: E501 + :param database_id: The database_id of this DatabaseDto. # noqa: E501 :type: int """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - self._id = id + self._database_id = database_id @property - def name(self): - """Gets the name of this DatabaseDto. # noqa: E501 + def database_name(self): + """Gets the database_name of this DatabaseDto. # noqa: E501 - :return: The name of this DatabaseDto. # noqa: E501 + :return: The database_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._name + return self._database_name - @name.setter - def name(self, name): - """Sets the name of this DatabaseDto. + @database_name.setter + def database_name(self, database_name): + """Sets the database_name of this DatabaseDto. - :param name: The name of this DatabaseDto. # noqa: E501 + :param database_name: The database_name of this DatabaseDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if database_name is None: + raise ValueError("Invalid value for `database_name`, must not be `None`") # noqa: E501 - self._name = name + self._database_name = database_name @property - def exchange(self): - """Gets the exchange of this DatabaseDto. # noqa: E501 + def database_exchange(self): + """Gets the database_exchange of this DatabaseDto. # noqa: E501 - :return: The exchange of this DatabaseDto. # noqa: E501 + :return: The database_exchange of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._exchange + return self._database_exchange - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this DatabaseDto. + @database_exchange.setter + def database_exchange(self, database_exchange): + """Sets the database_exchange of this DatabaseDto. - :param exchange: The exchange of this DatabaseDto. # noqa: E501 + :param database_exchange: The database_exchange of this DatabaseDto. # noqa: E501 :type: str """ - if exchange is None: - raise ValueError("Invalid value for `exchange`, must not be `None`") # noqa: E501 + if database_exchange is None: + raise ValueError("Invalid value for `database_exchange`, must not be `None`") # noqa: E501 - self._exchange = exchange + self._database_exchange = database_exchange @property - def creator(self): - """Gets the creator of this DatabaseDto. # noqa: E501 + def database_creator(self): + """Gets the database_creator of this DatabaseDto. # noqa: E501 - :return: The creator of this DatabaseDto. # noqa: E501 + :return: The database_creator of this DatabaseDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._database_creator - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseDto. + @database_creator.setter + def database_creator(self, database_creator): + """Sets the database_creator of this DatabaseDto. - :param creator: The creator of this DatabaseDto. # noqa: E501 + :param database_creator: The database_creator of this DatabaseDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if database_creator is None: + raise ValueError("Invalid value for `database_creator`, must not be `None`") # noqa: E501 - self._creator = creator + self._database_creator = database_creator @property - def subjects(self): - """Gets the subjects of this DatabaseDto. # noqa: E501 + def database_subjects(self): + """Gets the database_subjects of this DatabaseDto. # noqa: E501 - :return: The subjects of this DatabaseDto. # noqa: E501 + :return: The database_subjects of this DatabaseDto. # noqa: E501 :rtype: list[str] """ - return self._subjects + return self._database_subjects - @subjects.setter - def subjects(self, subjects): - """Sets the subjects of this DatabaseDto. + @database_subjects.setter + def database_subjects(self, database_subjects): + """Sets the database_subjects of this DatabaseDto. - :param subjects: The subjects of this DatabaseDto. # noqa: E501 + :param database_subjects: The database_subjects of this DatabaseDto. # noqa: E501 :type: list[str] """ - self._subjects = subjects + self._database_subjects = database_subjects @property - def language(self): - """Gets the language of this DatabaseDto. # noqa: E501 + def database_language(self): + """Gets the database_language of this DatabaseDto. # noqa: E501 - :return: The language of this DatabaseDto. # noqa: E501 + :return: The database_language of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._language + return self._database_language - @language.setter - def language(self, language): - """Sets the language of this DatabaseDto. + @database_language.setter + def database_language(self, database_language): + """Sets the database_language of this DatabaseDto. - :param language: The language of this DatabaseDto. # noqa: E501 + :param database_language: The database_language of this DatabaseDto. # 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: + if database_language not in allowed_values: raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) + "Invalid value for `database_language` ({0}), must be one of {1}" # noqa: E501 + .format(database_language, allowed_values) ) - self._language = language + self._database_language = database_language @property - def license(self): - """Gets the license of this DatabaseDto. # noqa: E501 + def database_license(self): + """Gets the database_license of this DatabaseDto. # noqa: E501 - :return: The license of this DatabaseDto. # noqa: E501 + :return: The database_license of this DatabaseDto. # noqa: E501 :rtype: LicenseDto """ - return self._license + return self._database_license - @license.setter - def license(self, license): - """Sets the license of this DatabaseDto. + @database_license.setter + def database_license(self, database_license): + """Sets the database_license of this DatabaseDto. - :param license: The license of this DatabaseDto. # noqa: E501 + :param database_license: The database_license of this DatabaseDto. # noqa: E501 :type: LicenseDto """ - self._license = license + self._database_license = database_license @property - def description(self): - """Gets the description of this DatabaseDto. # noqa: E501 + def database_description(self): + """Gets the database_description of this DatabaseDto. # noqa: E501 - :return: The description of this DatabaseDto. # noqa: E501 + :return: The database_description of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._description + return self._database_description - @description.setter - def description(self, description): - """Sets the description of this DatabaseDto. + @database_description.setter + def database_description(self, database_description): + """Sets the database_description of this DatabaseDto. - :param description: The description of this DatabaseDto. # noqa: E501 + :param database_description: The database_description of this DatabaseDto. # noqa: E501 :type: str """ + if database_description is None: + raise ValueError("Invalid value for `database_description`, must not be `None`") # noqa: E501 - self._description = description + self._database_description = database_description @property - def publisher(self): - """Gets the publisher of this DatabaseDto. # noqa: E501 + def database_publisher(self): + """Gets the database_publisher of this DatabaseDto. # noqa: E501 - :return: The publisher of this DatabaseDto. # noqa: E501 + :return: The database_publisher of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._publisher + return self._database_publisher - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this DatabaseDto. + @database_publisher.setter + def database_publisher(self, database_publisher): + """Sets the database_publisher of this DatabaseDto. - :param publisher: The publisher of this DatabaseDto. # noqa: E501 + :param database_publisher: The database_publisher of this DatabaseDto. # noqa: E501 :type: str """ - self._publisher = publisher + self._database_publisher = database_publisher @property - def contact(self): - """Gets the contact of this DatabaseDto. # noqa: E501 + def database_contact_person(self): + """Gets the database_contact_person of this DatabaseDto. # noqa: E501 - :return: The contact of this DatabaseDto. # noqa: E501 + :return: The database_contact_person of this DatabaseDto. # noqa: E501 :rtype: UserDto """ - return self._contact + return self._database_contact_person - @contact.setter - def contact(self, contact): - """Sets the contact of this DatabaseDto. + @database_contact_person.setter + def database_contact_person(self, database_contact_person): + """Sets the database_contact_person of this DatabaseDto. - :param contact: The contact of this DatabaseDto. # noqa: E501 + :param database_contact_person: The database_contact_person of this DatabaseDto. # noqa: E501 :type: UserDto """ - self._contact = contact + self._database_contact_person = database_contact_person @property def tables(self): @@ -367,25 +379,25 @@ class DatabaseDto(object): self._tables = tables @property - def image(self): - """Gets the image of this DatabaseDto. # noqa: E501 + def database_container_image(self): + """Gets the database_container_image of this DatabaseDto. # noqa: E501 - :return: The image of this DatabaseDto. # noqa: E501 + :return: The database_container_image of this DatabaseDto. # noqa: E501 :rtype: ImageDto """ - return self._image + return self._database_container_image - @image.setter - def image(self, image): - """Sets the image of this DatabaseDto. + @database_container_image.setter + def database_container_image(self, database_container_image): + """Sets the database_container_image of this DatabaseDto. - :param image: The image of this DatabaseDto. # noqa: E501 + :param database_container_image: The database_container_image of this DatabaseDto. # noqa: E501 :type: ImageDto """ - self._image = image + self._database_container_image = database_container_image @property def container(self): @@ -409,25 +421,25 @@ class DatabaseDto(object): self._container = container @property - def created(self): - """Gets the created of this DatabaseDto. # noqa: E501 + def database_creation_time(self): + """Gets the database_creation_time of this DatabaseDto. # noqa: E501 - :return: The created of this DatabaseDto. # noqa: E501 + :return: The database_creation_time of this DatabaseDto. # noqa: E501 :rtype: datetime """ - return self._created + return self._database_creation_time - @created.setter - def created(self, created): - """Sets the created of this DatabaseDto. + @database_creation_time.setter + def database_creation_time(self, database_creation_time): + """Sets the database_creation_time of this DatabaseDto. - :param created: The created of this DatabaseDto. # noqa: E501 + :param database_creation_time: The database_creation_time of this DatabaseDto. # noqa: E501 :type: datetime """ - self._created = created + self._database_creation_time = database_creation_time @property def deleted(self): @@ -451,71 +463,111 @@ class DatabaseDto(object): self._deleted = deleted @property - def internal_name(self): - """Gets the internal_name of this DatabaseDto. # noqa: E501 + def database_internal_name(self): + """Gets the database_internal_name of this DatabaseDto. # noqa: E501 - :return: The internal_name of this DatabaseDto. # noqa: E501 + :return: The database_internal_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._internal_name + return self._database_internal_name - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this DatabaseDto. + @database_internal_name.setter + def database_internal_name(self, database_internal_name): + """Sets the database_internal_name of this DatabaseDto. - :param internal_name: The internal_name of this DatabaseDto. # noqa: E501 + :param database_internal_name: The database_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 + if database_internal_name is None: + raise ValueError("Invalid value for `database_internal_name`, must not be `None`") # noqa: E501 - self._internal_name = internal_name + self._database_internal_name = database_internal_name @property - def publication_year(self): - """Gets the publication_year of this DatabaseDto. # noqa: E501 + def database_publication_year(self): + """Gets the database_publication_year of this DatabaseDto. # noqa: E501 - :return: The publication_year of this DatabaseDto. # noqa: E501 + :return: The database_publication_year of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._publication_year + return self._database_publication_year - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this DatabaseDto. + @database_publication_year.setter + def database_publication_year(self, database_publication_year): + """Sets the database_publication_year of this DatabaseDto. - :param publication_year: The publication_year of this DatabaseDto. # noqa: E501 + :param database_publication_year: The database_publication_year of this DatabaseDto. # 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 + self._database_publication_year = database_publication_year @property - def is_public(self): - """Gets the is_public of this DatabaseDto. # noqa: E501 + def database_publication_month(self): + """Gets the database_publication_month of this DatabaseDto. # noqa: E501 - :return: The is_public of this DatabaseDto. # noqa: E501 + :return: The database_publication_month of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_month + + @database_publication_month.setter + def database_publication_month(self, database_publication_month): + """Sets the database_publication_month of this DatabaseDto. + + + :param database_publication_month: The database_publication_month of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_month = database_publication_month + + @property + def database_publication_day(self): + """Gets the database_publication_day of this DatabaseDto. # noqa: E501 + + + :return: The database_publication_day of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_day + + @database_publication_day.setter + def database_publication_day(self, database_publication_day): + """Sets the database_publication_day of this DatabaseDto. + + + :param database_publication_day: The database_publication_day of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_day = database_publication_day + + @property + def database_public(self): + """Gets the database_public of this DatabaseDto. # noqa: E501 + + + :return: The database_public of this DatabaseDto. # noqa: E501 :rtype: bool """ - return self._is_public + return self._database_public - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseDto. + @database_public.setter + def database_public(self, database_public): + """Sets the database_public of this DatabaseDto. - :param is_public: The is_public of this DatabaseDto. # noqa: E501 + :param database_public: The database_public of this DatabaseDto. # noqa: E501 :type: bool """ - self._is_public = is_public + self._database_public = database_public def to_dict(self): """Returns the model properties as a dict""" diff --git a/swagger/api-database/swagger_client/models/database_modify_dto.py b/swagger/api-database/swagger_client/models/database_modify_dto.py index f61145aa15e81aaf865f5b7d13e37deb8d1a2386..1e74ccca7b8e024459bd90b76f71f87724fc23c4 100644 --- a/swagger/api-database/swagger_client/models/database_modify_dto.py +++ b/swagger/api-database/swagger_client/models/database_modify_dto.py @@ -28,40 +28,43 @@ class DatabaseModifyDto(object): and the value is json key in definition. """ swagger_types = { - 'subject': 'list[str]', + 'subjects': 'list[str]', 'description': 'str', 'publisher': 'str', 'license': 'LicenseDto', 'language': 'str', - 'is_public': 'bool', - 'publication_year': 'int', + 'database_publication_year': 'int', + 'publication_month': 'int', + 'publication_day': 'int', 'contact_person': 'str' } attribute_map = { - 'subject': 'subject', + 'subjects': 'subjects', 'description': 'description', 'publisher': 'publisher', 'license': 'license', 'language': 'language', - 'is_public': 'is_public', - 'publication_year': 'publication_year', + 'database_publication_year': 'database publication year', + 'publication_month': 'publication_month', + 'publication_day': 'publication_day', 'contact_person': 'contact_person' } - def __init__(self, subject=None, description=None, publisher=None, license=None, language=None, is_public=None, publication_year=None, contact_person=None): # noqa: E501 + def __init__(self, subjects=None, description=None, publisher=None, license=None, language=None, database_publication_year=None, publication_month=None, publication_day=None, contact_person=None): # noqa: E501 """DatabaseModifyDto - a model defined in Swagger""" # noqa: E501 - self._subject = None + self._subjects = None self._description = None self._publisher = None self._license = None self._language = None - self._is_public = None - self._publication_year = None + self._database_publication_year = None + self._publication_month = None + self._publication_day = None self._contact_person = None self.discriminator = None - if subject is not None: - self.subject = subject + if subjects is not None: + self.subjects = subjects self.description = description if publisher is not None: self.publisher = publisher @@ -69,31 +72,34 @@ class DatabaseModifyDto(object): self.license = license if language is not None: self.language = language - self.is_public = is_public - self.publication_year = publication_year + self.database_publication_year = database_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 contact_person is not None: self.contact_person = contact_person @property - def subject(self): - """Gets the subject of this DatabaseModifyDto. # noqa: E501 + def subjects(self): + """Gets the subjects of this DatabaseModifyDto. # noqa: E501 - :return: The subject of this DatabaseModifyDto. # noqa: E501 + :return: The subjects of this DatabaseModifyDto. # noqa: E501 :rtype: list[str] """ - return self._subject + return self._subjects - @subject.setter - def subject(self, subject): - """Sets the subject of this DatabaseModifyDto. + @subjects.setter + def subjects(self, subjects): + """Sets the subjects of this DatabaseModifyDto. - :param subject: The subject of this DatabaseModifyDto. # noqa: E501 + :param subjects: The subjects of this DatabaseModifyDto. # noqa: E501 :type: list[str] """ - self._subject = subject + self._subjects = subjects @property def description(self): @@ -188,50 +194,69 @@ class DatabaseModifyDto(object): self._language = language @property - def is_public(self): - """Gets the is_public of this DatabaseModifyDto. # noqa: E501 + def database_publication_year(self): + """Gets the database_publication_year of this DatabaseModifyDto. # noqa: E501 - :return: The is_public of this DatabaseModifyDto. # noqa: E501 - :rtype: bool + :return: The database_publication_year of this DatabaseModifyDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_year + + @database_publication_year.setter + def database_publication_year(self, database_publication_year): + """Sets the database_publication_year of this DatabaseModifyDto. + + + :param database_publication_year: The database_publication_year of this DatabaseModifyDto. # noqa: E501 + :type: int + """ + if database_publication_year is None: + raise ValueError("Invalid value for `database_publication_year`, must not be `None`") # noqa: E501 + + self._database_publication_year = database_publication_year + + @property + def publication_month(self): + """Gets the publication_month of this DatabaseModifyDto. # noqa: E501 + + + :return: The publication_month of this DatabaseModifyDto. # noqa: E501 + :rtype: int """ - return self._is_public + return self._publication_month - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseModifyDto. + @publication_month.setter + def publication_month(self, publication_month): + """Sets the publication_month of this DatabaseModifyDto. - :param is_public: The is_public of this DatabaseModifyDto. # noqa: E501 - :type: bool + :param publication_month: The publication_month of this DatabaseModifyDto. # noqa: E501 + :type: int """ - if is_public is None: - raise ValueError("Invalid value for `is_public`, must not be `None`") # noqa: E501 - self._is_public = is_public + self._publication_month = publication_month @property - def publication_year(self): - """Gets the publication_year of this DatabaseModifyDto. # noqa: E501 + def publication_day(self): + """Gets the publication_day of this DatabaseModifyDto. # noqa: E501 - :return: The publication_year of this DatabaseModifyDto. # noqa: E501 + :return: The publication_day of this DatabaseModifyDto. # noqa: E501 :rtype: int """ - return self._publication_year + return self._publication_day - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this DatabaseModifyDto. + @publication_day.setter + def publication_day(self, publication_day): + """Sets the publication_day of this DatabaseModifyDto. - :param publication_year: The publication_year of this DatabaseModifyDto. # noqa: E501 + :param publication_day: The publication_day of this DatabaseModifyDto. # 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 + self._publication_day = publication_day @property def contact_person(self): diff --git a/swagger/api-database/swagger_client/models/database_transfer_dto.py b/swagger/api-database/swagger_client/models/database_transfer_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..e17937171833a088ef6adc96eca121498f1198cf --- /dev/null +++ b/swagger/api-database/swagger_client/models/database_transfer_dto.py @@ -0,0 +1,111 @@ +# 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 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 = { + 'is_public': 'bool' + } + + attribute_map = { + 'is_public': 'is_public' + } + + def __init__(self, is_public=None): # noqa: E501 + """DatabaseTransferDto - 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 DatabaseTransferDto. # noqa: E501 + + + :return: The is_public of this DatabaseTransferDto. # noqa: E501 + :rtype: bool + """ + return self._is_public + + @is_public.setter + def is_public(self, is_public): + """Sets the is_public of this DatabaseTransferDto. + + + :param is_public: The is_public of this DatabaseTransferDto. # 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(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-database/swagger_client/models/user_brief_dto.py b/swagger/api-database/swagger_client/models/user_brief_dto.py index 99d50cf78f8156c8d864bca444031dad7a1cff4e..3987d84a78d9fe15760e4e59a7bade18f8b210dc 100644 --- a/swagger/api-database/swagger_client/models/user_brief_dto.py +++ b/swagger/api-database/swagger_client/models/user_brief_dto.py @@ -36,7 +36,8 @@ class UserBriefDto(object): 'orcid': 'str', 'titles_before': 'str', 'titles_after': 'str', - 'theme_dark': 'bool' + 'theme_dark': 'bool', + 'email_verified': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class UserBriefDto(object): 'orcid': 'orcid', 'titles_before': 'titles_before', 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark' + 'theme_dark': 'theme_dark', + 'email_verified': 'email_verified' } - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None): # noqa: E501 + def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 """UserBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._username = None @@ -62,6 +64,7 @@ class UserBriefDto(object): self._titles_before = None self._titles_after = None self._theme_dark = None + self._email_verified = None self.discriminator = None self.id = id self.username = username @@ -78,6 +81,7 @@ class UserBriefDto(object): 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): @@ -274,6 +278,29 @@ class UserBriefDto(object): self._theme_dark = theme_dark + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + if email_verified is None: + raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 + + self._email_verified = email_verified + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-database/swagger_client/models/user_dto.py b/swagger/api-database/swagger_client/models/user_dto.py index 949d9c1d04a775a94bc025bc38c66c30b323e35d..fef246bbae7e509d86e14142176a3fb235fa5d89 100644 --- a/swagger/api-database/swagger_client/models/user_dto.py +++ b/swagger/api-database/swagger_client/models/user_dto.py @@ -105,8 +105,7 @@ class UserDto(object): if titles_after is not None: self.titles_after = titles_after self.theme_dark = theme_dark - if email_verified is not None: - self.email_verified = email_verified + self.email_verified = email_verified @property def id(self): @@ -428,6 +427,8 @@ class UserDto(object): :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 diff --git a/swagger/api-database/test/test_database_transfer_dto.py b/swagger/api-database/test/test_database_transfer_dto.py new file mode 100644 index 0000000000000000000000000000000000000000..847bf13ca9a7c74ead49dc9d2f549b13a552c45b --- /dev/null +++ b/swagger/api-database/test/test_database_transfer_dto.py @@ -0,0 +1,39 @@ +# 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 +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.database_transfer_dto import DatabaseTransferDto # noqa: E501 +from swagger_client.rest import ApiException + + +class TestDatabaseTransferDto(unittest.TestCase): + """DatabaseTransferDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDatabaseTransferDto(self): + """Test DatabaseTransferDto""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.database_transfer_dto.DatabaseTransferDto() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/swagger/api-identifier.yaml b/swagger/api-identifier.yaml index 7ed58adaeb03616f25d0dcced04d9bf3daec2711..de19fe4c870048bd6153c3e5bbcfa94ae85a4ce9 100644 --- a/swagger/api-identifier.yaml +++ b/swagger/api-identifier.yaml @@ -519,8 +519,6 @@ components: type: string ip_address: type: string - is_public: - type: boolean CreatorDto: required: - created @@ -545,29 +543,32 @@ components: format: date-time DatabaseDto: required: - - creator - - exchange - - id - - internal_name - - name - - publication_year + - database creator + - database description + - database exchange + - database id + - database internal name + - database name type: object properties: - id: + database id: type: integer format: int64 - name: + example: 1 + database name: type: string - exchange: + example: Weather Australia + database exchange: type: string - creator: + database creator: $ref: '#/components/schemas/UserBriefDto' - subjects: + database subjects: type: array items: type: string - language: + database language: type: string + example: EN enum: - ab - aa @@ -753,34 +754,43 @@ components: - yo - za - zu - license: + database license: $ref: '#/components/schemas/LicenseDto' - description: + database description: type: string - publisher: + example: Weather Australia 2009-2021 + database publisher: type: string - contact: + example: TU Wien + database contact person: $ref: '#/components/schemas/UserDto' tables: type: array items: $ref: '#/components/schemas/TableBriefDto' - image: + database container image: $ref: '#/components/schemas/ImageDto' container: $ref: '#/components/schemas/ContainerDto' - created: + database creation time: type: string format: date-time deleted: type: string format: date-time - internal_name: + database internal name: type: string - publication_year: + example: weather_australia + database publication year: + type: integer + format: int32 + database publication month: + type: integer + format: int32 + database publication day: type: integer format: int32 - is_public: + database public: type: boolean GrantedAuthorityDto: type: object @@ -835,6 +845,8 @@ components: - self doi: type: string + publisher: + type: string creator: $ref: '#/components/schemas/UserDto' creators: @@ -980,6 +992,7 @@ components: type: string uri: type: string + example: MIT2 RelatedIdentifierDto: required: - created @@ -1078,6 +1091,7 @@ components: type: string UserBriefDto: required: + - email_verified - id - theme_dark - username @@ -1102,9 +1116,12 @@ components: type: string theme_dark: type: boolean + email_verified: + type: boolean UserDto: required: - email + - email_verified - id - theme_dark - username @@ -1185,6 +1202,8 @@ components: - self doi: type: string + publisher: + type: string creators: type: array items: diff --git a/swagger/api-identifier/swagger_client/models/container_dto.py b/swagger/api-identifier/swagger_client/models/container_dto.py index 01d49a189d3ed647c3a3227ca70532fc9ecdf6e4..85170cb23b4595f14479e05b7583587594712e6d 100644 --- a/swagger/api-identifier/swagger_client/models/container_dto.py +++ b/swagger/api-identifier/swagger_client/models/container_dto.py @@ -37,8 +37,7 @@ class ContainerDto(object): 'port': 'int', 'created': 'datetime', 'internal_name': 'str', - 'ip_address': 'str', - 'is_public': 'bool' + 'ip_address': 'str' } attribute_map = { @@ -51,11 +50,10 @@ class ContainerDto(object): 'port': 'port', 'created': 'created', 'internal_name': 'internal_name', - 'ip_address': 'ip_address', - 'is_public': 'is_public' + 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -67,7 +65,6 @@ class ContainerDto(object): self._created = None self._internal_name = None self._ip_address = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -84,8 +81,6 @@ class ContainerDto(object): self.internal_name = internal_name if ip_address is not None: self.ip_address = ip_address - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -313,27 +308,6 @@ class ContainerDto(object): self._ip_address = ip_address - @property - def is_public(self): - """Gets the is_public of this ContainerDto. # noqa: E501 - - - :return: The is_public of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerDto. - - - :param is_public: The is_public of this ContainerDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-identifier/swagger_client/models/database_dto.py b/swagger/api-identifier/swagger_client/models/database_dto.py index 0648eb80932d6da8f79a6a11478f6ae389edc589..871e9b409172c3bef32a4a93367d0df5579f3fed 100644 --- a/swagger/api-identifier/swagger_client/models/database_dto.py +++ b/swagger/api-identifier/swagger_client/models/database_dto.py @@ -28,322 +28,334 @@ class DatabaseDto(object): and the value is json key in definition. """ swagger_types = { - 'id': 'int', - 'name': 'str', - 'exchange': 'str', - 'creator': 'UserBriefDto', - 'subjects': 'list[str]', - 'language': 'str', - 'license': 'LicenseDto', - 'description': 'str', - 'publisher': 'str', - 'contact': 'UserDto', + 'database_id': 'int', + 'database_name': 'str', + 'database_exchange': 'str', + 'database_creator': 'UserBriefDto', + 'database_subjects': 'list[str]', + 'database_language': 'str', + 'database_license': 'LicenseDto', + 'database_description': 'str', + 'database_publisher': 'str', + 'database_contact_person': 'UserDto', 'tables': 'list[TableBriefDto]', - 'image': 'ImageDto', + 'database_container_image': 'ImageDto', 'container': 'ContainerDto', - 'created': 'datetime', + 'database_creation_time': 'datetime', 'deleted': 'datetime', - 'internal_name': 'str', - 'publication_year': 'int', - 'is_public': 'bool' + 'database_internal_name': 'str', + 'database_publication_year': 'int', + 'database_publication_month': 'int', + 'database_publication_day': 'int', + 'database_public': 'bool' } attribute_map = { - 'id': 'id', - 'name': 'name', - 'exchange': 'exchange', - 'creator': 'creator', - 'subjects': 'subjects', - 'language': 'language', - 'license': 'license', - 'description': 'description', - 'publisher': 'publisher', - 'contact': 'contact', + 'database_id': 'database id', + 'database_name': 'database name', + 'database_exchange': 'database exchange', + 'database_creator': 'database creator', + 'database_subjects': 'database subjects', + 'database_language': 'database language', + 'database_license': 'database license', + 'database_description': 'database description', + 'database_publisher': 'database publisher', + 'database_contact_person': 'database contact person', 'tables': 'tables', - 'image': 'image', + 'database_container_image': 'database container image', 'container': 'container', - 'created': 'created', + 'database_creation_time': 'database creation time', 'deleted': 'deleted', - 'internal_name': 'internal_name', - 'publication_year': 'publication_year', - 'is_public': 'is_public' + 'database_internal_name': 'database internal name', + 'database_publication_year': 'database publication year', + 'database_publication_month': 'database publication month', + 'database_publication_day': 'database publication day', + 'database_public': 'database public' } - def __init__(self, id=None, name=None, exchange=None, creator=None, subjects=None, language=None, license=None, description=None, publisher=None, contact=None, tables=None, image=None, container=None, created=None, deleted=None, internal_name=None, publication_year=None, is_public=None): # noqa: E501 + def __init__(self, database_id=None, database_name=None, database_exchange=None, database_creator=None, database_subjects=None, database_language=None, database_license=None, database_description=None, database_publisher=None, database_contact_person=None, tables=None, database_container_image=None, container=None, database_creation_time=None, deleted=None, database_internal_name=None, database_publication_year=None, database_publication_month=None, database_publication_day=None, database_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._exchange = None - self._creator = None - self._subjects = None - self._language = None - self._license = None - self._description = None - self._publisher = None - self._contact = None + self._database_id = None + self._database_name = None + self._database_exchange = None + self._database_creator = None + self._database_subjects = None + self._database_language = None + self._database_license = None + self._database_description = None + self._database_publisher = None + self._database_contact_person = None self._tables = None - self._image = None + self._database_container_image = None self._container = None - self._created = None + self._database_creation_time = None self._deleted = None - self._internal_name = None - self._publication_year = None - self._is_public = None + self._database_internal_name = None + self._database_publication_year = None + self._database_publication_month = None + self._database_publication_day = None + self._database_public = None self.discriminator = None - self.id = id - self.name = name - self.exchange = exchange - self.creator = creator - if subjects is not None: - self.subjects = subjects - if language is not None: - self.language = language - if license is not None: - self.license = license - if description is not None: - self.description = description - if publisher is not None: - self.publisher = publisher - if contact is not None: - self.contact = contact + self.database_id = database_id + self.database_name = database_name + self.database_exchange = database_exchange + self.database_creator = database_creator + if database_subjects is not None: + self.database_subjects = database_subjects + if database_language is not None: + self.database_language = database_language + if database_license is not None: + self.database_license = database_license + self.database_description = database_description + if database_publisher is not None: + self.database_publisher = database_publisher + if database_contact_person is not None: + self.database_contact_person = database_contact_person if tables is not None: self.tables = tables - if image is not None: - self.image = image + if database_container_image is not None: + self.database_container_image = database_container_image if container is not None: self.container = container - if created is not None: - self.created = created + if database_creation_time is not None: + self.database_creation_time = database_creation_time if deleted is not None: self.deleted = deleted - self.internal_name = internal_name - self.publication_year = publication_year - if is_public is not None: - self.is_public = is_public + self.database_internal_name = database_internal_name + if database_publication_year is not None: + self.database_publication_year = database_publication_year + if database_publication_month is not None: + self.database_publication_month = database_publication_month + if database_publication_day is not None: + self.database_publication_day = database_publication_day + if database_public is not None: + self.database_public = database_public @property - def id(self): - """Gets the id of this DatabaseDto. # noqa: E501 + def database_id(self): + """Gets the database_id of this DatabaseDto. # noqa: E501 - :return: The id of this DatabaseDto. # noqa: E501 + :return: The database_id of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._id + return self._database_id - @id.setter - def id(self, id): - """Sets the id of this DatabaseDto. + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this DatabaseDto. - :param id: The id of this DatabaseDto. # noqa: E501 + :param database_id: The database_id of this DatabaseDto. # noqa: E501 :type: int """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - self._id = id + self._database_id = database_id @property - def name(self): - """Gets the name of this DatabaseDto. # noqa: E501 + def database_name(self): + """Gets the database_name of this DatabaseDto. # noqa: E501 - :return: The name of this DatabaseDto. # noqa: E501 + :return: The database_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._name + return self._database_name - @name.setter - def name(self, name): - """Sets the name of this DatabaseDto. + @database_name.setter + def database_name(self, database_name): + """Sets the database_name of this DatabaseDto. - :param name: The name of this DatabaseDto. # noqa: E501 + :param database_name: The database_name of this DatabaseDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if database_name is None: + raise ValueError("Invalid value for `database_name`, must not be `None`") # noqa: E501 - self._name = name + self._database_name = database_name @property - def exchange(self): - """Gets the exchange of this DatabaseDto. # noqa: E501 + def database_exchange(self): + """Gets the database_exchange of this DatabaseDto. # noqa: E501 - :return: The exchange of this DatabaseDto. # noqa: E501 + :return: The database_exchange of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._exchange + return self._database_exchange - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this DatabaseDto. + @database_exchange.setter + def database_exchange(self, database_exchange): + """Sets the database_exchange of this DatabaseDto. - :param exchange: The exchange of this DatabaseDto. # noqa: E501 + :param database_exchange: The database_exchange of this DatabaseDto. # noqa: E501 :type: str """ - if exchange is None: - raise ValueError("Invalid value for `exchange`, must not be `None`") # noqa: E501 + if database_exchange is None: + raise ValueError("Invalid value for `database_exchange`, must not be `None`") # noqa: E501 - self._exchange = exchange + self._database_exchange = database_exchange @property - def creator(self): - """Gets the creator of this DatabaseDto. # noqa: E501 + def database_creator(self): + """Gets the database_creator of this DatabaseDto. # noqa: E501 - :return: The creator of this DatabaseDto. # noqa: E501 + :return: The database_creator of this DatabaseDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._database_creator - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseDto. + @database_creator.setter + def database_creator(self, database_creator): + """Sets the database_creator of this DatabaseDto. - :param creator: The creator of this DatabaseDto. # noqa: E501 + :param database_creator: The database_creator of this DatabaseDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if database_creator is None: + raise ValueError("Invalid value for `database_creator`, must not be `None`") # noqa: E501 - self._creator = creator + self._database_creator = database_creator @property - def subjects(self): - """Gets the subjects of this DatabaseDto. # noqa: E501 + def database_subjects(self): + """Gets the database_subjects of this DatabaseDto. # noqa: E501 - :return: The subjects of this DatabaseDto. # noqa: E501 + :return: The database_subjects of this DatabaseDto. # noqa: E501 :rtype: list[str] """ - return self._subjects + return self._database_subjects - @subjects.setter - def subjects(self, subjects): - """Sets the subjects of this DatabaseDto. + @database_subjects.setter + def database_subjects(self, database_subjects): + """Sets the database_subjects of this DatabaseDto. - :param subjects: The subjects of this DatabaseDto. # noqa: E501 + :param database_subjects: The database_subjects of this DatabaseDto. # noqa: E501 :type: list[str] """ - self._subjects = subjects + self._database_subjects = database_subjects @property - def language(self): - """Gets the language of this DatabaseDto. # noqa: E501 + def database_language(self): + """Gets the database_language of this DatabaseDto. # noqa: E501 - :return: The language of this DatabaseDto. # noqa: E501 + :return: The database_language of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._language + return self._database_language - @language.setter - def language(self, language): - """Sets the language of this DatabaseDto. + @database_language.setter + def database_language(self, database_language): + """Sets the database_language of this DatabaseDto. - :param language: The language of this DatabaseDto. # noqa: E501 + :param database_language: The database_language of this DatabaseDto. # 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: + if database_language not in allowed_values: raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) + "Invalid value for `database_language` ({0}), must be one of {1}" # noqa: E501 + .format(database_language, allowed_values) ) - self._language = language + self._database_language = database_language @property - def license(self): - """Gets the license of this DatabaseDto. # noqa: E501 + def database_license(self): + """Gets the database_license of this DatabaseDto. # noqa: E501 - :return: The license of this DatabaseDto. # noqa: E501 + :return: The database_license of this DatabaseDto. # noqa: E501 :rtype: LicenseDto """ - return self._license + return self._database_license - @license.setter - def license(self, license): - """Sets the license of this DatabaseDto. + @database_license.setter + def database_license(self, database_license): + """Sets the database_license of this DatabaseDto. - :param license: The license of this DatabaseDto. # noqa: E501 + :param database_license: The database_license of this DatabaseDto. # noqa: E501 :type: LicenseDto """ - self._license = license + self._database_license = database_license @property - def description(self): - """Gets the description of this DatabaseDto. # noqa: E501 + def database_description(self): + """Gets the database_description of this DatabaseDto. # noqa: E501 - :return: The description of this DatabaseDto. # noqa: E501 + :return: The database_description of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._description + return self._database_description - @description.setter - def description(self, description): - """Sets the description of this DatabaseDto. + @database_description.setter + def database_description(self, database_description): + """Sets the database_description of this DatabaseDto. - :param description: The description of this DatabaseDto. # noqa: E501 + :param database_description: The database_description of this DatabaseDto. # noqa: E501 :type: str """ + if database_description is None: + raise ValueError("Invalid value for `database_description`, must not be `None`") # noqa: E501 - self._description = description + self._database_description = database_description @property - def publisher(self): - """Gets the publisher of this DatabaseDto. # noqa: E501 + def database_publisher(self): + """Gets the database_publisher of this DatabaseDto. # noqa: E501 - :return: The publisher of this DatabaseDto. # noqa: E501 + :return: The database_publisher of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._publisher + return self._database_publisher - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this DatabaseDto. + @database_publisher.setter + def database_publisher(self, database_publisher): + """Sets the database_publisher of this DatabaseDto. - :param publisher: The publisher of this DatabaseDto. # noqa: E501 + :param database_publisher: The database_publisher of this DatabaseDto. # noqa: E501 :type: str """ - self._publisher = publisher + self._database_publisher = database_publisher @property - def contact(self): - """Gets the contact of this DatabaseDto. # noqa: E501 + def database_contact_person(self): + """Gets the database_contact_person of this DatabaseDto. # noqa: E501 - :return: The contact of this DatabaseDto. # noqa: E501 + :return: The database_contact_person of this DatabaseDto. # noqa: E501 :rtype: UserDto """ - return self._contact + return self._database_contact_person - @contact.setter - def contact(self, contact): - """Sets the contact of this DatabaseDto. + @database_contact_person.setter + def database_contact_person(self, database_contact_person): + """Sets the database_contact_person of this DatabaseDto. - :param contact: The contact of this DatabaseDto. # noqa: E501 + :param database_contact_person: The database_contact_person of this DatabaseDto. # noqa: E501 :type: UserDto """ - self._contact = contact + self._database_contact_person = database_contact_person @property def tables(self): @@ -367,25 +379,25 @@ class DatabaseDto(object): self._tables = tables @property - def image(self): - """Gets the image of this DatabaseDto. # noqa: E501 + def database_container_image(self): + """Gets the database_container_image of this DatabaseDto. # noqa: E501 - :return: The image of this DatabaseDto. # noqa: E501 + :return: The database_container_image of this DatabaseDto. # noqa: E501 :rtype: ImageDto """ - return self._image + return self._database_container_image - @image.setter - def image(self, image): - """Sets the image of this DatabaseDto. + @database_container_image.setter + def database_container_image(self, database_container_image): + """Sets the database_container_image of this DatabaseDto. - :param image: The image of this DatabaseDto. # noqa: E501 + :param database_container_image: The database_container_image of this DatabaseDto. # noqa: E501 :type: ImageDto """ - self._image = image + self._database_container_image = database_container_image @property def container(self): @@ -409,25 +421,25 @@ class DatabaseDto(object): self._container = container @property - def created(self): - """Gets the created of this DatabaseDto. # noqa: E501 + def database_creation_time(self): + """Gets the database_creation_time of this DatabaseDto. # noqa: E501 - :return: The created of this DatabaseDto. # noqa: E501 + :return: The database_creation_time of this DatabaseDto. # noqa: E501 :rtype: datetime """ - return self._created + return self._database_creation_time - @created.setter - def created(self, created): - """Sets the created of this DatabaseDto. + @database_creation_time.setter + def database_creation_time(self, database_creation_time): + """Sets the database_creation_time of this DatabaseDto. - :param created: The created of this DatabaseDto. # noqa: E501 + :param database_creation_time: The database_creation_time of this DatabaseDto. # noqa: E501 :type: datetime """ - self._created = created + self._database_creation_time = database_creation_time @property def deleted(self): @@ -451,71 +463,111 @@ class DatabaseDto(object): self._deleted = deleted @property - def internal_name(self): - """Gets the internal_name of this DatabaseDto. # noqa: E501 + def database_internal_name(self): + """Gets the database_internal_name of this DatabaseDto. # noqa: E501 - :return: The internal_name of this DatabaseDto. # noqa: E501 + :return: The database_internal_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._internal_name + return self._database_internal_name - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this DatabaseDto. + @database_internal_name.setter + def database_internal_name(self, database_internal_name): + """Sets the database_internal_name of this DatabaseDto. - :param internal_name: The internal_name of this DatabaseDto. # noqa: E501 + :param database_internal_name: The database_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 + if database_internal_name is None: + raise ValueError("Invalid value for `database_internal_name`, must not be `None`") # noqa: E501 - self._internal_name = internal_name + self._database_internal_name = database_internal_name @property - def publication_year(self): - """Gets the publication_year of this DatabaseDto. # noqa: E501 + def database_publication_year(self): + """Gets the database_publication_year of this DatabaseDto. # noqa: E501 - :return: The publication_year of this DatabaseDto. # noqa: E501 + :return: The database_publication_year of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._publication_year + return self._database_publication_year - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this DatabaseDto. + @database_publication_year.setter + def database_publication_year(self, database_publication_year): + """Sets the database_publication_year of this DatabaseDto. - :param publication_year: The publication_year of this DatabaseDto. # noqa: E501 + :param database_publication_year: The database_publication_year of this DatabaseDto. # 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 + self._database_publication_year = database_publication_year @property - def is_public(self): - """Gets the is_public of this DatabaseDto. # noqa: E501 + def database_publication_month(self): + """Gets the database_publication_month of this DatabaseDto. # noqa: E501 - :return: The is_public of this DatabaseDto. # noqa: E501 + :return: The database_publication_month of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_month + + @database_publication_month.setter + def database_publication_month(self, database_publication_month): + """Sets the database_publication_month of this DatabaseDto. + + + :param database_publication_month: The database_publication_month of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_month = database_publication_month + + @property + def database_publication_day(self): + """Gets the database_publication_day of this DatabaseDto. # noqa: E501 + + + :return: The database_publication_day of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_day + + @database_publication_day.setter + def database_publication_day(self, database_publication_day): + """Sets the database_publication_day of this DatabaseDto. + + + :param database_publication_day: The database_publication_day of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_day = database_publication_day + + @property + def database_public(self): + """Gets the database_public of this DatabaseDto. # noqa: E501 + + + :return: The database_public of this DatabaseDto. # noqa: E501 :rtype: bool """ - return self._is_public + return self._database_public - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseDto. + @database_public.setter + def database_public(self, database_public): + """Sets the database_public of this DatabaseDto. - :param is_public: The is_public of this DatabaseDto. # noqa: E501 + :param database_public: The database_public of this DatabaseDto. # noqa: E501 :type: bool """ - self._is_public = is_public + self._database_public = database_public def to_dict(self): """Returns the model properties as a dict""" diff --git a/swagger/api-identifier/swagger_client/models/identifier_create_dto.py b/swagger/api-identifier/swagger_client/models/identifier_create_dto.py index d0ac2f8bd4eafe0c4a7da50afce5cfa37ff43a73..80c8790bdcde9549390fc471a5a7bf95228d940d 100644 --- a/swagger/api-identifier/swagger_client/models/identifier_create_dto.py +++ b/swagger/api-identifier/swagger_client/models/identifier_create_dto.py @@ -33,6 +33,7 @@ class IdentifierCreateDto(object): 'description': 'str', 'visibility': 'str', 'doi': 'str', + 'publisher': 'str', 'creators': 'list[CreatorCreateDto]', 'publication_day': 'int', 'publication_month': 'int', @@ -46,6 +47,7 @@ class IdentifierCreateDto(object): 'description': 'description', 'visibility': 'visibility', 'doi': 'doi', + 'publisher': 'publisher', 'creators': 'creators', 'publication_day': 'publication_day', 'publication_month': 'publication_month', @@ -53,13 +55,14 @@ class IdentifierCreateDto(object): 'related_identifiers': 'related_identifiers' } - def __init__(self, qid=None, title=None, description=None, visibility=None, doi=None, creators=None, publication_day=None, publication_month=None, publication_year=None, related_identifiers=None): # noqa: E501 + def __init__(self, qid=None, title=None, description=None, visibility=None, doi=None, publisher=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._qid = None self._title = None self._description = None self._visibility = None self._doi = None + self._publisher = None self._creators = None self._publication_day = None self._publication_month = None @@ -72,6 +75,8 @@ class IdentifierCreateDto(object): self.visibility = visibility if doi is not None: self.doi = doi + if publisher is not None: + self.publisher = publisher self.creators = creators if publication_day is not None: self.publication_day = publication_day @@ -200,6 +205,27 @@ class IdentifierCreateDto(object): self._doi = doi + @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 creators(self): """Gets the creators of this IdentifierCreateDto. # noqa: E501 diff --git a/swagger/api-identifier/swagger_client/models/identifier_dto.py b/swagger/api-identifier/swagger_client/models/identifier_dto.py index 5ee9095a726672927b5099a687474f420c06c11d..f182dd5cd6339bca64060e97416d5fd71e2b14d5 100644 --- a/swagger/api-identifier/swagger_client/models/identifier_dto.py +++ b/swagger/api-identifier/swagger_client/models/identifier_dto.py @@ -38,6 +38,7 @@ class IdentifierDto(object): 'execution': 'datetime', 'visibility': 'str', 'doi': 'str', + 'publisher': 'str', 'creator': 'UserDto', 'creators': 'list[CreatorDto]', 'created': 'datetime', @@ -63,6 +64,7 @@ class IdentifierDto(object): 'execution': 'execution', 'visibility': 'visibility', 'doi': 'doi', + 'publisher': 'publisher', 'creator': 'creator', 'creators': 'creators', 'created': 'created', @@ -77,7 +79,7 @@ class IdentifierDto(object): 'last_modified': 'last_modified' } - def __init__(self, id=None, cid=None, dbid=None, qid=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, creator=None, creators=None, created=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 + def __init__(self, id=None, cid=None, dbid=None, qid=None, title=None, description=None, query=None, execution=None, visibility=None, doi=None, publisher=None, creator=None, creators=None, created=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._cid = None @@ -89,6 +91,7 @@ class IdentifierDto(object): self._execution = None self._visibility = None self._doi = None + self._publisher = None self._creator = None self._creators = None self._created = None @@ -114,6 +117,8 @@ class IdentifierDto(object): self.visibility = visibility if doi is not None: self.doi = doi + if publisher is not None: + self.publisher = publisher self.creator = creator self.creators = creators if created is not None: @@ -364,6 +369,27 @@ class IdentifierDto(object): 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 creator(self): """Gets the creator of this IdentifierDto. # noqa: E501 diff --git a/swagger/api-identifier/swagger_client/models/user_brief_dto.py b/swagger/api-identifier/swagger_client/models/user_brief_dto.py index 75f830ec8e40a8c0bf568d0740ad055065f80a74..40f051336a795bbbdd47abd0daba60af11ca02e1 100644 --- a/swagger/api-identifier/swagger_client/models/user_brief_dto.py +++ b/swagger/api-identifier/swagger_client/models/user_brief_dto.py @@ -36,7 +36,8 @@ class UserBriefDto(object): 'orcid': 'str', 'titles_before': 'str', 'titles_after': 'str', - 'theme_dark': 'bool' + 'theme_dark': 'bool', + 'email_verified': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class UserBriefDto(object): 'orcid': 'orcid', 'titles_before': 'titles_before', 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark' + 'theme_dark': 'theme_dark', + 'email_verified': 'email_verified' } - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None): # noqa: E501 + def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 """UserBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._username = None @@ -62,6 +64,7 @@ class UserBriefDto(object): self._titles_before = None self._titles_after = None self._theme_dark = None + self._email_verified = None self.discriminator = None self.id = id self.username = username @@ -78,6 +81,7 @@ class UserBriefDto(object): 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): @@ -274,6 +278,29 @@ class UserBriefDto(object): self._theme_dark = theme_dark + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + if email_verified is None: + raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 + + self._email_verified = email_verified + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-identifier/swagger_client/models/user_dto.py b/swagger/api-identifier/swagger_client/models/user_dto.py index 50dc9fd614e43c17a917407aee8ceb40f061e253..59563bcff5f028843f2303b96231661d30bd1315 100644 --- a/swagger/api-identifier/swagger_client/models/user_dto.py +++ b/swagger/api-identifier/swagger_client/models/user_dto.py @@ -105,8 +105,7 @@ class UserDto(object): if titles_after is not None: self.titles_after = titles_after self.theme_dark = theme_dark - if email_verified is not None: - self.email_verified = email_verified + self.email_verified = email_verified @property def id(self): @@ -428,6 +427,8 @@ class UserDto(object): :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 diff --git a/swagger/api-metadata.yaml b/swagger/api-metadata.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f4d6b267b7bcce0548971b5082a5f68154272210 --- /dev/null +++ b/swagger/api-metadata.yaml @@ -0,0 +1,62 @@ +openapi: 3.0.1 +info: + title: Database Repository Metadata Service API + description: Service that manages the metadata + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9098 + description: Generated server url +paths: + /api/oai: + get: + tags: + - metadata-endpoint + summary: Get the record + operationId: identify_1_1_1_1 + parameters: + - name: verb + example: ListMetadataFormats + - name: parameters + in: query + required: true + schema: + $ref: '#/components/schemas/OaiListIdentifiersParameters' + responses: + "200": + description: OK + content: + text/xml;charset=UTF-8: + schema: + type: object +components: + schemas: + OaiListIdentifiersParameters: + type: object + properties: + metadataPrefix: + type: string + from: + type: string + until: + type: string + set: + type: string + resumptionToken: + type: string + fromDate: + type: string + format: date-time + untilDate: + type: string + format: date-time + parametersString: + type: string diff --git a/swagger/api-metadata/.gitignore b/swagger/api-metadata/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a655050c2631466828b5b8bfc59ae27f9ac02dc5 --- /dev/null +++ b/swagger/api-metadata/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/swagger/api-metadata/.swagger-codegen-ignore b/swagger/api-metadata/.swagger-codegen-ignore new file mode 100644 index 0000000000000000000000000000000000000000..c5fa491b4c557bf997d5dd21797de782545dc9e5 --- /dev/null +++ b/swagger/api-metadata/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/swagger/api-metadata/.swagger-codegen/VERSION b/swagger/api-metadata/.swagger-codegen/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..10bbf276ee45aaec75c7b2ada3ff71d798f89fd9 --- /dev/null +++ b/swagger/api-metadata/.swagger-codegen/VERSION @@ -0,0 +1 @@ +3.0.34 \ No newline at end of file diff --git a/swagger/api-metadata/.travis.yml b/swagger/api-metadata/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..dd6c4450aa902ae68479c3d76d45145e18d6052e --- /dev/null +++ b/swagger/api-metadata/.travis.yml @@ -0,0 +1,13 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/swagger/api-metadata/README.md b/swagger/api-metadata/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ee5aa44d5c3a13d0d43b524f88bc8ccaf64b5ba9 --- /dev/null +++ b/swagger/api-metadata/README.md @@ -0,0 +1,85 @@ +# swagger-client +Service that manages the metadata + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.1.0-alpha +- Package version: 1.0.0 +- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import swagger_client +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import swagger_client +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import swagger_client +from swagger_client.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = swagger_client.MetadataEndpointApi(swagger_client.ApiClient(configuration)) +parameters = swagger_client.OaiListIdentifiersParameters() # OaiListIdentifiersParameters | + +try: + # Get the record + api_response = api_instance.identify1111(parameters) + pprint(api_response) +except ApiException as e: + print("Exception when calling MetadataEndpointApi->identify1111: %s\n" % e) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:9098* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*MetadataEndpointApi* | [**identify1111**](docs/MetadataEndpointApi.md#identify1111) | **GET** /api/oai | Get the record + +## Documentation For Models + + - [OaiListIdentifiersParameters](docs/OaiListIdentifiersParameters.md) + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + +andreas.rauber@tuwien.ac.at diff --git a/swagger/api-metadata/git_push.sh b/swagger/api-metadata/git_push.sh new file mode 100644 index 0000000000000000000000000000000000000000..ae01b182ae9eb047d0999a496b060e62d7b01e5c --- /dev/null +++ b/swagger/api-metadata/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/swagger/api-metadata/requirements.txt b/swagger/api-metadata/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..bafdc07532f5e1287a24c2af278f547091a410b6 --- /dev/null +++ b/swagger/api-metadata/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/swagger/api-metadata/setup.py b/swagger/api-metadata/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..a0c11feb6329589308edff3017e93e9f867deb23 --- /dev/null +++ b/swagger/api-metadata/setup.py @@ -0,0 +1,39 @@ +# 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 +""" + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "swagger-client" +VERSION = "1.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="Database Repository Metadata Service API", + author_email="andreas.rauber@tuwien.ac.at", + url="", + keywords=["Swagger", "Database Repository Metadata Service API"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + Service that manages the metadata # noqa: E501 + """ +) diff --git a/swagger/api-metadata/swagger_client/__init__.py b/swagger/api-metadata/swagger_client/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..36774dfc01a6fe4a551c6107c529f7c5f16cf447 --- /dev/null +++ b/swagger/api-metadata/swagger_client/__init__.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +# flake8: noqa + +""" + 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 +""" + +from __future__ import absolute_import + +# import apis into sdk package +from swagger_client.api.metadata_endpoint_api import MetadataEndpointApi +# import ApiClient +from swagger_client.api_client import ApiClient +from swagger_client.configuration import Configuration +# import models into sdk package +from swagger_client.models.oai_list_identifiers_parameters import OaiListIdentifiersParameters diff --git a/swagger/api-metadata/swagger_client/api/__init__.py b/swagger/api-metadata/swagger_client/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..86d3936620c4fdcec61dbaae0a63c5c027950c05 --- /dev/null +++ b/swagger/api-metadata/swagger_client/api/__init__.py @@ -0,0 +1,6 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from swagger_client.api.metadata_endpoint_api import MetadataEndpointApi diff --git a/swagger/api-metadata/swagger_client/api/metadata_endpoint_api.py b/swagger/api-metadata/swagger_client/api/metadata_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..c8c59be5faac53bc6334fc0e0bc07606f930dc90 --- /dev/null +++ b/swagger/api-metadata/swagger_client/api/metadata_endpoint_api.py @@ -0,0 +1,126 @@ +# 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 +""" + +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 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) + :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.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) + :return: object + 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 '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;charset=UTF-8']) # 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='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) diff --git a/swagger/api-metadata/swagger_client/api_client.py b/swagger/api-metadata/swagger_client/api_client.py new file mode 100644 index 0000000000000000000000000000000000000000..20d104fc6257149535ebdc63e7492354c69e4ffc --- /dev/null +++ b/swagger/api-metadata/swagger_client/api_client.py @@ -0,0 +1,632 @@ +# 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 +""" +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 swagger_client.configuration import Configuration +import swagger_client.models +from swagger_client 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(swagger_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_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-metadata/swagger_client/configuration.py b/swagger/api-metadata/swagger_client/configuration.py new file mode 100644 index 0000000000000000000000000000000000000000..5a769b5a8ace1b8a546c4bcc154a732248cd551a --- /dev/null +++ b/swagger/api-metadata/swagger_client/configuration.py @@ -0,0 +1,244 @@ +# 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 +""" + +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:9098" + # 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.1.0-alpha\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/swagger/api-metadata/swagger_client/models/__init__.py b/swagger/api-metadata/swagger_client/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..522c26021f02799ec69fea85df93de8d82bbb2aa --- /dev/null +++ b/swagger/api-metadata/swagger_client/models/__init__.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +# flake8: noqa +""" + 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 +""" + +from __future__ import absolute_import + +# import models into model package +from swagger_client.models.oai_list_identifiers_parameters import OaiListIdentifiersParameters diff --git a/swagger/api-metadata/swagger_client/models/oai_list_identifiers_parameters.py b/swagger/api-metadata/swagger_client/models/oai_list_identifiers_parameters.py new file mode 100644 index 0000000000000000000000000000000000000000..9afdd185ae784ed6a1d0b26883f43949b25da6d7 --- /dev/null +++ b/swagger/api-metadata/swagger_client/models/oai_list_identifiers_parameters.py @@ -0,0 +1,292 @@ +# 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 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-metadata/swagger_client/rest.py b/swagger/api-metadata/swagger_client/rest.py new file mode 100644 index 0000000000000000000000000000000000000000..886644736010d4e652a34f9006bb2aa7249ca900 --- /dev/null +++ b/swagger/api-metadata/swagger_client/rest.py @@ -0,0 +1,317 @@ +# 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 +""" + +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-metadata/test-requirements.txt b/swagger/api-metadata/test-requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..2702246c0e6f92a1c41c0960879e07da339e4b7d --- /dev/null +++ b/swagger/api-metadata/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/swagger/api-metadata/test/__init__.py b/swagger/api-metadata/test/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/swagger/api-metadata/test/test_metadata_endpoint_api.py b/swagger/api-metadata/test/test_metadata_endpoint_api.py new file mode 100644 index 0000000000000000000000000000000000000000..119e636b9469e7da56b1e067c465b93a1c88fb2c --- /dev/null +++ b/swagger/api-metadata/test/test_metadata_endpoint_api.py @@ -0,0 +1,40 @@ +# 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 +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.api.metadata_endpoint_api import MetadataEndpointApi # noqa: E501 +from swagger_client.rest import ApiException + + +class TestMetadataEndpointApi(unittest.TestCase): + """MetadataEndpointApi unit test stubs""" + + def setUp(self): + self.api = MetadataEndpointApi() # noqa: E501 + + def tearDown(self): + pass + + def test_identify1111(self): + """Test case for identify1111 + + Get the record # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/swagger/api-metadata/test/test_oai_list_identifiers_parameters.py b/swagger/api-metadata/test/test_oai_list_identifiers_parameters.py new file mode 100644 index 0000000000000000000000000000000000000000..8778bd0af79d5fe4438b736e55cdf992d5131e96 --- /dev/null +++ b/swagger/api-metadata/test/test_oai_list_identifiers_parameters.py @@ -0,0 +1,39 @@ +# 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 +""" + +from __future__ import absolute_import + +import unittest + +import swagger_client +from swagger_client.models.oai_list_identifiers_parameters import OaiListIdentifiersParameters # noqa: E501 +from swagger_client.rest import ApiException + + +class TestOaiListIdentifiersParameters(unittest.TestCase): + """OaiListIdentifiersParameters unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOaiListIdentifiersParameters(self): + """Test OaiListIdentifiersParameters""" + # FIXME: construct object with mandatory attributes with example values + # model = swagger_client.models.oai_list_identifiers_parameters.OaiListIdentifiersParameters() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/swagger/api-metadata/tox.ini b/swagger/api-metadata/tox.ini new file mode 100644 index 0000000000000000000000000000000000000000..a310bec97d689718c92c84c9aebc6ab031f12933 --- /dev/null +++ b/swagger/api-metadata/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] diff --git a/swagger/api-query.yaml b/swagger/api-query.yaml index 270b9c034f10ddf8489a4fafb3e2a0d37e09f9ec..672bcd6b6755d9da9eb0f7bd1ce6886794973395 100644 --- a/swagger/api-query.yaml +++ b/swagger/api-query.yaml @@ -60,6 +60,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -74,6 +80,8 @@ paths: type: array items: $ref: '#/components/schemas/TableHistoryDto' + security: + - bearerAuth: [] head: tags: - table-history-endpoint @@ -117,6 +125,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -131,6 +145,8 @@ paths: type: array items: $ref: '#/components/schemas/TableHistoryDto' + security: + - bearerAuth: [] /api/container/{id}/database/{databaseId}/table/{tableId}/data: get: tags: @@ -193,6 +209,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -256,6 +278,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -315,6 +343,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -374,6 +408,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -445,6 +485,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -497,6 +543,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -510,7 +562,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/QueryDto' + $ref: '#/components/schemas/QueryBriefDto' security: - bearerAuth: [] put: @@ -568,6 +620,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -626,6 +684,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -695,6 +759,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -759,56 +829,8 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' - "405": - description: Method Not Allowed - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "200": - description: OK - security: - - bearerAuth: [] - /api/container/{id}/database/{databaseId}/table/{tableId}/consumer: - post: - tags: - - consumer-endpoint - summary: Declare consumer - operationId: declare - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Not Found - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "400": - description: Bad Request - content: - '*/*': - schema: - $ref: '#/components/schemas/ApiErrorDto' - "409": - description: Conflict + "423": + description: Locked content: '*/*': schema: @@ -873,6 +895,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -932,6 +960,12 @@ paths: '*/*': schema: $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' "405": description: Method Not Allowed content: @@ -1157,33 +1191,34 @@ components: type: string ip_address: type: string - is_public: - type: boolean DatabaseDto: required: - - creator - - exchange - - id - - internal_name - - name - - publication_year + - database creator + - database description + - database exchange + - database id + - database internal name + - database name type: object properties: - id: + database id: type: integer format: int64 - name: + example: 1 + database name: type: string - exchange: + example: Weather Australia + database exchange: type: string - creator: + database creator: $ref: '#/components/schemas/UserBriefDto' - subjects: + database subjects: type: array items: type: string - language: + database language: type: string + example: EN enum: - ab - aa @@ -1369,34 +1404,43 @@ components: - yo - za - zu - license: + database license: $ref: '#/components/schemas/LicenseDto' - description: + database description: type: string - publisher: + example: Weather Australia 2009-2021 + database publisher: type: string - contact: + example: TU Wien + database contact person: $ref: '#/components/schemas/UserDto' tables: type: array items: $ref: '#/components/schemas/TableBriefDto' - image: + database container image: $ref: '#/components/schemas/ImageDto' container: $ref: '#/components/schemas/ContainerDto' - created: + database creation time: type: string format: date-time deleted: type: string format: date-time - internal_name: + database internal name: type: string - publication_year: + example: weather_australia + database publication year: + type: integer + format: int32 + database publication month: + type: integer + format: int32 + database publication day: type: integer format: int32 - is_public: + database public: type: boolean GrantedAuthorityDto: type: object @@ -1514,7 +1558,8 @@ components: type: string uri: type: string - QueryDto: + example: MIT2 + QueryBriefDto: required: - cid - created @@ -1575,6 +1620,7 @@ components: type: string UserBriefDto: required: + - email_verified - id - theme_dark - username @@ -1599,9 +1645,12 @@ components: type: string theme_dark: type: boolean + email_verified: + type: boolean UserDto: required: - email + - email_verified - id - theme_dark - username @@ -1646,6 +1695,48 @@ components: type: boolean email_verified: type: boolean + QueryDto: + required: + - cid + - created + - creator + - dbid + - id + - query + - query_hash + type: object + properties: + id: + type: integer + format: int64 + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/UserDto' + execution: + type: string + format: date-time + query: + type: string + created: + type: string + format: date-time + query_normalized: + type: string + query_hash: + type: string + result_hash: + type: string + result_number: + type: integer + format: int64 + last_modified: + type: string + format: date-time TableCsvDeleteDto: required: - keys diff --git a/swagger/api-query/README.md b/swagger/api-query/README.md index 7cb1d7656f089a90c05c5b4fd75cf1c397893919..4e3be02a520f2c7b3ea32c68f8fc702625a7ce41 100644 --- a/swagger/api-query/README.md +++ b/swagger/api-query/README.md @@ -53,16 +53,18 @@ from pprint import pprint # create an instance of the API class -api_instance = swagger_client.ConsumerEndpointApi(swagger_client.ApiClient(configuration)) +api_instance = swagger_client.ExportEndpointApi(swagger_client.ApiClient(configuration)) id = 789 # int | database_id = 789 # int | table_id = 789 # int | +timestamp = '2013-10-20T19:20:30+01:00' # datetime | (optional) try: - # Declare consumer - api_instance.declare(id, database_id, table_id) + # Export table + api_response = api_instance.export(id, database_id, table_id, timestamp=timestamp) + pprint(api_response) except ApiException as e: - print("Exception when calling ConsumerEndpointApi->declare: %s\n" % e) + print("Exception when calling ExportEndpointApi->export: %s\n" % e) ``` ## Documentation for API Endpoints @@ -71,7 +73,6 @@ All URIs are relative to *http://localhost:9093* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ConsumerEndpointApi* | [**declare**](docs/ConsumerEndpointApi.md#declare) | **POST** /api/container/{id}/database/{databaseId}/table/{tableId}/consumer | Declare consumer *ExportEndpointApi* | [**export**](docs/ExportEndpointApi.md#export) | **GET** /api/container/{id}/database/{databaseId}/table/{tableId}/export | Export table *QueryEndpointApi* | [**execute**](docs/QueryEndpointApi.md#execute) | **PUT** /api/container/{id}/database/{databaseId}/query | Execute query *QueryEndpointApi* | [**export1**](docs/QueryEndpointApi.md#export1) | **GET** /api/container/{id}/database/{databaseId}/query/{queryId}/export | Exports some query @@ -100,6 +101,7 @@ Class | Method | HTTP request | Description - [ImageEnvItemDto](docs/ImageEnvItemDto.md) - [ImportDto](docs/ImportDto.md) - [LicenseDto](docs/LicenseDto.md) + - [QueryBriefDto](docs/QueryBriefDto.md) - [QueryDto](docs/QueryDto.md) - [QueryResultDto](docs/QueryResultDto.md) - [TableBriefDto](docs/TableBriefDto.md) diff --git a/swagger/api-query/swagger_client/__init__.py b/swagger/api-query/swagger_client/__init__.py index 8ef49f9ac19b9bca3e12d0bda9192bd36210feae..3939c5d6694e24ee9c51e646183ce681178a9805 100644 --- a/swagger/api-query/swagger_client/__init__.py +++ b/swagger/api-query/swagger_client/__init__.py @@ -15,7 +15,6 @@ from __future__ import absolute_import # import apis into sdk package -from swagger_client.api.consumer_endpoint_api import ConsumerEndpointApi from swagger_client.api.export_endpoint_api import ExportEndpointApi from swagger_client.api.query_endpoint_api import QueryEndpointApi from swagger_client.api.store_endpoint_api import StoreEndpointApi @@ -36,6 +35,7 @@ from swagger_client.models.image_dto import ImageDto from swagger_client.models.image_env_item_dto import ImageEnvItemDto from swagger_client.models.import_dto import ImportDto from swagger_client.models.license_dto import LicenseDto +from swagger_client.models.query_brief_dto import QueryBriefDto from swagger_client.models.query_dto import QueryDto from swagger_client.models.query_result_dto import QueryResultDto from swagger_client.models.table_brief_dto import TableBriefDto diff --git a/swagger/api-query/swagger_client/api/__init__.py b/swagger/api-query/swagger_client/api/__init__.py index d07634c88d6cde12c309226cfc9cdbbf7d86ab58..8cd0d5ba13be8b42d4776ce46721dcf5795ec76c 100644 --- a/swagger/api-query/swagger_client/api/__init__.py +++ b/swagger/api-query/swagger_client/api/__init__.py @@ -3,7 +3,6 @@ from __future__ import absolute_import # flake8: noqa # import apis into api package -from swagger_client.api.consumer_endpoint_api import ConsumerEndpointApi from swagger_client.api.export_endpoint_api import ExportEndpointApi from swagger_client.api.query_endpoint_api import QueryEndpointApi from swagger_client.api.store_endpoint_api import StoreEndpointApi diff --git a/swagger/api-query/swagger_client/api/store_endpoint_api.py b/swagger/api-query/swagger_client/api/store_endpoint_api.py index 397a5ebd6b8106d926ed968ee9ae976981940099..8fb0a1a3f1017a86346921765659d82d07ba919e 100644 --- a/swagger/api-query/swagger_client/api/store_endpoint_api.py +++ b/swagger/api-query/swagger_client/api/store_endpoint_api.py @@ -152,7 +152,7 @@ class StoreEndpointApi(object): :param async_req bool :param int id: (required) :param int database_id: (required) - :return: list[QueryDto] + :return: list[QueryBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -174,7 +174,7 @@ class StoreEndpointApi(object): :param async_req bool :param int id: (required) :param int database_id: (required) - :return: list[QueryDto] + :return: list[QueryBriefDto] If the method is called asynchronously, returns the request thread. """ @@ -234,7 +234,7 @@ class StoreEndpointApi(object): body=body_params, post_params=form_params, files=local_var_files, - response_type='list[QueryDto]', # noqa: E501 + response_type='list[QueryBriefDto]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/swagger/api-query/swagger_client/api/table_history_endpoint_api.py b/swagger/api-query/swagger_client/api/table_history_endpoint_api.py index 321fac2ee93110fb348c8ad8fce3d03e63160881..8217454744ae26f0346a0cf309c2a91cdba78135 100644 --- a/swagger/api-query/swagger_client/api/table_history_endpoint_api.py +++ b/swagger/api-query/swagger_client/api/table_history_endpoint_api.py @@ -123,7 +123,7 @@ class TableHistoryEndpointApi(object): ['*/*']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['bearerAuth'] # noqa: E501 return self.api_client.call_api( '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'GET', @@ -232,7 +232,7 @@ class TableHistoryEndpointApi(object): ['*/*']) # noqa: E501 # Authentication setting - auth_settings = [] # noqa: E501 + auth_settings = ['bearerAuth'] # noqa: E501 return self.api_client.call_api( '/api/container/{id}/database/{databaseId}/table/{tableId}/history', 'HEAD', diff --git a/swagger/api-query/swagger_client/models/__init__.py b/swagger/api-query/swagger_client/models/__init__.py index 1361133303c66beb780bb839df349f1e99ec2093..0b71dca38c5432df28a8d36d5c8710858e89fcfe 100644 --- a/swagger/api-query/swagger_client/models/__init__.py +++ b/swagger/api-query/swagger_client/models/__init__.py @@ -25,6 +25,7 @@ from swagger_client.models.image_dto import ImageDto from swagger_client.models.image_env_item_dto import ImageEnvItemDto from swagger_client.models.import_dto import ImportDto from swagger_client.models.license_dto import LicenseDto +from swagger_client.models.query_brief_dto import QueryBriefDto from swagger_client.models.query_dto import QueryDto from swagger_client.models.query_result_dto import QueryResultDto from swagger_client.models.table_brief_dto import TableBriefDto diff --git a/swagger/api-query/swagger_client/models/container_dto.py b/swagger/api-query/swagger_client/models/container_dto.py index 6776f130533acac43b95188fa3a834a96c3e4c97..2bb0a530aae1ed016e1daa786724eccfa9f3f95a 100644 --- a/swagger/api-query/swagger_client/models/container_dto.py +++ b/swagger/api-query/swagger_client/models/container_dto.py @@ -37,8 +37,7 @@ class ContainerDto(object): 'port': 'int', 'created': 'datetime', 'internal_name': 'str', - 'ip_address': 'str', - 'is_public': 'bool' + 'ip_address': 'str' } attribute_map = { @@ -51,11 +50,10 @@ class ContainerDto(object): 'port': 'port', 'created': 'created', 'internal_name': 'internal_name', - 'ip_address': 'ip_address', - 'is_public': 'is_public' + 'ip_address': 'ip_address' } - def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None, is_public=None): # noqa: E501 + def __init__(self, id=None, hash=None, name=None, state=None, databases=None, image=None, port=None, created=None, internal_name=None, ip_address=None): # noqa: E501 """ContainerDto - a model defined in Swagger""" # noqa: E501 self._id = None self._hash = None @@ -67,7 +65,6 @@ class ContainerDto(object): self._created = None self._internal_name = None self._ip_address = None - self._is_public = None self.discriminator = None self.id = id self.hash = hash @@ -84,8 +81,6 @@ class ContainerDto(object): self.internal_name = internal_name if ip_address is not None: self.ip_address = ip_address - if is_public is not None: - self.is_public = is_public @property def id(self): @@ -313,27 +308,6 @@ class ContainerDto(object): self._ip_address = ip_address - @property - def is_public(self): - """Gets the is_public of this ContainerDto. # noqa: E501 - - - :return: The is_public of this ContainerDto. # noqa: E501 - :rtype: bool - """ - return self._is_public - - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this ContainerDto. - - - :param is_public: The is_public of this ContainerDto. # noqa: E501 - :type: bool - """ - - self._is_public = is_public - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-query/swagger_client/models/database_dto.py b/swagger/api-query/swagger_client/models/database_dto.py index a6cbe93ef828694fc41e70f0dc370ee8fdd900f0..fb94bfb4d9045bb7ad5ff5789c279538827cdf25 100644 --- a/swagger/api-query/swagger_client/models/database_dto.py +++ b/swagger/api-query/swagger_client/models/database_dto.py @@ -28,322 +28,334 @@ class DatabaseDto(object): and the value is json key in definition. """ swagger_types = { - 'id': 'int', - 'name': 'str', - 'exchange': 'str', - 'creator': 'UserBriefDto', - 'subjects': 'list[str]', - 'language': 'str', - 'license': 'LicenseDto', - 'description': 'str', - 'publisher': 'str', - 'contact': 'UserDto', + 'database_id': 'int', + 'database_name': 'str', + 'database_exchange': 'str', + 'database_creator': 'UserBriefDto', + 'database_subjects': 'list[str]', + 'database_language': 'str', + 'database_license': 'LicenseDto', + 'database_description': 'str', + 'database_publisher': 'str', + 'database_contact_person': 'UserDto', 'tables': 'list[TableBriefDto]', - 'image': 'ImageDto', + 'database_container_image': 'ImageDto', 'container': 'ContainerDto', - 'created': 'datetime', + 'database_creation_time': 'datetime', 'deleted': 'datetime', - 'internal_name': 'str', - 'publication_year': 'int', - 'is_public': 'bool' + 'database_internal_name': 'str', + 'database_publication_year': 'int', + 'database_publication_month': 'int', + 'database_publication_day': 'int', + 'database_public': 'bool' } attribute_map = { - 'id': 'id', - 'name': 'name', - 'exchange': 'exchange', - 'creator': 'creator', - 'subjects': 'subjects', - 'language': 'language', - 'license': 'license', - 'description': 'description', - 'publisher': 'publisher', - 'contact': 'contact', + 'database_id': 'database id', + 'database_name': 'database name', + 'database_exchange': 'database exchange', + 'database_creator': 'database creator', + 'database_subjects': 'database subjects', + 'database_language': 'database language', + 'database_license': 'database license', + 'database_description': 'database description', + 'database_publisher': 'database publisher', + 'database_contact_person': 'database contact person', 'tables': 'tables', - 'image': 'image', + 'database_container_image': 'database container image', 'container': 'container', - 'created': 'created', + 'database_creation_time': 'database creation time', 'deleted': 'deleted', - 'internal_name': 'internal_name', - 'publication_year': 'publication_year', - 'is_public': 'is_public' + 'database_internal_name': 'database internal name', + 'database_publication_year': 'database publication year', + 'database_publication_month': 'database publication month', + 'database_publication_day': 'database publication day', + 'database_public': 'database public' } - def __init__(self, id=None, name=None, exchange=None, creator=None, subjects=None, language=None, license=None, description=None, publisher=None, contact=None, tables=None, image=None, container=None, created=None, deleted=None, internal_name=None, publication_year=None, is_public=None): # noqa: E501 + def __init__(self, database_id=None, database_name=None, database_exchange=None, database_creator=None, database_subjects=None, database_language=None, database_license=None, database_description=None, database_publisher=None, database_contact_person=None, tables=None, database_container_image=None, container=None, database_creation_time=None, deleted=None, database_internal_name=None, database_publication_year=None, database_publication_month=None, database_publication_day=None, database_public=None): # noqa: E501 """DatabaseDto - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._exchange = None - self._creator = None - self._subjects = None - self._language = None - self._license = None - self._description = None - self._publisher = None - self._contact = None + self._database_id = None + self._database_name = None + self._database_exchange = None + self._database_creator = None + self._database_subjects = None + self._database_language = None + self._database_license = None + self._database_description = None + self._database_publisher = None + self._database_contact_person = None self._tables = None - self._image = None + self._database_container_image = None self._container = None - self._created = None + self._database_creation_time = None self._deleted = None - self._internal_name = None - self._publication_year = None - self._is_public = None + self._database_internal_name = None + self._database_publication_year = None + self._database_publication_month = None + self._database_publication_day = None + self._database_public = None self.discriminator = None - self.id = id - self.name = name - self.exchange = exchange - self.creator = creator - if subjects is not None: - self.subjects = subjects - if language is not None: - self.language = language - if license is not None: - self.license = license - if description is not None: - self.description = description - if publisher is not None: - self.publisher = publisher - if contact is not None: - self.contact = contact + self.database_id = database_id + self.database_name = database_name + self.database_exchange = database_exchange + self.database_creator = database_creator + if database_subjects is not None: + self.database_subjects = database_subjects + if database_language is not None: + self.database_language = database_language + if database_license is not None: + self.database_license = database_license + self.database_description = database_description + if database_publisher is not None: + self.database_publisher = database_publisher + if database_contact_person is not None: + self.database_contact_person = database_contact_person if tables is not None: self.tables = tables - if image is not None: - self.image = image + if database_container_image is not None: + self.database_container_image = database_container_image if container is not None: self.container = container - if created is not None: - self.created = created + if database_creation_time is not None: + self.database_creation_time = database_creation_time if deleted is not None: self.deleted = deleted - self.internal_name = internal_name - self.publication_year = publication_year - if is_public is not None: - self.is_public = is_public + self.database_internal_name = database_internal_name + if database_publication_year is not None: + self.database_publication_year = database_publication_year + if database_publication_month is not None: + self.database_publication_month = database_publication_month + if database_publication_day is not None: + self.database_publication_day = database_publication_day + if database_public is not None: + self.database_public = database_public @property - def id(self): - """Gets the id of this DatabaseDto. # noqa: E501 + def database_id(self): + """Gets the database_id of this DatabaseDto. # noqa: E501 - :return: The id of this DatabaseDto. # noqa: E501 + :return: The database_id of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._id + return self._database_id - @id.setter - def id(self, id): - """Sets the id of this DatabaseDto. + @database_id.setter + def database_id(self, database_id): + """Sets the database_id of this DatabaseDto. - :param id: The id of this DatabaseDto. # noqa: E501 + :param database_id: The database_id of this DatabaseDto. # noqa: E501 :type: int """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + if database_id is None: + raise ValueError("Invalid value for `database_id`, must not be `None`") # noqa: E501 - self._id = id + self._database_id = database_id @property - def name(self): - """Gets the name of this DatabaseDto. # noqa: E501 + def database_name(self): + """Gets the database_name of this DatabaseDto. # noqa: E501 - :return: The name of this DatabaseDto. # noqa: E501 + :return: The database_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._name + return self._database_name - @name.setter - def name(self, name): - """Sets the name of this DatabaseDto. + @database_name.setter + def database_name(self, database_name): + """Sets the database_name of this DatabaseDto. - :param name: The name of this DatabaseDto. # noqa: E501 + :param database_name: The database_name of this DatabaseDto. # noqa: E501 :type: str """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + if database_name is None: + raise ValueError("Invalid value for `database_name`, must not be `None`") # noqa: E501 - self._name = name + self._database_name = database_name @property - def exchange(self): - """Gets the exchange of this DatabaseDto. # noqa: E501 + def database_exchange(self): + """Gets the database_exchange of this DatabaseDto. # noqa: E501 - :return: The exchange of this DatabaseDto. # noqa: E501 + :return: The database_exchange of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._exchange + return self._database_exchange - @exchange.setter - def exchange(self, exchange): - """Sets the exchange of this DatabaseDto. + @database_exchange.setter + def database_exchange(self, database_exchange): + """Sets the database_exchange of this DatabaseDto. - :param exchange: The exchange of this DatabaseDto. # noqa: E501 + :param database_exchange: The database_exchange of this DatabaseDto. # noqa: E501 :type: str """ - if exchange is None: - raise ValueError("Invalid value for `exchange`, must not be `None`") # noqa: E501 + if database_exchange is None: + raise ValueError("Invalid value for `database_exchange`, must not be `None`") # noqa: E501 - self._exchange = exchange + self._database_exchange = database_exchange @property - def creator(self): - """Gets the creator of this DatabaseDto. # noqa: E501 + def database_creator(self): + """Gets the database_creator of this DatabaseDto. # noqa: E501 - :return: The creator of this DatabaseDto. # noqa: E501 + :return: The database_creator of this DatabaseDto. # noqa: E501 :rtype: UserBriefDto """ - return self._creator + return self._database_creator - @creator.setter - def creator(self, creator): - """Sets the creator of this DatabaseDto. + @database_creator.setter + def database_creator(self, database_creator): + """Sets the database_creator of this DatabaseDto. - :param creator: The creator of this DatabaseDto. # noqa: E501 + :param database_creator: The database_creator of this DatabaseDto. # noqa: E501 :type: UserBriefDto """ - if creator is None: - raise ValueError("Invalid value for `creator`, must not be `None`") # noqa: E501 + if database_creator is None: + raise ValueError("Invalid value for `database_creator`, must not be `None`") # noqa: E501 - self._creator = creator + self._database_creator = database_creator @property - def subjects(self): - """Gets the subjects of this DatabaseDto. # noqa: E501 + def database_subjects(self): + """Gets the database_subjects of this DatabaseDto. # noqa: E501 - :return: The subjects of this DatabaseDto. # noqa: E501 + :return: The database_subjects of this DatabaseDto. # noqa: E501 :rtype: list[str] """ - return self._subjects + return self._database_subjects - @subjects.setter - def subjects(self, subjects): - """Sets the subjects of this DatabaseDto. + @database_subjects.setter + def database_subjects(self, database_subjects): + """Sets the database_subjects of this DatabaseDto. - :param subjects: The subjects of this DatabaseDto. # noqa: E501 + :param database_subjects: The database_subjects of this DatabaseDto. # noqa: E501 :type: list[str] """ - self._subjects = subjects + self._database_subjects = database_subjects @property - def language(self): - """Gets the language of this DatabaseDto. # noqa: E501 + def database_language(self): + """Gets the database_language of this DatabaseDto. # noqa: E501 - :return: The language of this DatabaseDto. # noqa: E501 + :return: The database_language of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._language + return self._database_language - @language.setter - def language(self, language): - """Sets the language of this DatabaseDto. + @database_language.setter + def database_language(self, database_language): + """Sets the database_language of this DatabaseDto. - :param language: The language of this DatabaseDto. # noqa: E501 + :param database_language: The database_language of this DatabaseDto. # 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: + if database_language not in allowed_values: raise ValueError( - "Invalid value for `language` ({0}), must be one of {1}" # noqa: E501 - .format(language, allowed_values) + "Invalid value for `database_language` ({0}), must be one of {1}" # noqa: E501 + .format(database_language, allowed_values) ) - self._language = language + self._database_language = database_language @property - def license(self): - """Gets the license of this DatabaseDto. # noqa: E501 + def database_license(self): + """Gets the database_license of this DatabaseDto. # noqa: E501 - :return: The license of this DatabaseDto. # noqa: E501 + :return: The database_license of this DatabaseDto. # noqa: E501 :rtype: LicenseDto """ - return self._license + return self._database_license - @license.setter - def license(self, license): - """Sets the license of this DatabaseDto. + @database_license.setter + def database_license(self, database_license): + """Sets the database_license of this DatabaseDto. - :param license: The license of this DatabaseDto. # noqa: E501 + :param database_license: The database_license of this DatabaseDto. # noqa: E501 :type: LicenseDto """ - self._license = license + self._database_license = database_license @property - def description(self): - """Gets the description of this DatabaseDto. # noqa: E501 + def database_description(self): + """Gets the database_description of this DatabaseDto. # noqa: E501 - :return: The description of this DatabaseDto. # noqa: E501 + :return: The database_description of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._description + return self._database_description - @description.setter - def description(self, description): - """Sets the description of this DatabaseDto. + @database_description.setter + def database_description(self, database_description): + """Sets the database_description of this DatabaseDto. - :param description: The description of this DatabaseDto. # noqa: E501 + :param database_description: The database_description of this DatabaseDto. # noqa: E501 :type: str """ + if database_description is None: + raise ValueError("Invalid value for `database_description`, must not be `None`") # noqa: E501 - self._description = description + self._database_description = database_description @property - def publisher(self): - """Gets the publisher of this DatabaseDto. # noqa: E501 + def database_publisher(self): + """Gets the database_publisher of this DatabaseDto. # noqa: E501 - :return: The publisher of this DatabaseDto. # noqa: E501 + :return: The database_publisher of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._publisher + return self._database_publisher - @publisher.setter - def publisher(self, publisher): - """Sets the publisher of this DatabaseDto. + @database_publisher.setter + def database_publisher(self, database_publisher): + """Sets the database_publisher of this DatabaseDto. - :param publisher: The publisher of this DatabaseDto. # noqa: E501 + :param database_publisher: The database_publisher of this DatabaseDto. # noqa: E501 :type: str """ - self._publisher = publisher + self._database_publisher = database_publisher @property - def contact(self): - """Gets the contact of this DatabaseDto. # noqa: E501 + def database_contact_person(self): + """Gets the database_contact_person of this DatabaseDto. # noqa: E501 - :return: The contact of this DatabaseDto. # noqa: E501 + :return: The database_contact_person of this DatabaseDto. # noqa: E501 :rtype: UserDto """ - return self._contact + return self._database_contact_person - @contact.setter - def contact(self, contact): - """Sets the contact of this DatabaseDto. + @database_contact_person.setter + def database_contact_person(self, database_contact_person): + """Sets the database_contact_person of this DatabaseDto. - :param contact: The contact of this DatabaseDto. # noqa: E501 + :param database_contact_person: The database_contact_person of this DatabaseDto. # noqa: E501 :type: UserDto """ - self._contact = contact + self._database_contact_person = database_contact_person @property def tables(self): @@ -367,25 +379,25 @@ class DatabaseDto(object): self._tables = tables @property - def image(self): - """Gets the image of this DatabaseDto. # noqa: E501 + def database_container_image(self): + """Gets the database_container_image of this DatabaseDto. # noqa: E501 - :return: The image of this DatabaseDto. # noqa: E501 + :return: The database_container_image of this DatabaseDto. # noqa: E501 :rtype: ImageDto """ - return self._image + return self._database_container_image - @image.setter - def image(self, image): - """Sets the image of this DatabaseDto. + @database_container_image.setter + def database_container_image(self, database_container_image): + """Sets the database_container_image of this DatabaseDto. - :param image: The image of this DatabaseDto. # noqa: E501 + :param database_container_image: The database_container_image of this DatabaseDto. # noqa: E501 :type: ImageDto """ - self._image = image + self._database_container_image = database_container_image @property def container(self): @@ -409,25 +421,25 @@ class DatabaseDto(object): self._container = container @property - def created(self): - """Gets the created of this DatabaseDto. # noqa: E501 + def database_creation_time(self): + """Gets the database_creation_time of this DatabaseDto. # noqa: E501 - :return: The created of this DatabaseDto. # noqa: E501 + :return: The database_creation_time of this DatabaseDto. # noqa: E501 :rtype: datetime """ - return self._created + return self._database_creation_time - @created.setter - def created(self, created): - """Sets the created of this DatabaseDto. + @database_creation_time.setter + def database_creation_time(self, database_creation_time): + """Sets the database_creation_time of this DatabaseDto. - :param created: The created of this DatabaseDto. # noqa: E501 + :param database_creation_time: The database_creation_time of this DatabaseDto. # noqa: E501 :type: datetime """ - self._created = created + self._database_creation_time = database_creation_time @property def deleted(self): @@ -451,71 +463,111 @@ class DatabaseDto(object): self._deleted = deleted @property - def internal_name(self): - """Gets the internal_name of this DatabaseDto. # noqa: E501 + def database_internal_name(self): + """Gets the database_internal_name of this DatabaseDto. # noqa: E501 - :return: The internal_name of this DatabaseDto. # noqa: E501 + :return: The database_internal_name of this DatabaseDto. # noqa: E501 :rtype: str """ - return self._internal_name + return self._database_internal_name - @internal_name.setter - def internal_name(self, internal_name): - """Sets the internal_name of this DatabaseDto. + @database_internal_name.setter + def database_internal_name(self, database_internal_name): + """Sets the database_internal_name of this DatabaseDto. - :param internal_name: The internal_name of this DatabaseDto. # noqa: E501 + :param database_internal_name: The database_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 + if database_internal_name is None: + raise ValueError("Invalid value for `database_internal_name`, must not be `None`") # noqa: E501 - self._internal_name = internal_name + self._database_internal_name = database_internal_name @property - def publication_year(self): - """Gets the publication_year of this DatabaseDto. # noqa: E501 + def database_publication_year(self): + """Gets the database_publication_year of this DatabaseDto. # noqa: E501 - :return: The publication_year of this DatabaseDto. # noqa: E501 + :return: The database_publication_year of this DatabaseDto. # noqa: E501 :rtype: int """ - return self._publication_year + return self._database_publication_year - @publication_year.setter - def publication_year(self, publication_year): - """Sets the publication_year of this DatabaseDto. + @database_publication_year.setter + def database_publication_year(self, database_publication_year): + """Sets the database_publication_year of this DatabaseDto. - :param publication_year: The publication_year of this DatabaseDto. # noqa: E501 + :param database_publication_year: The database_publication_year of this DatabaseDto. # 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 + self._database_publication_year = database_publication_year @property - def is_public(self): - """Gets the is_public of this DatabaseDto. # noqa: E501 + def database_publication_month(self): + """Gets the database_publication_month of this DatabaseDto. # noqa: E501 - :return: The is_public of this DatabaseDto. # noqa: E501 + :return: The database_publication_month of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_month + + @database_publication_month.setter + def database_publication_month(self, database_publication_month): + """Sets the database_publication_month of this DatabaseDto. + + + :param database_publication_month: The database_publication_month of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_month = database_publication_month + + @property + def database_publication_day(self): + """Gets the database_publication_day of this DatabaseDto. # noqa: E501 + + + :return: The database_publication_day of this DatabaseDto. # noqa: E501 + :rtype: int + """ + return self._database_publication_day + + @database_publication_day.setter + def database_publication_day(self, database_publication_day): + """Sets the database_publication_day of this DatabaseDto. + + + :param database_publication_day: The database_publication_day of this DatabaseDto. # noqa: E501 + :type: int + """ + + self._database_publication_day = database_publication_day + + @property + def database_public(self): + """Gets the database_public of this DatabaseDto. # noqa: E501 + + + :return: The database_public of this DatabaseDto. # noqa: E501 :rtype: bool """ - return self._is_public + return self._database_public - @is_public.setter - def is_public(self, is_public): - """Sets the is_public of this DatabaseDto. + @database_public.setter + def database_public(self, database_public): + """Sets the database_public of this DatabaseDto. - :param is_public: The is_public of this DatabaseDto. # noqa: E501 + :param database_public: The database_public of this DatabaseDto. # noqa: E501 :type: bool """ - self._is_public = is_public + self._database_public = database_public def to_dict(self): """Returns the model properties as a dict""" diff --git a/swagger/api-query/swagger_client/models/user_brief_dto.py b/swagger/api-query/swagger_client/models/user_brief_dto.py index 9e904e7012e868c66538843d4ca1e6b8cc3b50cc..20e36cd32ecd6911d7a6b34c83695e997df801c3 100644 --- a/swagger/api-query/swagger_client/models/user_brief_dto.py +++ b/swagger/api-query/swagger_client/models/user_brief_dto.py @@ -36,7 +36,8 @@ class UserBriefDto(object): 'orcid': 'str', 'titles_before': 'str', 'titles_after': 'str', - 'theme_dark': 'bool' + 'theme_dark': 'bool', + 'email_verified': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class UserBriefDto(object): 'orcid': 'orcid', 'titles_before': 'titles_before', 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark' + 'theme_dark': 'theme_dark', + 'email_verified': 'email_verified' } - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None): # noqa: E501 + def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 """UserBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._username = None @@ -62,6 +64,7 @@ class UserBriefDto(object): self._titles_before = None self._titles_after = None self._theme_dark = None + self._email_verified = None self.discriminator = None self.id = id self.username = username @@ -78,6 +81,7 @@ class UserBriefDto(object): 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): @@ -274,6 +278,29 @@ class UserBriefDto(object): self._theme_dark = theme_dark + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + if email_verified is None: + raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 + + self._email_verified = email_verified + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/api-query/swagger_client/models/user_dto.py b/swagger/api-query/swagger_client/models/user_dto.py index 86827496d3dd009a28fd6f35faac7573b153922f..e0f2dc8d8c065a386cc5c758b7f344328324d94f 100644 --- a/swagger/api-query/swagger_client/models/user_dto.py +++ b/swagger/api-query/swagger_client/models/user_dto.py @@ -105,8 +105,7 @@ class UserDto(object): if titles_after is not None: self.titles_after = titles_after self.theme_dark = theme_dark - if email_verified is not None: - self.email_verified = email_verified + self.email_verified = email_verified @property def id(self): @@ -428,6 +427,8 @@ class UserDto(object): :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 diff --git a/swagger/api-table.yaml b/swagger/api-table.yaml index 672f1f1a7d8ebb88714b72577a6d42e42debb747..20727c9f3705b3e2812c0b946f297ff0dfb2ac0c 100644 --- a/swagger/api-table.yaml +++ b/swagger/api-table.yaml @@ -428,6 +428,7 @@ components: type: string UserBriefDto: required: + - email_verified - id - theme_dark - username @@ -452,6 +453,8 @@ components: type: string theme_dark: type: boolean + email_verified: + type: boolean ColumnCreateDto: required: - name diff --git a/swagger/api-table/swagger_client/models/user_brief_dto.py b/swagger/api-table/swagger_client/models/user_brief_dto.py index ef44af8a6330b2d1fb048857b4adb2296ccd8834..b1a6948e55b41d14a0f10197b30a206c1bf0dc74 100644 --- a/swagger/api-table/swagger_client/models/user_brief_dto.py +++ b/swagger/api-table/swagger_client/models/user_brief_dto.py @@ -36,7 +36,8 @@ class UserBriefDto(object): 'orcid': 'str', 'titles_before': 'str', 'titles_after': 'str', - 'theme_dark': 'bool' + 'theme_dark': 'bool', + 'email_verified': 'bool' } attribute_map = { @@ -48,10 +49,11 @@ class UserBriefDto(object): 'orcid': 'orcid', 'titles_before': 'titles_before', 'titles_after': 'titles_after', - 'theme_dark': 'theme_dark' + 'theme_dark': 'theme_dark', + 'email_verified': 'email_verified' } - def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None): # noqa: E501 + def __init__(self, id=None, username=None, firstname=None, lastname=None, affiliation=None, orcid=None, titles_before=None, titles_after=None, theme_dark=None, email_verified=None): # noqa: E501 """UserBriefDto - a model defined in Swagger""" # noqa: E501 self._id = None self._username = None @@ -62,6 +64,7 @@ class UserBriefDto(object): self._titles_before = None self._titles_after = None self._theme_dark = None + self._email_verified = None self.discriminator = None self.id = id self.username = username @@ -78,6 +81,7 @@ class UserBriefDto(object): 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): @@ -274,6 +278,29 @@ class UserBriefDto(object): self._theme_dark = theme_dark + @property + def email_verified(self): + """Gets the email_verified of this UserBriefDto. # noqa: E501 + + + :return: The email_verified of this UserBriefDto. # noqa: E501 + :rtype: bool + """ + return self._email_verified + + @email_verified.setter + def email_verified(self, email_verified): + """Sets the email_verified of this UserBriefDto. + + + :param email_verified: The email_verified of this UserBriefDto. # noqa: E501 + :type: bool + """ + if email_verified is None: + raise ValueError("Invalid value for `email_verified`, must not be `None`") # noqa: E501 + + self._email_verified = email_verified + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/swagger/generate.sh b/swagger/generate.sh index d71b1c30de4ee0a099d7e92485f9b0beae36e6b4..8cc5a5476879b84bda07b65a77e04c6114eb74d3 100755 --- a/swagger/generate.sh +++ b/swagger/generate.sh @@ -8,6 +8,7 @@ services[9093]=query services[9094]=table services[9097]=authentication services[9096]=identifier +services[9098]=metadata function retrieve () { echo "... retrieve api"