update service generation

This commit is contained in:
Thomas Fransolet 2023-08-11 16:48:23 +02:00
parent 5167ad9091
commit bcfef44caa
37 changed files with 243 additions and 46 deletions

View File

@ -1,5 +1,5 @@
#Fri Aug 04 18:34:37 CEST 2023 #Fri Aug 11 16:46:29 CEST 2023
VERSION_BUILD=69 VERSION_BUILD=72
VERSION_MAJOR=1 VERSION_MAJOR=1
VERSION_MINOR=0 VERSION_MINOR=0
VERSION_PATCH=0 VERSION_PATCH=0

View File

@ -101,7 +101,7 @@ class _RoomDetailPageState extends State<RoomDetailPage> {
//if(roomDetailDTO.devices![index].meansOfCommunications!.contains(API.MeansOfCommunication.zigbee)) { //if(roomDetailDTO.devices![index].meansOfCommunications!.contains(API.MeansOfCommunication.zigbee)) {
switch(roomDetailDTO.devices![index].type) { switch(roomDetailDTO.devices![index].type) {
case DeviceType.light: case DeviceType.light:
case DeviceType.plug: case DeviceType.switch_:
debugPrint("Quick action supported !"); debugPrint("Quick action supported !");
List<AutomationState>? statesToSend = []; List<AutomationState>? statesToSend = [];
statesToSend.add(AutomationState(name: "state", value: "toggle")); statesToSend.add(AutomationState(name: "state", value: "toggle"));

View File

@ -5,7 +5,7 @@ info:
description: API description description: API description
version: Version Pre-Alpha version: Version Pre-Alpha
servers: servers:
- url: http://localhost:25049 - url: https://localhost:5001
paths: paths:
/api/books: /api/books:
get: get:
@ -3906,6 +3906,16 @@ components:
linkQuality: linkQuality:
type: integer type: integer
format: int32 format: int32
isCO2:
type: boolean
cO2:
type: integer
format: int32
isNoise:
type: boolean
noise:
type: integer
format: int32
MeansOfCommunication: MeansOfCommunication:
type: string type: string
description: '' description: ''
@ -4101,6 +4111,9 @@ components:
homeId: homeId:
type: string type: string
nullable: true nullable: true
serviceHomeId:
type: string
nullable: true
endpoint: endpoint:
type: string type: string
nullable: true nullable: true
@ -4115,6 +4128,12 @@ components:
nullable: true nullable: true
active: active:
type: boolean type: boolean
value:
type: string
nullable: true
valueRefresh:
type: string
nullable: true
ProviderType: ProviderType:
type: string type: string
description: '' description: ''
@ -4123,11 +4142,13 @@ components:
- meross - meross
- yeelight - yeelight
- zigbee2mqtt - zigbee2mqtt
- netatmo
enum: enum:
- arlo - arlo
- meross - meross
- yeelight - yeelight
- zigbee2mqtt - zigbee2mqtt
- netatmo
ScreenDevice: ScreenDevice:
type: object type: object
additionalProperties: false additionalProperties: false

View File

@ -237,10 +237,3 @@ lib/model/user_info.dart
lib/model/user_info_detail_dto.dart lib/model/user_info_detail_dto.dart
lib/model/view_by.dart lib/model/view_by.dart
pubspec.yaml pubspec.yaml
test/alarm_mode_detail_dto_all_of_geolocalized_mode_test.dart
test/alarm_mode_detail_dto_all_of_programmed_mode_test.dart
test/event_detail_dto_all_of_alarm_triggered_test.dart
test/event_detail_dto_all_of_automation_triggered_test.dart
test/event_detail_dto_all_of_device_state_test.dart
test/notification_api_test.dart
test/notification_dto_test.dart

View File

@ -56,7 +56,7 @@ try {
## Documentation for API Endpoints ## Documentation for API Endpoints
All URIs are relative to *http://localhost:25049* All URIs are relative to *https://localhost:5001*
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -82,6 +82,10 @@ Name | Type | Description | Notes
**voltage** | **num** | | [optional] **voltage** | **num** | | [optional]
**isLinkQuality** | **bool** | | [optional] **isLinkQuality** | **bool** | | [optional]
**linkQuality** | **int** | | [optional] **linkQuality** | **int** | | [optional]
**isCO2** | **bool** | | [optional]
**cO2** | **int** | | [optional]
**isNoise** | **bool** | | [optional]
**noise** | **int** | | [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

@ -67,6 +67,10 @@ Name | Type | Description | Notes
**voltage** | **num** | | [optional] **voltage** | **num** | | [optional]
**isLinkQuality** | **bool** | | [optional] **isLinkQuality** | **bool** | | [optional]
**linkQuality** | **int** | | [optional] **linkQuality** | **int** | | [optional]
**isCO2** | **bool** | | [optional]
**cO2** | **int** | | [optional]
**isNoise** | **bool** | | [optional]
**noise** | **int** | | [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:mycore_api/api.dart'; import 'package:mycore_api/api.dart';
``` ```
All URIs are relative to *http://localhost:25049* All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,11 +12,14 @@ Name | Type | Description | Notes
**name** | **String** | | [optional] **name** | **String** | | [optional]
**type** | [**ProviderType**](ProviderType.md) | | [optional] **type** | [**ProviderType**](ProviderType.md) | | [optional]
**homeId** | **String** | | [optional] **homeId** | **String** | | [optional]
**serviceHomeId** | **String** | | [optional]
**endpoint** | **String** | | [optional] **endpoint** | **String** | | [optional]
**username** | **String** | | [optional] **username** | **String** | | [optional]
**password** | **String** | | [optional] **password** | **String** | | [optional]
**apiKey** | **String** | | [optional] **apiKey** | **String** | | [optional]
**active** | **bool** | | [optional] **active** | **bool** | | [optional]
**value** | **String** | | [optional]
**valueRefresh** | **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:mycore_api/api.dart'; import 'package:mycore_api/api.dart';
``` ```
All URIs are relative to *http://localhost:25049* All URIs are relative to *https://localhost:5001*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,7 +11,7 @@
part of openapi.api; part of openapi.api;
class ApiClient { class ApiClient {
ApiClient({this.basePath = 'http://localhost:25049', this.authentication,}); ApiClient({this.basePath = 'https://localhost:5001', this.authentication,});
final String basePath; final String basePath;
final Authentication? authentication; final Authentication? authentication;

View File

@ -87,6 +87,10 @@ class DeviceDetailDTO {
this.voltage, this.voltage,
this.isLinkQuality, this.isLinkQuality,
this.linkQuality, this.linkQuality,
this.isCO2,
this.cO2,
this.isNoise,
this.noise,
}); });
String? id; String? id;
@ -525,6 +529,38 @@ class DeviceDetailDTO {
/// ///
int? linkQuality; int? linkQuality;
///
/// 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.
///
bool? isCO2;
///
/// 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.
///
int? cO2;
///
/// 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.
///
bool? isNoise;
///
/// 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.
///
int? noise;
@override @override
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 &&
@ -600,7 +636,11 @@ class DeviceDetailDTO {
other.isVoltage == isVoltage && other.isVoltage == isVoltage &&
other.voltage == voltage && other.voltage == voltage &&
other.isLinkQuality == isLinkQuality && other.isLinkQuality == isLinkQuality &&
other.linkQuality == linkQuality; other.linkQuality == linkQuality &&
other.isCO2 == isCO2 &&
other.cO2 == cO2 &&
other.isNoise == isNoise &&
other.noise == noise;
@override @override
int get hashCode => int get hashCode =>
@ -678,10 +718,14 @@ class DeviceDetailDTO {
(isVoltage == null ? 0 : isVoltage!.hashCode) + (isVoltage == null ? 0 : isVoltage!.hashCode) +
(voltage == null ? 0 : voltage!.hashCode) + (voltage == null ? 0 : voltage!.hashCode) +
(isLinkQuality == null ? 0 : isLinkQuality!.hashCode) + (isLinkQuality == null ? 0 : isLinkQuality!.hashCode) +
(linkQuality == null ? 0 : linkQuality!.hashCode); (linkQuality == null ? 0 : linkQuality!.hashCode) +
(isCO2 == null ? 0 : isCO2!.hashCode) +
(cO2 == null ? 0 : cO2!.hashCode) +
(isNoise == null ? 0 : isNoise!.hashCode) +
(noise == null ? 0 : noise!.hashCode);
@override @override
String toString() => 'DeviceDetailDTO[id=$id, homeId=$homeId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, roomId=$roomId, providerId=$providerId, providerName=$providerName, lastStateDate=$lastStateDate, lastMessageDate=$lastMessageDate, battery=$battery, batteryStatus=$batteryStatus, firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastMessage=$lastMessage, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations, isContact=$isContact, contact=$contact, isIlluminance=$isIlluminance, illuminance=$illuminance, isBrightness=$isBrightness, brightness=$brightness, isState=$isState, state=$state, isColorTemp=$isColorTemp, colorTemp=$colorTemp, isColorXY=$isColorXY, colorX=$colorX, colorY=$colorY, isOccupation=$isOccupation, occupation=$occupation, isAlarm=$isAlarm, alarm=$alarm, isWaterLeak=$isWaterLeak, waterLeak=$waterLeak, isSmoke=$isSmoke, smoke=$smoke, isVibration=$isVibration, vibration=$vibration, isAction=$isAction, action=$action, isTemperature=$isTemperature, temperature=$temperature, isHumidity=$isHumidity, humidity=$humidity, isPressure=$isPressure, pressure=$pressure, isAirQuality=$isAirQuality, airQuality=$airQuality, isFanSpeed=$isFanSpeed, fanSpeed=$fanSpeed, isFanMode=$isFanMode, fanMode=$fanMode, isConsumption=$isConsumption, consumption=$consumption, isCurrentPower=$isCurrentPower, currentPower=$currentPower, isVoltage=$isVoltage, voltage=$voltage, isLinkQuality=$isLinkQuality, linkQuality=$linkQuality]'; String toString() => 'DeviceDetailDTO[id=$id, homeId=$homeId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, roomId=$roomId, providerId=$providerId, providerName=$providerName, lastStateDate=$lastStateDate, lastMessageDate=$lastMessageDate, battery=$battery, batteryStatus=$batteryStatus, firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastMessage=$lastMessage, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations, isContact=$isContact, contact=$contact, isIlluminance=$isIlluminance, illuminance=$illuminance, isBrightness=$isBrightness, brightness=$brightness, isState=$isState, state=$state, isColorTemp=$isColorTemp, colorTemp=$colorTemp, isColorXY=$isColorXY, colorX=$colorX, colorY=$colorY, isOccupation=$isOccupation, occupation=$occupation, isAlarm=$isAlarm, alarm=$alarm, isWaterLeak=$isWaterLeak, waterLeak=$waterLeak, isSmoke=$isSmoke, smoke=$smoke, isVibration=$isVibration, vibration=$vibration, isAction=$isAction, action=$action, isTemperature=$isTemperature, temperature=$temperature, isHumidity=$isHumidity, humidity=$humidity, isPressure=$isPressure, pressure=$pressure, isAirQuality=$isAirQuality, airQuality=$airQuality, isFanSpeed=$isFanSpeed, fanSpeed=$fanSpeed, isFanMode=$isFanMode, fanMode=$fanMode, isConsumption=$isConsumption, consumption=$consumption, isCurrentPower=$isCurrentPower, currentPower=$currentPower, isVoltage=$isVoltage, voltage=$voltage, isLinkQuality=$isLinkQuality, linkQuality=$linkQuality, isCO2=$isCO2, cO2=$cO2, isNoise=$isNoise, noise=$noise]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -1055,6 +1099,26 @@ class DeviceDetailDTO {
} else { } else {
json[r'linkQuality'] = null; json[r'linkQuality'] = null;
} }
if (this.isCO2 != null) {
json[r'isCO2'] = this.isCO2;
} else {
json[r'isCO2'] = null;
}
if (this.cO2 != null) {
json[r'cO2'] = this.cO2;
} else {
json[r'cO2'] = null;
}
if (this.isNoise != null) {
json[r'isNoise'] = this.isNoise;
} else {
json[r'isNoise'] = null;
}
if (this.noise != null) {
json[r'noise'] = this.noise;
} else {
json[r'noise'] = null;
}
return json; return json;
} }
@ -1167,6 +1231,10 @@ class DeviceDetailDTO {
: num.parse(json[r'voltage'].toString()), : num.parse(json[r'voltage'].toString()),
isLinkQuality: mapValueOfType<bool>(json, r'isLinkQuality'), isLinkQuality: mapValueOfType<bool>(json, r'isLinkQuality'),
linkQuality: mapValueOfType<int>(json, r'linkQuality'), linkQuality: mapValueOfType<int>(json, r'linkQuality'),
isCO2: mapValueOfType<bool>(json, r'isCO2'),
cO2: mapValueOfType<int>(json, r'cO2'),
isNoise: mapValueOfType<bool>(json, r'isNoise'),
noise: mapValueOfType<int>(json, r'noise'),
); );
} }
return null; return null;

View File

@ -72,6 +72,10 @@ class DeviceDetailDTOAllOf {
this.voltage, this.voltage,
this.isLinkQuality, this.isLinkQuality,
this.linkQuality, this.linkQuality,
this.isCO2,
this.cO2,
this.isNoise,
this.noise,
}); });
String? firmwareVersion; String? firmwareVersion;
@ -438,6 +442,38 @@ class DeviceDetailDTOAllOf {
/// ///
int? linkQuality; int? linkQuality;
///
/// 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.
///
bool? isCO2;
///
/// 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.
///
int? cO2;
///
/// 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.
///
bool? isNoise;
///
/// 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.
///
int? noise;
@override @override
bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTOAllOf && bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTOAllOf &&
other.firmwareVersion == firmwareVersion && other.firmwareVersion == firmwareVersion &&
@ -498,7 +534,11 @@ class DeviceDetailDTOAllOf {
other.isVoltage == isVoltage && other.isVoltage == isVoltage &&
other.voltage == voltage && other.voltage == voltage &&
other.isLinkQuality == isLinkQuality && other.isLinkQuality == isLinkQuality &&
other.linkQuality == linkQuality; other.linkQuality == linkQuality &&
other.isCO2 == isCO2 &&
other.cO2 == cO2 &&
other.isNoise == isNoise &&
other.noise == noise;
@override @override
int get hashCode => int get hashCode =>
@ -561,10 +601,14 @@ class DeviceDetailDTOAllOf {
(isVoltage == null ? 0 : isVoltage!.hashCode) + (isVoltage == null ? 0 : isVoltage!.hashCode) +
(voltage == null ? 0 : voltage!.hashCode) + (voltage == null ? 0 : voltage!.hashCode) +
(isLinkQuality == null ? 0 : isLinkQuality!.hashCode) + (isLinkQuality == null ? 0 : isLinkQuality!.hashCode) +
(linkQuality == null ? 0 : linkQuality!.hashCode); (linkQuality == null ? 0 : linkQuality!.hashCode) +
(isCO2 == null ? 0 : isCO2!.hashCode) +
(cO2 == null ? 0 : cO2!.hashCode) +
(isNoise == null ? 0 : isNoise!.hashCode) +
(noise == null ? 0 : noise!.hashCode);
@override @override
String toString() => 'DeviceDetailDTOAllOf[firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastMessage=$lastMessage, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations, isContact=$isContact, contact=$contact, isIlluminance=$isIlluminance, illuminance=$illuminance, isBrightness=$isBrightness, brightness=$brightness, isState=$isState, state=$state, isColorTemp=$isColorTemp, colorTemp=$colorTemp, isColorXY=$isColorXY, colorX=$colorX, colorY=$colorY, isOccupation=$isOccupation, occupation=$occupation, isAlarm=$isAlarm, alarm=$alarm, isWaterLeak=$isWaterLeak, waterLeak=$waterLeak, isSmoke=$isSmoke, smoke=$smoke, isVibration=$isVibration, vibration=$vibration, isAction=$isAction, action=$action, isTemperature=$isTemperature, temperature=$temperature, isHumidity=$isHumidity, humidity=$humidity, isPressure=$isPressure, pressure=$pressure, isAirQuality=$isAirQuality, airQuality=$airQuality, isFanSpeed=$isFanSpeed, fanSpeed=$fanSpeed, isFanMode=$isFanMode, fanMode=$fanMode, isConsumption=$isConsumption, consumption=$consumption, isCurrentPower=$isCurrentPower, currentPower=$currentPower, isVoltage=$isVoltage, voltage=$voltage, isLinkQuality=$isLinkQuality, linkQuality=$linkQuality]'; String toString() => 'DeviceDetailDTOAllOf[firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastMessage=$lastMessage, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations, isContact=$isContact, contact=$contact, isIlluminance=$isIlluminance, illuminance=$illuminance, isBrightness=$isBrightness, brightness=$brightness, isState=$isState, state=$state, isColorTemp=$isColorTemp, colorTemp=$colorTemp, isColorXY=$isColorXY, colorX=$colorX, colorY=$colorY, isOccupation=$isOccupation, occupation=$occupation, isAlarm=$isAlarm, alarm=$alarm, isWaterLeak=$isWaterLeak, waterLeak=$waterLeak, isSmoke=$isSmoke, smoke=$smoke, isVibration=$isVibration, vibration=$vibration, isAction=$isAction, action=$action, isTemperature=$isTemperature, temperature=$temperature, isHumidity=$isHumidity, humidity=$humidity, isPressure=$isPressure, pressure=$pressure, isAirQuality=$isAirQuality, airQuality=$airQuality, isFanSpeed=$isFanSpeed, fanSpeed=$fanSpeed, isFanMode=$isFanMode, fanMode=$fanMode, isConsumption=$isConsumption, consumption=$consumption, isCurrentPower=$isCurrentPower, currentPower=$currentPower, isVoltage=$isVoltage, voltage=$voltage, isLinkQuality=$isLinkQuality, linkQuality=$linkQuality, isCO2=$isCO2, cO2=$cO2, isNoise=$isNoise, noise=$noise]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -863,6 +907,26 @@ class DeviceDetailDTOAllOf {
} else { } else {
json[r'linkQuality'] = null; json[r'linkQuality'] = null;
} }
if (this.isCO2 != null) {
json[r'isCO2'] = this.isCO2;
} else {
json[r'isCO2'] = null;
}
if (this.cO2 != null) {
json[r'cO2'] = this.cO2;
} else {
json[r'cO2'] = null;
}
if (this.isNoise != null) {
json[r'isNoise'] = this.isNoise;
} else {
json[r'isNoise'] = null;
}
if (this.noise != null) {
json[r'noise'] = this.noise;
} else {
json[r'noise'] = null;
}
return json; return json;
} }
@ -960,6 +1024,10 @@ class DeviceDetailDTOAllOf {
: num.parse(json[r'voltage'].toString()), : num.parse(json[r'voltage'].toString()),
isLinkQuality: mapValueOfType<bool>(json, r'isLinkQuality'), isLinkQuality: mapValueOfType<bool>(json, r'isLinkQuality'),
linkQuality: mapValueOfType<int>(json, r'linkQuality'), linkQuality: mapValueOfType<int>(json, r'linkQuality'),
isCO2: mapValueOfType<bool>(json, r'isCO2'),
cO2: mapValueOfType<int>(json, r'cO2'),
isNoise: mapValueOfType<bool>(json, r'isNoise'),
noise: mapValueOfType<int>(json, r'noise'),
); );
} }
return null; return null;

