update service generation

This commit is contained in:
Thomas Fransolet 2021-07-08 19:19:15 +02:00
parent 6e38936ec5
commit f05300a4df
6 changed files with 76 additions and 60 deletions

View File

@ -21,9 +21,9 @@ class _DevicesScreenState extends State<DevicesScreen> {
Size size = MediaQuery.of(context).size; Size size = MediaQuery.of(context).size;
return Container( return Container(
child: Column( child: Align(
children: [ alignment: AlignmentDirectional.topCenter,
FutureBuilder( child: FutureBuilder(
future: getDevices(appContext), future: getDevices(appContext),
builder: (context, AsyncSnapshot<dynamic> snapshot) { builder: (context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.connectionState == ConnectionState.done) { if (snapshot.connectionState == ConnectionState.done) {
@ -55,7 +55,6 @@ class _DevicesScreenState extends State<DevicesScreen> {
} }
} }
), ),
]
), ),
); );
} }

View File

@ -10,7 +10,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] **id** | **String** | | [optional]
**name** | **String** | | [optional] **name** | **String** | | [optional]
**ipAddress** | **String** | | [optional] **ipAddressWLAN** | **String** | | [optional]
**ipAddressETH** | **String** | | [optional]
**configurationId** | **String** | | [optional] **configurationId** | **String** | | [optional]
**configuration** | **String** | | [optional] **configuration** | **String** | | [optional]
**connected** | **bool** | | [optional] **connected** | **bool** | | [optional]

View File

@ -10,7 +10,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] **id** | **String** | | [optional]
**name** | **String** | | [optional] **name** | **String** | | [optional]
**ipAddress** | **String** | | [optional] **ipAddressWLAN** | **String** | | [optional]
**ipAddressETH** | **String** | | [optional]
**configurationId** | **String** | | [optional] **configurationId** | **String** | | [optional]
**configuration** | **String** | | [optional] **configuration** | **String** | | [optional]
**connected** | **bool** | | [optional] **connected** | **bool** | | [optional]

View File

