update service generation

This commit is contained in:
Fransolet Thomas 2022-10-19 17:53:27 +02:00
parent 20543dc883
commit 65e501f852
47 changed files with 3376 additions and 82 deletions

View File

@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-09-29 18:26:21.662024","version":"3.0.3"} {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.0.3+1\\\\","native_build":true,"dependencies":[]}],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-10-19 16:40:10.000329","version":"3.0.3"}

View File

View File

View File

View File

@ -5,5 +5,11 @@ import 'package:openapi_generator_annotations/openapi_generator_annotations.dart
AdditionalProperties(pubName: 'manager_api', pubAuthor: 'Fransolet Thomas', useEnumExtension: true), AdditionalProperties(pubName: 'manager_api', pubAuthor: 'Fransolet Thomas', useEnumExtension: true),
inputSpecFile: 'lib/api/swagger.yaml', inputSpecFile: 'lib/api/swagger.yaml',
generatorName: Generator.dart, generatorName: Generator.dart,
alwaysRun: true,
outputDirectory: 'manager_api') outputDirectory: 'manager_api')
class Example extends OpenapiGeneratorConfig {} class Example extends OpenapiGeneratorConfig {}
/*
RUN
>flutter pub run build_runner build --delete-conflicting-outputs
*/

View File

@ -5,13 +5,20 @@ info:
description: API Manager Service description: API Manager Service
version: Version Alpha version: Version Alpha
servers: servers:
- url: http://localhost:5000 - url: https://api.mymuseum.be
paths: paths:
/api/Configuration: /api/Configuration:
get: get:
tags: tags:
- Configuration - Configuration
operationId: Configuration_Get operationId: Configuration_Get
parameters:
- name: instanceId
in: query
schema:
type: string
nullable: true
x-position: 1
responses: responses:
'200': '200':
description: '' description: ''
@ -266,6 +273,13 @@ paths:
tags: tags:
- Device - Device
operationId: Device_Get operationId: Device_Get
parameters:
- name: instanceId
in: query
schema:
type: string
nullable: true
x-position: 1
responses: responses:
'200': '200':
description: '' description: ''
@ -477,11 +491,191 @@ paths:
type: string type: string
security: security:
- bearer: [] - bearer: []
/api/Instance:
get:
tags:
- Instance
operationId: Instance_Get
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Instance'
'500':
description: ''
content:
application/json:
schema:
type: string
security:
- bearer: []
post:
tags:
- Instance
operationId: Instance_CreateInstance
requestBody:
x-name: newInstance
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
required: true
x-position: 1
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InstanceDTO'
'400':
description: ''
content:
application/json:
schema:
type: string
'409':
description: ''
content:
application/json:
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
type: string
security:
- bearer: []
put:
tags:
- Instance
operationId: Instance_Updateinstance
requestBody:
x-name: updatedInstance
content:
application/json:
schema:
$ref: '#/components/schemas/Instance'
required: true
x-position: 1
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InstanceDTO'
'400':
description: ''
content:
application/json:
schema:
type: string
'404':
description: ''
content:
application/json:
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
type: string
security:
- bearer: []
/api/Instance/{id}:
get:
tags:
- Instance
operationId: Instance_GetDetail
parameters:
- name: id
in: path
required: true
schema:
type: string
nullable: true
x-position: 1
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InstanceDTO'
'404':
description: ''
content:
application/json:
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
type: string
security:
- bearer: []
delete:
tags:
- Instance
operationId: Instance_DeleteInstance
parameters:
- name: id
in: path
required: true
schema:
type: string
nullable: true
x-position: 1
responses:
'202':
description: ''
content:
application/json:
schema:
type: string
'400':
description: ''
content:
application/json:
schema:
type: string
'404':
description: ''
content:
application/json:
schema:
type: string
'500':
description: ''
content:
application/json:
schema:
type: string
security:
- bearer: []
/api/Resource: /api/Resource:
get: get:
tags: tags:
- Resource - Resource
operationId: Resource_Get operationId: Resource_Get
parameters:
- name: instanceId
in: query
schema:
type: string
nullable: true
x-position: 1
responses: responses:
'200': '200':
description: '' description: ''
@ -697,6 +891,9 @@ paths:
type: type:
type: string type: string
nullable: true nullable: true
instanceId:
type: string
nullable: true
responses: responses:
'200': '200':
description: '' description: ''
@ -723,6 +920,13 @@ paths:
tags: tags:
- Section - Section
operationId: Section_Get operationId: Section_Get
parameters:
- name: instanceId
in: query
schema:
type: string
nullable: true
x-position: 1
responses: responses:
'200': '200':
description: '' description: ''
@ -1204,6 +1408,8 @@ paths:
application/json: application/json:
schema: schema:
type: string type: string
security:
- bearer: []
put: put:
tags: tags:
- User - User
@ -1435,6 +1641,9 @@ components:
type: boolean type: boolean
isOffline: isOffline:
type: boolean type: boolean
instanceId:
type: string
nullable: true
TranslationDTO: TranslationDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1506,9 +1715,19 @@ components:
order: order:
type: integer type: integer
format: int32 format: int32
SectionType: instanceId:
type: string type: string
description: '' nullable: true
SectionType:
type: integer
description: |-
0 = Map
1 = Slider
2 = Video
3 = Web
4 = Menu
5 = Quizz
6 = Article
x-enumNames: x-enumNames:
- Map - Map
- Slider - Slider
@ -1518,13 +1737,13 @@ components:
- Quizz - Quizz
- Article - Article
enum: enum:
- Map - 0
- Slider - 1
- Video - 2
- Web - 3
- Menu - 4
- Quizz - 5
- Article - 6
ResourceDTO: ResourceDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1543,19 +1762,26 @@ components:
data: data:
type: string type: string
nullable: true nullable: true
ResourceType: instanceId:
type: string type: string
description: '' nullable: true
ResourceType:
type: integer
description: |-
0 = Image
1 = Video
2 = ImageUrl
3 = VideoUrl
x-enumNames: x-enumNames:
- Image - Image
- Video - Video
- ImageUrl - ImageUrl
- VideoUrl - VideoUrl
enum: enum:
- Image - 0
- Video - 1
- ImageUrl - 2
- VideoUrl - 3
DeviceDTO: DeviceDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1589,6 +1815,9 @@ components:
dateUpdate: dateUpdate:
type: string type: string
format: date-time format: date-time
instanceId:
type: string
nullable: true
DeviceDetailDTO: DeviceDetailDTO:
allOf: allOf:
- $ref: '#/components/schemas/DeviceDTO' - $ref: '#/components/schemas/DeviceDTO'
@ -1607,6 +1836,32 @@ components:
lastBatteryLevel: lastBatteryLevel:
type: string type: string
format: date-time format: date-time
Instance:
type: object
additionalProperties: false
properties:
id:
type: string
nullable: true
name:
type: string
nullable: true
dateCreation:
type: string
format: date-time
InstanceDTO:
type: object
additionalProperties: false
properties:
id:
type: string
nullable: true
name:
type: string
nullable: true
dateCreation:
type: string
format: date-time
MapDTO: MapDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1628,8 +1883,13 @@ components:
type: string type: string
nullable: true nullable: true
MapTypeApp: MapTypeApp:
type: string type: integer
description: '' description: |-
0 = none
1 = normal
2 = satellite
3 = terrain
4 = hybrid
x-enumNames: x-enumNames:
- none - none
- normal - normal
@ -1637,11 +1897,11 @@ components:
- terrain - terrain
- hybrid - hybrid
enum: enum:
- none - 0
- normal - 1
- satellite - 2
- terrain - 3
- hybrid - 4
GeoPointDTO: GeoPointDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1869,6 +2129,9 @@ components:
dateCreation: dateCreation:
type: string type: string
format: date-time format: date-time
instanceId:
type: string
nullable: true
UserDetailDTO: UserDetailDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1907,6 +2170,9 @@ components:
expiration: expiration:
type: string type: string
format: date-time format: date-time
instanceId:
type: string
nullable: true
LoginDTO: LoginDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1934,6 +2200,8 @@ tags:
description: Configuration management description: Configuration management
- name: Device - name: Device
description: Device management description: Device management
- name: Instance
description: Instance management
- name: Resource - name: Resource
description: Resource management description: Resource management
- name: Section - name: Section

1944
lib/api/swagger.yaml.bak2 Normal file

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,9 @@ doc/ExportConfigurationDTOAllOf.md
doc/GeoPointDTO.md doc/GeoPointDTO.md
doc/ImageDTO.md doc/ImageDTO.md
doc/ImageGeoPoint.md doc/ImageGeoPoint.md
doc/Instance.md
doc/InstanceApi.md
doc/InstanceDTO.md
doc/LevelDTO.md doc/LevelDTO.md
doc/LoginDTO.md doc/LoginDTO.md
doc/MapDTO.md doc/MapDTO.md
@ -44,6 +47,7 @@ lib/api.dart
lib/api/authentication_api.dart lib/api/authentication_api.dart
lib/api/configuration_api.dart lib/api/configuration_api.dart
lib/api/device_api.dart lib/api/device_api.dart
lib/api/instance_api.dart
lib/api/resource_api.dart lib/api/resource_api.dart
lib/api/section_api.dart lib/api/section_api.dart
lib/api/user_api.dart lib/api/user_api.dart
@ -65,6 +69,8 @@ lib/model/export_configuration_dto_all_of.dart
lib/model/geo_point_dto.dart lib/model/geo_point_dto.dart
lib/model/image_dto.dart lib/model/image_dto.dart
lib/model/image_geo_point.dart lib/model/image_geo_point.dart
lib/model/instance.dart
lib/model/instance_dto.dart
lib/model/level_dto.dart lib/model/level_dto.dart
lib/model/login_dto.dart lib/model/login_dto.dart
lib/model/map_dto.dart lib/model/map_dto.dart
@ -87,3 +93,6 @@ lib/model/user_detail_dto.dart
lib/model/video_dto.dart lib/model/video_dto.dart
lib/model/web_dto.dart lib/model/web_dto.dart
pubspec.yaml pubspec.yaml
test/instance_api_test.dart
test/instance_dto_test.dart
test/instance_test.dart

View File

@ -60,7 +60,7 @@ try {
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
@ -79,6 +79,11 @@ Class | Method | HTTP request | Description
*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail | *DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/Device/{id}/detail |
*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/Device | *DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/Device |
*DeviceApi* | [**deviceUpdateMainInfos**](doc\/DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos | *DeviceApi* | [**deviceUpdateMainInfos**](doc\/DeviceApi.md#deviceupdatemaininfos) | **PUT** /api/Device/mainInfos |
*InstanceApi* | [**instanceCreateInstance**](doc\/InstanceApi.md#instancecreateinstance) | **POST** /api/Instance |
*InstanceApi* | [**instanceDeleteInstance**](doc\/InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
*InstanceApi* | [**instanceGet**](doc\/InstanceApi.md#instanceget) | **GET** /api/Instance |
*InstanceApi* | [**instanceGetDetail**](doc\/InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
*InstanceApi* | [**instanceUpdateinstance**](doc\/InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance |
*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource | *ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource |
*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} | *ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
*ResourceApi* | [**resourceGet**](doc\/ResourceApi.md#resourceget) | **GET** /api/Resource | *ResourceApi* | [**resourceGet**](doc\/ResourceApi.md#resourceget) | **GET** /api/Resource |
@ -122,6 +127,8 @@ Class | Method | HTTP request | Description
- [GeoPointDTO](doc\/GeoPointDTO.md) - [GeoPointDTO](doc\/GeoPointDTO.md)
- [ImageDTO](doc\/ImageDTO.md) - [ImageDTO](doc\/ImageDTO.md)
- [ImageGeoPoint](doc\/ImageGeoPoint.md) - [ImageGeoPoint](doc\/ImageGeoPoint.md)
- [Instance](doc\/Instance.md)
- [InstanceDTO](doc\/InstanceDTO.md)
- [LevelDTO](doc\/LevelDTO.md) - [LevelDTO](doc\/LevelDTO.md)
- [LoginDTO](doc\/LoginDTO.md) - [LoginDTO](doc\/LoginDTO.md)
- [MapDTO](doc\/MapDTO.md) - [MapDTO](doc\/MapDTO.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
``` ```
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------

View File

@ -5,7 +5,7 @@
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
``` ```
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
@ -148,7 +148,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **configurationGet** # **configurationGet**
> List<ConfigurationDTO> configurationGet() > List<ConfigurationDTO> configurationGet(instanceId)
@ -159,9 +159,10 @@ import 'package:manager_api/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; //defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ConfigurationApi(); final api_instance = ConfigurationApi();
final instanceId = instanceId_example; // String |
try { try {
final result = api_instance.configurationGet(); final result = api_instance.configurationGet(instanceId);
print(result); print(result);
} catch (e) { } catch (e) {
print('Exception when calling ConfigurationApi->configurationGet: $e\n'); print('Exception when calling ConfigurationApi->configurationGet: $e\n');
@ -169,7 +170,10 @@ try {
``` ```
### Parameters ### Parameters
This endpoint does not need any parameter.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instanceId** | **String**| | [optional]
### Return type ### Return type

View File

@ -20,6 +20,7 @@ Name | Type | Description | Notes
**isMobile** | **bool** | | [optional] **isMobile** | **bool** | | [optional]
**isTablet** | **bool** | | [optional] **isTablet** | **bool** | | [optional]
**isOffline** | **bool** | | [optional] **isOffline** | **bool** | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
``` ```
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
@ -104,7 +104,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deviceGet** # **deviceGet**
> List<DeviceDTO> deviceGet() > List<DeviceDTO> deviceGet(instanceId)
@ -115,9 +115,10 @@ import 'package:manager_api/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; //defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi(); final api_instance = DeviceApi();
final instanceId = instanceId_example; // String |
try { try {
final result = api_instance.deviceGet(); final result = api_instance.deviceGet(instanceId);
print(result); print(result);
} catch (e) { } catch (e) {
print('Exception when calling DeviceApi->deviceGet: $e\n'); print('Exception when calling DeviceApi->deviceGet: $e\n');
@ -125,7 +126,10 @@ try {
``` ```
### Parameters ### Parameters
This endpoint does not need any parameter.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instanceId** | **String**| | [optional]
### Return type ### Return type

View File

@ -18,6 +18,7 @@ Name | Type | Description | Notes
**connected** | **bool** | | [optional] **connected** | **bool** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**dateUpdate** | [**DateTime**](DateTime.md) | | [optional] **dateUpdate** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -18,6 +18,7 @@ Name | Type | Description | Notes
**connected** | **bool** | | [optional] **connected** | **bool** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**dateUpdate** | [**DateTime**](DateTime.md) | | [optional] **dateUpdate** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
**connectionLevel** | **String** | | [optional] **connectionLevel** | **String** | | [optional]
**lastConnectionLevel** | [**DateTime**](DateTime.md) | | [optional] **lastConnectionLevel** | [**DateTime**](DateTime.md) | | [optional]
**batteryLevel** | **String** | | [optional] **batteryLevel** | **String** | | [optional]

View File

@ -20,6 +20,7 @@ Name | Type | Description | Notes
**isMobile** | **bool** | | [optional] **isMobile** | **bool** | | [optional]
**isTablet** | **bool** | | [optional] **isTablet** | **bool** | | [optional]
**isOffline** | **bool** | | [optional] **isOffline** | **bool** | | [optional]
**instanceId** | **String** | | [optional]
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []] **sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
**resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []] **resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []]

View File

@ -0,0 +1,17 @@
# manager_api.model.Instance
## Load the model package
```dart
import 'package:manager_api/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,229 @@
# manager_api.api.InstanceApi
## Load the API package
```dart
import 'package:manager_api/api.dart';
```
All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description
------------- | ------------- | -------------
[**instanceCreateInstance**](InstanceApi.md#instancecreateinstance) | **POST** /api/Instance |
[**instanceDeleteInstance**](InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
[**instanceGet**](InstanceApi.md#instanceget) | **GET** /api/Instance |
[**instanceGetDetail**](InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
[**instanceUpdateinstance**](InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance |
# **instanceCreateInstance**
> InstanceDTO instanceCreateInstance(instance)
### Example
```dart
import 'package:manager_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final instance = Instance(); // Instance |
try {
final result = api_instance.instanceCreateInstance(instance);
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceCreateInstance: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instance** | [**Instance**](Instance.md)| |
### Return type
[**InstanceDTO**](InstanceDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **instanceDeleteInstance**
> String instanceDeleteInstance(id)
### Example
```dart
import 'package:manager_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final id = id_example; // String |
try {
final result = api_instance.instanceDeleteInstance(id);
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceDeleteInstance: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
### Return type
**String**
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **instanceGet**
> List<Instance> instanceGet()
### Example
```dart
import 'package:manager_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
try {
final result = api_instance.instanceGet();
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceGet: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<Instance>**](Instance.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **instanceGetDetail**
> InstanceDTO instanceGetDetail(id)
### Example
```dart
import 'package:manager_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final id = id_example; // String |
try {
final result = api_instance.instanceGetDetail(id);
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceGetDetail: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| |
### Return type
[**InstanceDTO**](InstanceDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **instanceUpdateinstance**
> InstanceDTO instanceUpdateinstance(instance)
### Example
```dart
import 'package:manager_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = InstanceApi();
final instance = Instance(); // Instance |
try {
final result = api_instance.instanceUpdateinstance(instance);
print(result);
} catch (e) {
print('Exception when calling InstanceApi->instanceUpdateinstance: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instance** | [**Instance**](Instance.md)| |
### Return type
[**InstanceDTO**](InstanceDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,17 @@
# manager_api.model.InstanceDTO
## Load the model package
```dart
import 'package:manager_api/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
``` ```
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
@ -105,7 +105,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **resourceGet** # **resourceGet**
> List<ResourceDTO> resourceGet() > List<ResourceDTO> resourceGet(instanceId)
@ -116,9 +116,10 @@ import 'package:manager_api/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; //defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ResourceApi(); final api_instance = ResourceApi();
final instanceId = instanceId_example; // String |
try { try {
final result = api_instance.resourceGet(); final result = api_instance.resourceGet(instanceId);
print(result); print(result);
} catch (e) { } catch (e) {
print('Exception when calling ResourceApi->resourceGet: $e\n'); print('Exception when calling ResourceApi->resourceGet: $e\n');
@ -126,7 +127,10 @@ try {
``` ```
### Parameters ### Parameters
This endpoint does not need any parameter.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instanceId** | **String**| | [optional]
### Return type ### Return type
@ -273,7 +277,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **resourceUpload** # **resourceUpload**
> String resourceUpload(label, type) > String resourceUpload(label, type, instanceId)
@ -286,9 +290,10 @@ import 'package:manager_api/api.dart';
final api_instance = ResourceApi(); final api_instance = ResourceApi();
final label = label_example; // String | final label = label_example; // String |
final type = type_example; // String | final type = type_example; // String |
final instanceId = instanceId_example; // String |
try { try {
final result = api_instance.resourceUpload(label, type); final result = api_instance.resourceUpload(label, type, instanceId);
print(result); print(result);
} catch (e) { } catch (e) {
print('Exception when calling ResourceApi->resourceUpload: $e\n'); print('Exception when calling ResourceApi->resourceUpload: $e\n');
@ -301,6 +306,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**label** | **String**| | [optional] **label** | **String**| | [optional]
**type** | **String**| | [optional] **type** | **String**| | [optional]
**instanceId** | **String**| | [optional]
### Return type ### Return type

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**label** | **String** | | [optional] **label** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**data** | **String** | | [optional] **data** | **String** | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
``` ```
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
@ -158,7 +158,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGet** # **sectionGet**
> List<SectionDTO> sectionGet() > List<SectionDTO> sectionGet(instanceId)
@ -169,9 +169,10 @@ import 'package:manager_api/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; //defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi(); final api_instance = SectionApi();
final instanceId = instanceId_example; // String |
try { try {
final result = api_instance.sectionGet(); final result = api_instance.sectionGet(instanceId);
print(result); print(result);
} catch (e) { } catch (e) {
print('Exception when calling SectionApi->sectionGet: $e\n'); print('Exception when calling SectionApi->sectionGet: $e\n');
@ -179,7 +180,10 @@ try {
``` ```
### Parameters ### Parameters
This endpoint does not need any parameter.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instanceId** | **String**| | [optional]
### Return type ### Return type

View File

@ -21,6 +21,7 @@ Name | Type | Description | Notes
**data** | **String** | | [optional] **data** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**order** | **int** | | [optional] **order** | **int** | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -14,6 +14,7 @@ Name | Type | Description | Notes
**tokenType** | **String** | | [optional] **tokenType** | **String** | | [optional]
**expiresIn** | **int** | | [optional] **expiresIn** | **int** | | [optional]
**expiration** | [**DateTime**](DateTime.md) | | [optional] **expiration** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -15,6 +15,7 @@ Name | Type | Description | Notes
**lastName** | **String** | | [optional] **lastName** | **String** | | [optional]
**token** | **String** | | [optional] **token** | **String** | | [optional]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**instanceId** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -5,7 +5,7 @@
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
``` ```
All URIs are relative to *http://localhost:5000* All URIs are relative to *https://api.mymuseum.be*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------

View File

@ -30,6 +30,7 @@ part 'auth/http_bearer_auth.dart';
part 'api/authentication_api.dart'; part 'api/authentication_api.dart';
part 'api/configuration_api.dart'; part 'api/configuration_api.dart';
part 'api/device_api.dart'; part 'api/device_api.dart';
part 'api/instance_api.dart';
part 'api/resource_api.dart'; part 'api/resource_api.dart';
part 'api/section_api.dart'; part 'api/section_api.dart';
part 'api/user_api.dart'; part 'api/user_api.dart';
@ -44,6 +45,8 @@ part 'model/export_configuration_dto_all_of.dart';
part 'model/geo_point_dto.dart'; part 'model/geo_point_dto.dart';
part 'model/image_dto.dart'; part 'model/image_dto.dart';
part 'model/image_geo_point.dart'; part 'model/image_geo_point.dart';
part 'model/instance.dart';
part 'model/instance_dto.dart';
part 'model/level_dto.dart'; part 'model/level_dto.dart';
part 'model/login_dto.dart'; part 'model/login_dto.dart';
part 'model/map_dto.dart'; part 'model/map_dto.dart';

View File

@ -160,7 +160,10 @@ class ConfigurationApi {
} }
/// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response]. /// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response].
Future<Response> configurationGetWithHttpInfo() async { /// Parameters:
///
/// * [String] instanceId:
Future<Response> configurationGetWithHttpInfo({ String? instanceId, }) async {
// ignore: prefer_const_declarations // ignore: prefer_const_declarations
final path = r'/api/Configuration'; final path = r'/api/Configuration';
@ -171,6 +174,10 @@ class ConfigurationApi {
final headerParams = <String, String>{}; final headerParams = <String, String>{};
final formParams = <String, String>{}; final formParams = <String, String>{};
if (instanceId != null) {
queryParams.addAll(_queryParams('', 'instanceId', instanceId));
}
const contentTypes = <String>[]; const contentTypes = <String>[];
@ -185,8 +192,11 @@ class ConfigurationApi {
); );
} }
Future<List<ConfigurationDTO>?> configurationGet() async { /// Parameters:
final response = await configurationGetWithHttpInfo(); ///
/// * [String] instanceId:
Future<List<ConfigurationDTO>?> configurationGet({ String? instanceId, }) async {
final response = await configurationGetWithHttpInfo( instanceId: instanceId, );
if (response.statusCode >= HttpStatus.badRequest) { if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response)); throw ApiException(response.statusCode, await _decodeBodyBytes(response));
} }

View File

@ -112,7 +112,10 @@ class DeviceApi {
} }
/// Performs an HTTP 'GET /api/Device' operation and returns the [Response]. /// Performs an HTTP 'GET /api/Device' operation and returns the [Response].
Future<Response> deviceGetWithHttpInfo() async { /// Parameters:
///
/// * [String] instanceId:
Future<Response> deviceGetWithHttpInfo({ String? instanceId, }) async {
// ignore: prefer_const_declarations // ignore: prefer_const_declarations
final path = r'/api/Device'; final path = r'/api/Device';
@ -123,6 +126,10 @@ class DeviceApi {
final headerParams = <String, String>{}; final headerParams = <String, String>{};
final formParams = <String, String>{}; final formParams = <String, String>{};
if (instanceId != null) {
queryParams.addAll(_queryParams('', 'instanceId', instanceId));
}
const contentTypes = <String>[]; const contentTypes = <String>[];
@ -137,8 +144,11 @@ class DeviceApi {
); );
} }
Future<List<DeviceDTO>?> deviceGet() async { /// Parameters:
final response = await deviceGetWithHttpInfo(); ///
/// * [String] instanceId:
Future<List<DeviceDTO>?> deviceGet({ String? instanceId, }) async {
final response = await deviceGetWithHttpInfo( instanceId: instanceId, );
if (response.statusCode >= HttpStatus.badRequest) { if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response)); throw ApiException(response.statusCode, await _decodeBodyBytes(response));
} }

View File

@ -0,0 +1,252 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class InstanceApi {
InstanceApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /api/Instance' operation and returns the [Response].
/// Parameters:
///
/// * [Instance] instance (required):
Future<Response> instanceCreateInstanceWithHttpInfo(Instance instance,) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance';
// ignore: prefer_final_locals
Object? postBody = instance;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [Instance] instance (required):
Future<InstanceDTO?> instanceCreateInstance(Instance instance,) async {
final response = await instanceCreateInstanceWithHttpInfo(instance,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
}
return null;
}
/// Performs an HTTP 'DELETE /api/Instance/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> instanceDeleteInstanceWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<String?> instanceDeleteInstance(String id,) async {
final response = await instanceDeleteInstanceWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String;
}
return null;
}
/// Performs an HTTP 'GET /api/Instance' operation and returns the [Response].
Future<Response> instanceGetWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/api/Instance';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<Instance>?> instanceGet() async {
final response = await instanceGetWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<Instance>') as List)
.cast<Instance>()
.toList();
}
return null;
}
/// Performs an HTTP 'GET /api/Instance/{id}' operation and returns the [Response].
/// Parameters:
///
/// * [String] id (required):
Future<Response> instanceGetDetailWithHttpInfo(String id,) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] id (required):
Future<InstanceDTO?> instanceGetDetail(String id,) async {
final response = await instanceGetDetailWithHttpInfo(id,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
}
return null;
}
/// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response].
/// Parameters:
///
/// * [Instance] instance (required):
Future<Response> instanceUpdateinstanceWithHttpInfo(Instance instance,) async {
// ignore: prefer_const_declarations
final path = r'/api/Instance';
// ignore: prefer_final_locals
Object? postBody = instance;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [Instance] instance (required):
Future<InstanceDTO?> instanceUpdateinstance(Instance instance,) async {
final response = await instanceUpdateinstanceWithHttpInfo(instance,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'InstanceDTO',) as InstanceDTO;
}
return null;
}
}

View File

@ -112,7 +112,10 @@ class ResourceApi {
} }
/// Performs an HTTP 'GET /api/Resource' operation and returns the [Response]. /// Performs an HTTP 'GET /api/Resource' operation and returns the [Response].
Future<Response> resourceGetWithHttpInfo() async { /// Parameters:
///
/// * [String] instanceId:
Future<Response> resourceGetWithHttpInfo({ String? instanceId, }) async {
// ignore: prefer_const_declarations // ignore: prefer_const_declarations
final path = r'/api/Resource'; final path = r'/api/Resource';
@ -123,6 +126,10 @@ class ResourceApi {
final headerParams = <String, String>{}; final headerParams = <String, String>{};
final formParams = <String, String>{}; final formParams = <String, String>{};
if (instanceId != null) {
queryParams.addAll(_queryParams('', 'instanceId', instanceId));
}
const contentTypes = <String>[]; const contentTypes = <String>[];
@ -137,8 +144,11 @@ class ResourceApi {
); );
} }
Future<List<ResourceDTO>?> resourceGet() async { /// Parameters:
final response = await resourceGetWithHttpInfo(); ///
/// * [String] instanceId:
Future<List<ResourceDTO>?> resourceGet({ String? instanceId, }) async {
final response = await resourceGetWithHttpInfo( instanceId: instanceId, );
if (response.statusCode >= HttpStatus.badRequest) { if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response)); throw ApiException(response.statusCode, await _decodeBodyBytes(response));
} }
@ -304,7 +314,9 @@ class ResourceApi {
/// * [String] label: /// * [String] label:
/// ///
/// * [String] type: /// * [String] type:
Future<Response> resourceUploadWithHttpInfo({ String? label, String? type, }) async { ///
/// * [String] instanceId:
Future<Response> resourceUploadWithHttpInfo({ String? label, String? type, String? instanceId, }) async {
// ignore: prefer_const_declarations // ignore: prefer_const_declarations
final path = r'/api/Resource/upload'; final path = r'/api/Resource/upload';
@ -327,6 +339,10 @@ class ResourceApi {
hasFields = true; hasFields = true;
mp.fields[r'type'] = parameterToString(type); mp.fields[r'type'] = parameterToString(type);
} }
if (instanceId != null) {
hasFields = true;
mp.fields[r'instanceId'] = parameterToString(instanceId);
}
if (hasFields) { if (hasFields) {
postBody = mp; postBody = mp;
} }
@ -347,8 +363,10 @@ class ResourceApi {
/// * [String] label: /// * [String] label:
/// ///
/// * [String] type: /// * [String] type:
Future<String?> resourceUpload({ String? label, String? type, }) async { ///
final response = await resourceUploadWithHttpInfo( label: label, type: type, ); /// * [String] instanceId:
Future<String?> resourceUpload({ String? label, String? type, String? instanceId, }) async {
final response = await resourceUploadWithHttpInfo( label: label, type: type, instanceId: instanceId, );
if (response.statusCode >= HttpStatus.badRequest) { if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response)); throw ApiException(response.statusCode, await _decodeBodyBytes(response));
} }

View File

@ -160,7 +160,10 @@ class SectionApi {
} }
/// Performs an HTTP 'GET /api/Section' operation and returns the [Response]. /// Performs an HTTP 'GET /api/Section' operation and returns the [Response].
Future<Response> sectionGetWithHttpInfo() async { /// Parameters:
///
/// * [String] instanceId:
Future<Response> sectionGetWithHttpInfo({ String? instanceId, }) async {
// ignore: prefer_const_declarations // ignore: prefer_const_declarations
final path = r'/api/Section'; final path = r'/api/Section';
@ -171,6 +174,10 @@ class SectionApi {
final headerParams = <String, String>{}; final headerParams = <String, String>{};
final formParams = <String, String>{}; final formParams = <String, String>{};
if (instanceId != null) {
queryParams.addAll(_queryParams('', 'instanceId', instanceId));
}
const contentTypes = <String>[]; const contentTypes = <String>[];
@ -185,8 +192,11 @@ class SectionApi {
); );
} }
Future<List<SectionDTO>?> sectionGet() async { /// Parameters:
final response = await sectionGetWithHttpInfo(); ///
/// * [String] instanceId:
Future<List<SectionDTO>?> sectionGet({ String? instanceId, }) async {
final response = await sectionGetWithHttpInfo( instanceId: instanceId, );
if (response.statusCode >= HttpStatus.badRequest) { if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response)); throw ApiException(response.statusCode, await _decodeBodyBytes(response));
} }

View File

@ -11,7 +11,7 @@
part of openapi.api; part of openapi.api;
class ApiClient { class ApiClient {
ApiClient({this.basePath = 'http://localhost:5000', this.authentication}); ApiClient({this.basePath = 'https://api.mymuseum.be', this.authentication});
final String basePath; final String basePath;
@ -210,6 +210,10 @@ class ApiClient {
return ImageDTO.fromJson(value); return ImageDTO.fromJson(value);
case 'ImageGeoPoint': case 'ImageGeoPoint':
return ImageGeoPoint.fromJson(value); return ImageGeoPoint.fromJson(value);
case 'Instance':
return Instance.fromJson(value);
case 'InstanceDTO':
return InstanceDTO.fromJson(value);
case 'LevelDTO': case 'LevelDTO':
return LevelDTO.fromJson(value); return LevelDTO.fromJson(value);
case 'LoginDTO': case 'LoginDTO':

View File

@ -25,6 +25,7 @@ class ConfigurationDTO {
this.isMobile, this.isMobile,
this.isTablet, this.isTablet,
this.isOffline, this.isOffline,
this.instanceId,
}); });
String? id; String? id;
@ -75,6 +76,8 @@ class ConfigurationDTO {
/// ///
bool? isOffline; bool? isOffline;
String? instanceId;
@override @override
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO && bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
other.id == id && other.id == id &&
@ -88,7 +91,8 @@ class ConfigurationDTO {
other.dateCreation == dateCreation && other.dateCreation == dateCreation &&
other.isMobile == isMobile && other.isMobile == isMobile &&
other.isTablet == isTablet && other.isTablet == isTablet &&
other.isOffline == isOffline; other.isOffline == isOffline &&
other.instanceId == instanceId;
@override @override
int get hashCode => int get hashCode =>
@ -104,10 +108,11 @@ class ConfigurationDTO {
(dateCreation == null ? 0 : dateCreation!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) +
(isMobile == null ? 0 : isMobile!.hashCode) + (isMobile == null ? 0 : isMobile!.hashCode) +
(isTablet == null ? 0 : isTablet!.hashCode) + (isTablet == null ? 0 : isTablet!.hashCode) +
(isOffline == null ? 0 : isOffline!.hashCode); (isOffline == null ? 0 : isOffline!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override @override
String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline]'; String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -147,6 +152,9 @@ class ConfigurationDTO {
if (isOffline != null) { if (isOffline != null) {
_json[r'isOffline'] = isOffline; _json[r'isOffline'] = isOffline;
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
return _json; return _json;
} }
@ -183,6 +191,7 @@ class ConfigurationDTO {
isMobile: mapValueOfType<bool>(json, r'isMobile'), isMobile: mapValueOfType<bool>(json, r'isMobile'),
isTablet: mapValueOfType<bool>(json, r'isTablet'), isTablet: mapValueOfType<bool>(json, r'isTablet'),
isOffline: mapValueOfType<bool>(json, r'isOffline'), isOffline: mapValueOfType<bool>(json, r'isOffline'),
instanceId: mapValueOfType<String>(json, r'instanceId'),
); );
} }
return null; return null;

View File

@ -23,6 +23,7 @@ class DeviceDetailDTO {
this.connected, this.connected,
this.dateCreation, this.dateCreation,
this.dateUpdate, this.dateUpdate,
this.instanceId,
this.connectionLevel, this.connectionLevel,
this.lastConnectionLevel, this.lastConnectionLevel,
this.batteryLevel, this.batteryLevel,
@ -67,6 +68,8 @@ class DeviceDetailDTO {
/// ///
DateTime? dateUpdate; DateTime? dateUpdate;
String? instanceId;
String? connectionLevel; String? connectionLevel;
/// ///
@ -99,6 +102,7 @@ class DeviceDetailDTO {
other.connected == connected && other.connected == connected &&
other.dateCreation == dateCreation && other.dateCreation == dateCreation &&
other.dateUpdate == dateUpdate && other.dateUpdate == dateUpdate &&
other.instanceId == instanceId &&
other.connectionLevel == connectionLevel && other.connectionLevel == connectionLevel &&
other.lastConnectionLevel == lastConnectionLevel && other.lastConnectionLevel == lastConnectionLevel &&
other.batteryLevel == batteryLevel && other.batteryLevel == batteryLevel &&
@ -117,13 +121,14 @@ class DeviceDetailDTO {
(connected == null ? 0 : connected!.hashCode) + (connected == null ? 0 : connected!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) +
(dateUpdate == null ? 0 : dateUpdate!.hashCode) + (dateUpdate == null ? 0 : dateUpdate!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode) +
(connectionLevel == null ? 0 : connectionLevel!.hashCode) + (connectionLevel == null ? 0 : connectionLevel!.hashCode) +
(lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) + (lastConnectionLevel == null ? 0 : lastConnectionLevel!.hashCode) +
(batteryLevel == null ? 0 : batteryLevel!.hashCode) + (batteryLevel == null ? 0 : batteryLevel!.hashCode) +
(lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode); (lastBatteryLevel == null ? 0 : lastBatteryLevel!.hashCode);
@override @override
String toString() => 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; String toString() => 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -157,6 +162,9 @@ class DeviceDetailDTO {
if (dateUpdate != null) { if (dateUpdate != null) {
_json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String(); _json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String();
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
if (connectionLevel != null) { if (connectionLevel != null) {
_json[r'connectionLevel'] = connectionLevel; _json[r'connectionLevel'] = connectionLevel;
} }
@ -201,6 +209,7 @@ class DeviceDetailDTO {
connected: mapValueOfType<bool>(json, r'connected'), connected: mapValueOfType<bool>(json, r'connected'),
dateCreation: mapDateTime(json, r'dateCreation', ''), dateCreation: mapDateTime(json, r'dateCreation', ''),
dateUpdate: mapDateTime(json, r'dateUpdate', ''), dateUpdate: mapDateTime(json, r'dateUpdate', ''),
instanceId: mapValueOfType<String>(json, r'instanceId'),
connectionLevel: mapValueOfType<String>(json, r'connectionLevel'), connectionLevel: mapValueOfType<String>(json, r'connectionLevel'),
lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''), lastConnectionLevel: mapDateTime(json, r'lastConnectionLevel', ''),
batteryLevel: mapValueOfType<String>(json, r'batteryLevel'), batteryLevel: mapValueOfType<String>(json, r'batteryLevel'),

View File

@ -23,6 +23,7 @@ class DeviceDTO {
this.connected, this.connected,
this.dateCreation, this.dateCreation,
this.dateUpdate, this.dateUpdate,
this.instanceId,
}); });
String? id; String? id;
@ -63,6 +64,8 @@ class DeviceDTO {
/// ///
DateTime? dateUpdate; DateTime? dateUpdate;
String? instanceId;
@override @override
bool operator ==(Object other) => identical(this, other) || other is DeviceDTO && bool operator ==(Object other) => identical(this, other) || other is DeviceDTO &&
other.id == id && other.id == id &&
@ -74,7 +77,8 @@ class DeviceDTO {
other.configuration == configuration && other.configuration == configuration &&
other.connected == connected && other.connected == connected &&
other.dateCreation == dateCreation && other.dateCreation == dateCreation &&
other.dateUpdate == dateUpdate; other.dateUpdate == dateUpdate &&
other.instanceId == instanceId;
@override @override
int get hashCode => int get hashCode =>
@ -88,10 +92,11 @@ class DeviceDTO {
(configuration == null ? 0 : configuration!.hashCode) + (configuration == null ? 0 : configuration!.hashCode) +
(connected == null ? 0 : connected!.hashCode) + (connected == null ? 0 : connected!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) +
(dateUpdate == null ? 0 : dateUpdate!.hashCode); (dateUpdate == null ? 0 : dateUpdate!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override @override
String toString() => 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate]'; String toString() => 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -125,6 +130,9 @@ class DeviceDTO {
if (dateUpdate != null) { if (dateUpdate != null) {
_json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String(); _json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String();
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
return _json; return _json;
} }
@ -157,6 +165,7 @@ class DeviceDTO {
connected: mapValueOfType<bool>(json, r'connected'), connected: mapValueOfType<bool>(json, r'connected'),
dateCreation: mapDateTime(json, r'dateCreation', ''), dateCreation: mapDateTime(json, r'dateCreation', ''),
dateUpdate: mapDateTime(json, r'dateUpdate', ''), dateUpdate: mapDateTime(json, r'dateUpdate', ''),
instanceId: mapValueOfType<String>(json, r'instanceId'),
); );
} }
return null; return null;

View File

@ -25,6 +25,7 @@ class ExportConfigurationDTO {
this.isMobile, this.isMobile,
this.isTablet, this.isTablet,
this.isOffline, this.isOffline,
this.instanceId,
this.sections = const [], this.sections = const [],
this.resources = const [], this.resources = const [],
}); });
@ -77,6 +78,8 @@ class ExportConfigurationDTO {
/// ///
bool? isOffline; bool? isOffline;
String? instanceId;
List<SectionDTO>? sections; List<SectionDTO>? sections;
List<ResourceDTO>? resources; List<ResourceDTO>? resources;
@ -95,6 +98,7 @@ class ExportConfigurationDTO {
other.isMobile == isMobile && other.isMobile == isMobile &&
other.isTablet == isTablet && other.isTablet == isTablet &&
other.isOffline == isOffline && other.isOffline == isOffline &&
other.instanceId == instanceId &&
other.sections == sections && other.sections == sections &&
other.resources == resources; other.resources == resources;
@ -113,11 +117,12 @@ class ExportConfigurationDTO {
(isMobile == null ? 0 : isMobile!.hashCode) + (isMobile == null ? 0 : isMobile!.hashCode) +
(isTablet == null ? 0 : isTablet!.hashCode) + (isTablet == null ? 0 : isTablet!.hashCode) +
(isOffline == null ? 0 : isOffline!.hashCode) + (isOffline == null ? 0 : isOffline!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode) +
(sections == null ? 0 : sections!.hashCode) + (sections == null ? 0 : sections!.hashCode) +
(resources == null ? 0 : resources!.hashCode); (resources == null ? 0 : resources!.hashCode);
@override @override
String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, sections=$sections, resources=$resources]'; String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sections=$sections, resources=$resources]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -157,6 +162,9 @@ class ExportConfigurationDTO {
if (isOffline != null) { if (isOffline != null) {
_json[r'isOffline'] = isOffline; _json[r'isOffline'] = isOffline;
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
if (sections != null) { if (sections != null) {
_json[r'sections'] = sections; _json[r'sections'] = sections;
} }
@ -199,6 +207,7 @@ class ExportConfigurationDTO {
isMobile: mapValueOfType<bool>(json, r'isMobile'), isMobile: mapValueOfType<bool>(json, r'isMobile'),
isTablet: mapValueOfType<bool>(json, r'isTablet'), isTablet: mapValueOfType<bool>(json, r'isTablet'),
isOffline: mapValueOfType<bool>(json, r'isOffline'), isOffline: mapValueOfType<bool>(json, r'isOffline'),
instanceId: mapValueOfType<String>(json, r'instanceId'),
sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], sections: SectionDTO.listFromJson(json[r'sections']) ?? const [],
resources: ResourceDTO.listFromJson(json[r'resources']) ?? const [], resources: ResourceDTO.listFromJson(json[r'resources']) ?? const [],
); );

View File

@ -0,0 +1,136 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class Instance {
/// Returns a new [Instance] instance.
Instance({
this.id,
this.name,
this.dateCreation,
});
String? id;
String? name;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
@override
bool operator ==(Object other) => identical(this, other) || other is Instance &&
other.id == id &&
other.name == name &&
other.dateCreation == dateCreation;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode);
@override
String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
if (id != null) {
_json[r'id'] = id;
}
if (name != null) {
_json[r'name'] = name;
}
if (dateCreation != null) {
_json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String();
}
return _json;
}
/// Returns a new [Instance] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static Instance? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "Instance[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "Instance[$key]" has a null value in JSON.');
});
return true;
}());
return Instance(
id: mapValueOfType<String>(json, r'id'),
name: mapValueOfType<String>(json, r'name'),
dateCreation: mapDateTime(json, r'dateCreation', ''),
);
}
return null;
}
static List<Instance>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <Instance>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = Instance.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, Instance> mapFromJson(dynamic json) {
final map = <String, Instance>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = Instance.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of Instance-objects as value to a dart map
static Map<String, List<Instance>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<Instance>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = Instance.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -0,0 +1,136 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class InstanceDTO {
/// Returns a new [InstanceDTO] instance.
InstanceDTO({
this.id,
this.name,
this.dateCreation,
});
String? id;
String? name;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? dateCreation;
@override
bool operator ==(Object other) => identical(this, other) || other is InstanceDTO &&
other.id == id &&
other.name == name &&
other.dateCreation == dateCreation;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(name == null ? 0 : name!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode);
@override
String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
if (id != null) {
_json[r'id'] = id;
}
if (name != null) {
_json[r'name'] = name;
}
if (dateCreation != null) {
_json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String();
}
return _json;
}
/// Returns a new [InstanceDTO] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static InstanceDTO? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "InstanceDTO[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "InstanceDTO[$key]" has a null value in JSON.');
});
return true;
}());
return InstanceDTO(
id: mapValueOfType<String>(json, r'id'),
name: mapValueOfType<String>(json, r'name'),
dateCreation: mapDateTime(json, r'dateCreation', ''),
);
}
return null;
}
static List<InstanceDTO>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <InstanceDTO>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = InstanceDTO.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, InstanceDTO> mapFromJson(dynamic json) {
final map = <String, InstanceDTO>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = InstanceDTO.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of InstanceDTO-objects as value to a dart map
static Map<String, List<InstanceDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<InstanceDTO>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = InstanceDTO.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -18,6 +18,7 @@ class ResourceDTO {
this.label, this.label,
this.dateCreation, this.dateCreation,
this.data, this.data,
this.instanceId,
}); });
String? id; String? id;
@ -42,13 +43,16 @@ class ResourceDTO {
String? data; String? data;
String? instanceId;
@override @override
bool operator ==(Object other) => identical(this, other) || other is ResourceDTO && bool operator ==(Object other) => identical(this, other) || other is ResourceDTO &&
other.id == id && other.id == id &&
other.type == type && other.type == type &&
other.label == label && other.label == label &&
other.dateCreation == dateCreation && other.dateCreation == dateCreation &&
other.data == data; other.data == data &&
other.instanceId == instanceId;
@override @override
int get hashCode => int get hashCode =>
@ -57,10 +61,11 @@ class ResourceDTO {
(type == null ? 0 : type!.hashCode) + (type == null ? 0 : type!.hashCode) +
(label == null ? 0 : label!.hashCode) + (label == null ? 0 : label!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) +
(data == null ? 0 : data!.hashCode); (data == null ? 0 : data!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override @override
String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, dateCreation=$dateCreation, data=$data]'; String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, dateCreation=$dateCreation, data=$data, instanceId=$instanceId]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -79,6 +84,9 @@ class ResourceDTO {
if (data != null) { if (data != null) {
_json[r'data'] = data; _json[r'data'] = data;
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
return _json; return _json;
} }
@ -106,6 +114,7 @@ class ResourceDTO {
label: mapValueOfType<String>(json, r'label'), label: mapValueOfType<String>(json, r'label'),
dateCreation: mapDateTime(json, r'dateCreation', ''), dateCreation: mapDateTime(json, r'dateCreation', ''),
data: mapValueOfType<String>(json, r'data'), data: mapValueOfType<String>(json, r'data'),
instanceId: mapValueOfType<String>(json, r'instanceId'),
); );
} }
return null; return null;

View File

@ -26,6 +26,7 @@ class SectionDTO {
this.data, this.data,
this.dateCreation, this.dateCreation,
this.order, this.order,
this.instanceId,
}); });
String? id; String? id;
@ -78,6 +79,8 @@ class SectionDTO {
/// ///
int? order; int? order;
String? instanceId;
@override @override
bool operator ==(Object other) => identical(this, other) || other is SectionDTO && bool operator ==(Object other) => identical(this, other) || other is SectionDTO &&
other.id == id && other.id == id &&
@ -92,7 +95,8 @@ class SectionDTO {
other.type == type && other.type == type &&
other.data == data && other.data == data &&
other.dateCreation == dateCreation && other.dateCreation == dateCreation &&
other.order == order; other.order == order &&
other.instanceId == instanceId;
@override @override
int get hashCode => int get hashCode =>
@ -109,10 +113,11 @@ class SectionDTO {
(type == null ? 0 : type!.hashCode) + (type == null ? 0 : type!.hashCode) +
(data == null ? 0 : data!.hashCode) + (data == null ? 0 : data!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) +
(order == null ? 0 : order!.hashCode); (order == null ? 0 : order!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override @override
String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order]'; String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order, instanceId=$instanceId]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -155,6 +160,9 @@ class SectionDTO {
if (order != null) { if (order != null) {
_json[r'order'] = order; _json[r'order'] = order;
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
return _json; return _json;
} }
@ -190,6 +198,7 @@ class SectionDTO {
data: mapValueOfType<String>(json, r'data'), data: mapValueOfType<String>(json, r'data'),
dateCreation: mapDateTime(json, r'dateCreation', ''), dateCreation: mapDateTime(json, r'dateCreation', ''),
order: mapValueOfType<int>(json, r'order'), order: mapValueOfType<int>(json, r'order'),
instanceId: mapValueOfType<String>(json, r'instanceId'),
); );
} }
return null; return null;

View File

@ -19,6 +19,7 @@ class TokenDTO {
this.tokenType, this.tokenType,
this.expiresIn, this.expiresIn,
this.expiration, this.expiration,
this.instanceId,
}); });
String? accessToken; String? accessToken;
@ -45,6 +46,8 @@ class TokenDTO {
/// ///
DateTime? expiration; DateTime? expiration;
String? instanceId;
@override @override
bool operator ==(Object other) => identical(this, other) || other is TokenDTO && bool operator ==(Object other) => identical(this, other) || other is TokenDTO &&
other.accessToken == accessToken && other.accessToken == accessToken &&
@ -52,7 +55,8 @@ class TokenDTO {
other.scope == scope && other.scope == scope &&
other.tokenType == tokenType && other.tokenType == tokenType &&
other.expiresIn == expiresIn && other.expiresIn == expiresIn &&
other.expiration == expiration; other.expiration == expiration &&
other.instanceId == instanceId;
@override @override
int get hashCode => int get hashCode =>
@ -62,10 +66,11 @@ class TokenDTO {
(scope == null ? 0 : scope!.hashCode) + (scope == null ? 0 : scope!.hashCode) +
(tokenType == null ? 0 : tokenType!.hashCode) + (tokenType == null ? 0 : tokenType!.hashCode) +
(expiresIn == null ? 0 : expiresIn!.hashCode) + (expiresIn == null ? 0 : expiresIn!.hashCode) +
(expiration == null ? 0 : expiration!.hashCode); (expiration == null ? 0 : expiration!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override @override
String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration]'; String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -87,6 +92,9 @@ class TokenDTO {
if (expiration != null) { if (expiration != null) {
_json[r'expiration'] = expiration!.toUtc().toIso8601String(); _json[r'expiration'] = expiration!.toUtc().toIso8601String();
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
return _json; return _json;
} }
@ -115,6 +123,7 @@ class TokenDTO {
tokenType: mapValueOfType<String>(json, r'token_type'), tokenType: mapValueOfType<String>(json, r'token_type'),
expiresIn: mapValueOfType<int>(json, r'expires_in'), expiresIn: mapValueOfType<int>(json, r'expires_in'),
expiration: mapDateTime(json, r'expiration', ''), expiration: mapDateTime(json, r'expiration', ''),
instanceId: mapValueOfType<String>(json, r'instanceId'),
); );
} }
return null; return null;

View File

@ -20,6 +20,7 @@ class User {
this.lastName, this.lastName,
this.token, this.token,
this.dateCreation, this.dateCreation,
this.instanceId,
}); });
String? id; String? id;
@ -42,6 +43,8 @@ class User {
/// ///
DateTime? dateCreation; DateTime? dateCreation;
String? instanceId;
@override @override
bool operator ==(Object other) => identical(this, other) || other is User && bool operator ==(Object other) => identical(this, other) || other is User &&
other.id == id && other.id == id &&
@ -50,7 +53,8 @@ class User {
other.firstName == firstName && other.firstName == firstName &&
other.lastName == lastName && other.lastName == lastName &&
other.token == token && other.token == token &&
other.dateCreation == dateCreation; other.dateCreation == dateCreation &&
other.instanceId == instanceId;
@override @override
int get hashCode => int get hashCode =>
@ -61,10 +65,11 @@ class User {
(firstName == null ? 0 : firstName!.hashCode) + (firstName == null ? 0 : firstName!.hashCode) +
(lastName == null ? 0 : lastName!.hashCode) + (lastName == null ? 0 : lastName!.hashCode) +
(token == null ? 0 : token!.hashCode) + (token == null ? 0 : token!.hashCode) +
(dateCreation == null ? 0 : dateCreation!.hashCode); (dateCreation == null ? 0 : dateCreation!.hashCode) +
(instanceId == null ? 0 : instanceId!.hashCode);
@override @override
String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation]'; String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation, instanceId=$instanceId]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final _json = <String, dynamic>{}; final _json = <String, dynamic>{};
@ -89,6 +94,9 @@ class User {
if (dateCreation != null) { if (dateCreation != null) {
_json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String();
} }
if (instanceId != null) {
_json[r'instanceId'] = instanceId;
}
return _json; return _json;
} }
@ -118,6 +126,7 @@ class User {
lastName: mapValueOfType<String>(json, r'lastName'), lastName: mapValueOfType<String>(json, r'lastName'),
token: mapValueOfType<String>(json, r'token'), token: mapValueOfType<String>(json, r'token'),
dateCreation: mapDateTime(json, r'dateCreation', ''), dateCreation: mapDateTime(json, r'dateCreation', ''),
instanceId: mapValueOfType<String>(json, r'instanceId'),
); );
} }
return null; return null;

View File

@ -0,0 +1,46 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api/api.dart';
import 'package:test/test.dart';
/// tests for InstanceApi
void main() {
// final instance = InstanceApi();
group('tests for InstanceApi', () {
//Future<InstanceDTO> instanceCreateInstance(Instance instance) async
test('test instanceCreateInstance', () async {
// TODO
});
//Future<String> instanceDeleteInstance(String id) async
test('test instanceDeleteInstance', () async {
// TODO
});
//Future<List<Instance>> instanceGet() async
test('test instanceGet', () async {
// TODO
});
//Future<InstanceDTO> instanceGetDetail(String id) async
test('test instanceGetDetail', () async {
// TODO
});
//Future<InstanceDTO> instanceUpdateinstance(Instance instance) async
test('test instanceUpdateinstance', () async {
// TODO
});
});
}

View File

@ -0,0 +1,37 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api/api.dart';
import 'package:test/test.dart';
// tests for InstanceDTO
void main() {
// final instance = InstanceDTO();
group('test InstanceDTO', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
});
}

View File

@ -0,0 +1,37 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
import 'package:manager_api/api.dart';
import 'package:test/test.dart';
// tests for Instance
void main() {
// final instance = Instance();
group('test Instance', () {
// String id
test('to test the property `id`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// DateTime dateCreation
test('to test the property `dateCreation`', () async {
// TODO
});
});
}