View File

@ -17,11 +17,14 @@ class ProviderDTO {
this.name, this.name,
this.type, this.type,
this.homeId, this.homeId,
this.serviceHomeId,
this.endpoint, this.endpoint,
this.username, this.username,
this.password, this.password,
this.apiKey, this.apiKey,
this.active, this.active,
this.value,
this.valueRefresh,
}); });
String? id; String? id;
@ -38,6 +41,8 @@ class ProviderDTO {
String? homeId; String? homeId;
String? serviceHomeId;
String? endpoint; String? endpoint;
String? username; String? username;
@ -54,17 +59,24 @@ class ProviderDTO {
/// ///
bool? active; bool? active;
String? value;
String? valueRefresh;
@override @override
bool operator ==(Object other) => identical(this, other) || other is ProviderDTO && bool operator ==(Object other) => identical(this, other) || other is ProviderDTO &&
other.id == id && other.id == id &&
other.name == name && other.name == name &&
other.type == type && other.type == type &&
other.homeId == homeId && other.homeId == homeId &&
other.serviceHomeId == serviceHomeId &&
other.endpoint == endpoint && other.endpoint == endpoint &&
other.username == username && other.username == username &&
other.password == password && other.password == password &&
other.apiKey == apiKey && other.apiKey == apiKey &&
other.active == active; other.active == active &&
other.value == value &&
other.valueRefresh == valueRefresh;
@override @override
int get hashCode => int get hashCode =>
@ -73,14 +85,17 @@ class ProviderDTO {
(name == null ? 0 : name!.hashCode) + (name == null ? 0 : name!.hashCode) +
(type == null ? 0 : type!.hashCode) + (type == null ? 0 : type!.hashCode) +
(homeId == null ? 0 : homeId!.hashCode) + (homeId == null ? 0 : homeId!.hashCode) +
(serviceHomeId == null ? 0 : serviceHomeId!.hashCode) +
(endpoint == null ? 0 : endpoint!.hashCode) + (endpoint == null ? 0 : endpoint!.hashCode) +
(username == null ? 0 : username!.hashCode) + (username == null ? 0 : username!.hashCode) +
(password == null ? 0 : password!.hashCode) + (password == null ? 0 : password!.hashCode) +
(apiKey == null ? 0 : apiKey!.hashCode) + (apiKey == null ? 0 : apiKey!.hashCode) +
(active == null ? 0 : active!.hashCode); (active == null ? 0 : active!.hashCode) +
(value == null ? 0 : value!.hashCode) +
(valueRefresh == null ? 0 : valueRefresh!.hashCode);
@override @override
String toString() => 'ProviderDTO[id=$id, name=$name, type=$type, homeId=$homeId, endpoint=$endpoint, username=$username, password=$password, apiKey=$apiKey, active=$active]'; String toString() => 'ProviderDTO[id=$id, name=$name, type=$type, homeId=$homeId, serviceHomeId=$serviceHomeId, endpoint=$endpoint, username=$username, password=$password, apiKey=$apiKey, active=$active, value=$value, valueRefresh=$valueRefresh]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -104,6 +119,11 @@ class ProviderDTO {
} else { } else {
json[r'homeId'] = null; json[r'homeId'] = null;
} }
if (this.serviceHomeId != null) {
json[r'serviceHomeId'] = this.serviceHomeId;
} else {
json[r'serviceHomeId'] = null;
}
if (this.endpoint != null) { if (this.endpoint != null) {
json[r'endpoint'] = this.endpoint; json[r'endpoint'] = this.endpoint;
} else { } else {
@ -129,6 +149,16 @@ class ProviderDTO {
} else { } else {
json[r'active'] = null; json[r'active'] = null;
} }
if (this.value != null) {
json[r'value'] = this.value;
} else {
json[r'value'] = null;
}
if (this.valueRefresh != null) {
json[r'valueRefresh'] = this.valueRefresh;
} else {
json[r'valueRefresh'] = null;
}
return json; return json;
} }
@ -155,11 +185,14 @@ class ProviderDTO {
name: mapValueOfType<String>(json, r'name'), name: mapValueOfType<String>(json, r'name'),
type: ProviderType.fromJson(json[r'type']), type: ProviderType.fromJson(json[r'type']),
homeId: mapValueOfType<String>(json, r'homeId'), homeId: mapValueOfType<String>(json, r'homeId'),
serviceHomeId: mapValueOfType<String>(json, r'serviceHomeId'),
endpoint: mapValueOfType<String>(json, r'endpoint'), endpoint: mapValueOfType<String>(json, r'endpoint'),
username: mapValueOfType<String>(json, r'username'), username: mapValueOfType<String>(json, r'username'),
password: mapValueOfType<String>(json, r'password'), password: mapValueOfType<String>(json, r'password'),
apiKey: mapValueOfType<String>(json, r'apiKey'), apiKey: mapValueOfType<String>(json, r'apiKey'),
active: mapValueOfType<bool>(json, r'active'), active: mapValueOfType<bool>(json, r'active'),
value: mapValueOfType<String>(json, r'value'),
valueRefresh: mapValueOfType<String>(json, r'valueRefresh'),
); );
} }
return null; return null;

View File

@ -27,6 +27,7 @@ class ProviderType {
static const meross = ProviderType._(r'meross'); static const meross = ProviderType._(r'meross');
static const yeelight = ProviderType._(r'yeelight'); static const yeelight = ProviderType._(r'yeelight');
static const zigbee2mqtt = ProviderType._(r'zigbee2mqtt'); static const zigbee2mqtt = ProviderType._(r'zigbee2mqtt');
static const netatmo = ProviderType._(r'netatmo');
/// List of all possible values in this [enum][ProviderType]. /// List of all possible values in this [enum][ProviderType].
static const values = <ProviderType>[ static const values = <ProviderType>[
@ -34,6 +35,7 @@ class ProviderType {
meross, meross,
yeelight, yeelight,
zigbee2mqtt, zigbee2mqtt,
netatmo,
]; ];
static ProviderType? fromJson(dynamic value) => ProviderTypeTypeTransformer().decode(value); static ProviderType? fromJson(dynamic value) => ProviderTypeTypeTransformer().decode(value);
@ -76,6 +78,7 @@ class ProviderTypeTypeTransformer {
case r'meross': return ProviderType.meross; case r'meross': return ProviderType.meross;
case r'yeelight': return ProviderType.yeelight; case r'yeelight': return ProviderType.yeelight;
case r'zigbee2mqtt': return ProviderType.zigbee2mqtt; case r'zigbee2mqtt': return ProviderType.zigbee2mqtt;
case r'netatmo': return ProviderType.netatmo;
default: default:
if (!allowNull) { if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data'); throw ArgumentError('Unknown enum value to decode: $data');