@ -14,7 +14,8 @@ class DeviceDetailDTO {
DeviceDetailDTO({ DeviceDetailDTO({
this.id, this.id,
this.name, this.name,
this.ipAddress, this.ipAddressWLAN,
this.ipAddressETH,
this.configurationId, this.configurationId,
this.configuration, this.configuration,
this.connected, this.connected,
@ -29,7 +30,9 @@ class DeviceDetailDTO {
String name; String name;
String ipAddress; String ipAddressWLAN;
String ipAddressETH;
String configurationId; String configurationId;
@ -51,7 +54,8 @@ class DeviceDetailDTO {
bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTO && bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTO &&
other.id == id && other.id == id &&
other.name == name && other.name == name &&
other.ipAddress == ipAddress && other.ipAddressWLAN == ipAddressWLAN &&
other.ipAddressETH == ipAddressETH &&
other.configurationId == configurationId && other.configurationId == configurationId &&
other.configuration == configuration && other.configuration == configuration &&
other.connected == connected && other.connected == connected &&
@ -65,7 +69,8 @@ class DeviceDetailDTO {
int get hashCode => int get hashCode =>
(id == null ? 0 : id.hashCode) + (id == null ? 0 : id.hashCode) +
(name == null ? 0 : name.hashCode) + (name == null ? 0 : name.hashCode) +
(ipAddress == null ? 0 : ipAddress.hashCode) + (ipAddressWLAN == null ? 0 : ipAddressWLAN.hashCode) +
(ipAddressETH == null ? 0 : ipAddressETH.hashCode) +
(configurationId == null ? 0 : configurationId.hashCode) + (configurationId == null ? 0 : configurationId.hashCode) +
(configuration == null ? 0 : configuration.hashCode) + (configuration == null ? 0 : configuration.hashCode) +
(connected == null ? 0 : connected.hashCode) + (connected == null ? 0 : connected.hashCode) +
@ -76,7 +81,7 @@ class DeviceDetailDTO {
(lastBatteryLevel == null ? 0 : lastBatteryLevel.hashCode); (lastBatteryLevel == null ? 0 : lastBatteryLevel.hashCode);
@override @override
String toString() => 'DeviceDetailDTO[id=$id, name=$name, ipAddress=$ipAddress, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; String toString() => 'DeviceDetailDTO[id=$id, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -86,8 +91,11 @@ class DeviceDetailDTO {
if (name != null) { if (name != null) {
json[r'name'] = name; json[r'name'] = name;
} }
if (ipAddress != null) { if (ipAddressWLAN != null) {
json[r'ipAddress'] = ipAddress; json[r'ipAddressWLAN'] = ipAddressWLAN;
}
if (ipAddressETH != null) {
json[r'ipAddressETH'] = ipAddressETH;
} }
if (configurationId != null) { if (configurationId != null) {
json[r'configurationId'] = configurationId; json[r'configurationId'] = configurationId;
@ -123,7 +131,8 @@ class DeviceDetailDTO {
: DeviceDetailDTO( : DeviceDetailDTO(
id: json[r'id'], id: json[r'id'],
name: json[r'name'], name: json[r'name'],
ipAddress: json[r'ipAddress'], ipAddressWLAN: json[r'ipAddressWLAN'],
ipAddressETH: json[r'ipAddressETH'],
configurationId: json[r'configurationId'], configurationId: json[r'configurationId'],
configuration: json[r'configuration'], configuration: json[r'configuration'],
connected: json[r'connected'], connected: json[r'connected'],

View File

@ -14,7 +14,8 @@ class DeviceDTO {
DeviceDTO({ DeviceDTO({
this.id, this.id,
this.name, this.name,
this.ipAddress, this.ipAddressWLAN,
this.ipAddressETH,
this.configurationId, this.configurationId,
this.configuration, this.configuration,
this.connected, this.connected,
@ -25,7 +26,9 @@ class DeviceDTO {
String name; String name;
String ipAddress; String ipAddressWLAN;
String ipAddressETH;
String configurationId; String configurationId;
@ -39,7 +42,8 @@ class DeviceDTO {
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 &&
other.name == name && other.name == name &&
other.ipAddress == ipAddress && other.ipAddressWLAN == ipAddressWLAN &&
other.ipAddressETH == ipAddressETH &&
other.configurationId == configurationId && other.configurationId == configurationId &&
other.configuration == configuration && other.configuration == configuration &&
other.connected == connected && other.connected == connected &&
@ -49,14 +53,15 @@ class DeviceDTO {
int get hashCode => int get hashCode =>
(id == null ? 0 : id.hashCode) + (id == null ? 0 : id.hashCode) +
(name == null ? 0 : name.hashCode) + (name == null ? 0 : name.hashCode) +
(ipAddress == null ? 0 : ipAddress.hashCode) + (ipAddressWLAN == null ? 0 : ipAddressWLAN.hashCode) +
(ipAddressETH == null ? 0 : ipAddressETH.hashCode) +
(configurationId == null ? 0 : configurationId.hashCode) + (configurationId == null ? 0 : configurationId.hashCode) +
(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);
@override @override
String toString() => 'DeviceDTO[id=$id, name=$name, ipAddress=$ipAddress, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation]'; String toString() => 'DeviceDTO[id=$id, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -66,8 +71,11 @@ class DeviceDTO {
if (name != null) { if (name != null) {
json[r'name'] = name; json[r'name'] = name;
} }
if (ipAddress != null) { if (ipAddressWLAN != null) {
json[r'ipAddress'] = ipAddress; json[r'ipAddressWLAN'] = ipAddressWLAN;
}
if (ipAddressETH != null) {
json[r'ipAddressETH'] = ipAddressETH;
} }
if (configurationId != null) { if (configurationId != null) {
json[r'configurationId'] = configurationId; json[r'configurationId'] = configurationId;
@ -91,7 +99,8 @@ class DeviceDTO {
: DeviceDTO( : DeviceDTO(
id: json[r'id'], id: json[r'id'],
name: json[r'name'], name: json[r'name'],
ipAddress: json[r'ipAddress'], ipAddressWLAN: json[r'ipAddressWLAN'],
ipAddressETH: json[r'ipAddressETH'],
configurationId: json[r'configurationId'], configurationId: json[r'configurationId'],
configuration: json[r'configuration'], configuration: json[r'configuration'],
connected: json[r'connected'], connected: json[r'connected'],

View File

@ -27,8 +27,6 @@ paths:
application/json: application/json:
schema: schema:
type: string type: string
security:
- bearer: []
post: post:
tags: tags:
- Configuration - Configuration
@ -243,8 +241,6 @@ paths:
application/json: application/json:
schema: schema:
type: string type: string
security:
- bearer: []
put: put:
tags: tags:
- Device - Device
@ -771,8 +767,6 @@ paths:
application/json: application/json:
schema: schema:
type: string type: string
security:
- bearer: []
delete: delete:
tags: tags:
- Section - Section
@ -1307,7 +1301,10 @@ components:
name: name:
type: string type: string
nullable: true nullable: true
ipAddress: ipAddressWLAN:
type: string
nullable: true
ipAddressETH:
type: string type: string
nullable: true nullable: true
configurationId: configurationId: