Update api generation

This commit is contained in:
Thomas Fransolet 2021-12-01 15:41:22 +01:00
parent a6ef5da499
commit acaaefd6a6
140 changed files with 8653 additions and 1173 deletions

View File

@ -3,15 +3,22 @@
README.md
doc/Action.md
doc/ActionType.md
doc/AlarmApi.md
doc/AlarmMode.md
doc/AlarmModeCreateOrUpdateDetailDTO.md
doc/AlarmModeCreateOrUpdateDetailDTOAllOf.md
doc/AlarmModeDTO.md
doc/AlarmModeDetailDTO.md
doc/AlarmModeDetailDTOAllOf.md
doc/AlarmTriggered.md
doc/AlarmType.md
doc/AuthenticationApi.md
doc/Automation.md
doc/AutomationApi.md
doc/AutomationCreateOrUpdateDetailDTO.md
doc/AutomationCreateOrUpdateDetailDTOAllOf.md
doc/AutomationDTO.md
doc/AutomationDetailDTO.md
doc/AutomationDetailDTOAllOf.md
doc/AutomationState.md
doc/AutomationTriggered.md
doc/AzureADAuthModel.md
doc/AzureApi.md
doc/Book.md
@ -20,25 +27,36 @@ doc/Condition.md
doc/ConditionType.md
doc/ConditionValue.md
doc/ConnectionStatus.md
doc/Device.md
doc/CreateOrUpdateHomeDTO.md
doc/CreateOrUpdateHomeDTOAllOf.md
doc/DeviceApi.md
doc/DeviceDetailDTO.md
doc/DeviceDetailDTOAllOf.md
doc/DeviceState.md
doc/DeviceSummaryDTO.md
doc/DeviceType.md
doc/ElectricityProduction.md
doc/EnergyApi.md
doc/EventApi.md
doc/EventDTO.md
doc/EventDetailDTO.md
doc/EventDetailDTOAllOf.md
doc/EventType.md
doc/FacebookApi.md
doc/FacebookAuthModel.md
doc/GeolocalizedMode.md
doc/GoogleApi.md
doc/GoogleAuthModel.md
doc/Group.md
doc/GroupApi.md
doc/GroupCreateOrUpdateDetailDTO.md
doc/GroupCreateOrUpdateDetailDTOAllOf.md
doc/GroupDetailDTO.md
doc/GroupDetailDTOAllOf.md
doc/GroupSummaryDTO.md
doc/HomeApi.md
doc/HomeDTO.md
doc/HomeDetailDTO.md
doc/HomeDetailDTOAllOf.md
doc/IOTApi.md
doc/LayoutApi.md
doc/LoginDTO.md
@ -50,20 +68,19 @@ doc/OddNice.md
doc/OddObject.md
doc/PanelMenuItem.md
doc/PanelSection.md
doc/PlaceDTO.md
doc/Provider.md
doc/ProgrammedMode.md
doc/ProviderApi.md
doc/ProviderDTO.md
doc/ProviderType.md
doc/RoomApi.md
doc/RoomCreateOrUpdateDetailDTO.md
doc/RoomDetailDTO.md
doc/RoomSummaryDTO.md
doc/ScreenConfiguration.md
doc/ScreenDevice.md
doc/ScreenDeviceApi.md
doc/ScreenWidget.md
doc/SmartGardenMessage.md
doc/SmartPrinterMessage.md
doc/TimePeriodAlarm.md
doc/TokenApi.md
doc/TokenDTO.md
doc/Trigger.md
@ -78,15 +95,18 @@ doc/ValuesApi.md
doc/ViewBy.md
git_push.sh
lib/api.dart
lib/api/alarm_api.dart
lib/api/authentication_api.dart
lib/api/automation_api.dart
lib/api/azure_api.dart
lib/api/books_api.dart
lib/api/device_api.dart
lib/api/energy_api.dart
lib/api/event_api.dart
lib/api/facebook_api.dart
lib/api/google_api.dart
lib/api/group_api.dart
lib/api/home_api.dart
lib/api/iot_api.dart
lib/api/layout_api.dart
lib/api/mqtt_api.dart
@ -108,33 +128,48 @@ lib/auth/http_bearer_auth.dart
lib/auth/oauth.dart
lib/model/action.dart
lib/model/action_type.dart
lib/model/automation.dart
lib/model/automation_create_or_update_detail_dto.dart
lib/model/automation_create_or_update_detail_dto_all_of.dart
lib/model/alarm_mode.dart
lib/model/alarm_mode_create_or_update_detail_dto.dart
lib/model/alarm_mode_create_or_update_detail_dto_all_of.dart
lib/model/alarm_mode_detail_dto.dart
lib/model/alarm_mode_detail_dto_all_of.dart
lib/model/alarm_mode_dto.dart
lib/model/alarm_triggered.dart
lib/model/alarm_type.dart
lib/model/automation_detail_dto.dart
lib/model/automation_detail_dto_all_of.dart
lib/model/automation_dto.dart
lib/model/automation_state.dart
lib/model/automation_triggered.dart
lib/model/azure_ad_auth_model.dart
lib/model/book.dart
lib/model/condition.dart
lib/model/condition_type.dart
lib/model/condition_value.dart
lib/model/connection_status.dart
lib/model/device.dart
lib/model/create_or_update_home_dto.dart
lib/model/create_or_update_home_dto_all_of.dart
lib/model/device_detail_dto.dart
lib/model/device_detail_dto_all_of.dart
lib/model/device_state.dart
lib/model/device_summary_dto.dart
lib/model/device_type.dart
lib/model/electricity_production.dart
lib/model/event_detail_dto.dart
lib/model/event_detail_dto_all_of.dart
lib/model/event_dto.dart
lib/model/event_type.dart
lib/model/facebook_auth_model.dart
lib/model/geolocalized_mode.dart
lib/model/google_auth_model.dart
lib/model/group.dart
lib/model/group_create_or_update_detail_dto.dart
lib/model/group_create_or_update_detail_dto_all_of.dart
lib/model/group_detail_dto.dart
lib/model/group_detail_dto_all_of.dart
lib/model/group_summary_dto.dart
lib/model/home_detail_dto.dart
lib/model/home_detail_dto_all_of.dart
lib/model/home_dto.dart
lib/model/login_dto.dart
lib/model/means_of_communication.dart
lib/model/mqtt_message_dto.dart
@ -142,17 +177,16 @@ lib/model/odd_nice.dart
lib/model/odd_object.dart
lib/model/panel_menu_item.dart
lib/model/panel_section.dart
lib/model/place_dto.dart
lib/model/provider.dart
lib/model/programmed_mode.dart
lib/model/provider_dto.dart
lib/model/provider_type.dart
lib/model/room_create_or_update_detail_dto.dart
lib/model/room_detail_dto.dart
lib/model/room_summary_dto.dart
lib/model/screen_configuration.dart
lib/model/screen_device.dart
lib/model/screen_widget.dart
lib/model/smart_garden_message.dart
lib/model/smart_printer_message.dart
lib/model/time_period_alarm.dart
lib/model/token_dto.dart
lib/model/trigger.dart
lib/model/trigger_type.dart
@ -162,3 +196,29 @@ lib/model/user_info.dart
lib/model/user_info_detail_dto.dart
lib/model/view_by.dart
pubspec.yaml
test/alarm_api_test.dart
test/alarm_mode_create_or_update_detail_dto_all_of_test.dart
test/alarm_mode_create_or_update_detail_dto_test.dart
test/alarm_mode_detail_dto_all_of_test.dart
test/alarm_mode_detail_dto_test.dart
test/alarm_mode_dto_test.dart
test/alarm_mode_test.dart
test/alarm_triggered_test.dart
test/alarm_type_test.dart
test/automation_triggered_test.dart
test/create_or_update_home_dto_all_of_test.dart
test/create_or_update_home_dto_test.dart
test/device_state_test.dart
test/event_api_test.dart
test/event_detail_dto_all_of_test.dart
test/event_detail_dto_test.dart
test/event_dto_test.dart
test/event_type_test.dart
test/geolocalized_mode_test.dart
test/home_api_test.dart
test/home_detail_dto_all_of_test.dart
test/home_detail_dto_test.dart
test/home_dto_test.dart
test/programmed_mode_test.dart
test/provider_type_test.dart
test/time_period_alarm_test.dart

View File

@ -42,34 +42,38 @@ import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AuthenticationApi();
final grantType = grantType_example; // String |
final username = username_example; // String |
final password = password_example; // String |
final clientId = clientId_example; // String |
final clientSecret = clientSecret_example; // String |
final api_instance = AlarmApi();
final alarmModeId = alarmModeId_example; // String | Alarm mode to activate
try {
final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret);
final result = api_instance.alarmActivate(alarmModeId);
print(result);
} catch (e) {
print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n');
print('Exception when calling AlarmApi->alarmActivate: $e\n');
}
```
## Documentation for API Endpoints
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AlarmApi* | [**alarmActivate**](doc\/AlarmApi.md#alarmactivate) | **POST** /api/alarm/activate/{alarmModeId} | Activate current alarm mode
*AlarmApi* | [**alarmCreate**](doc\/AlarmApi.md#alarmcreate) | **POST** /api/alarm | Create an alarm mode
*AlarmApi* | [**alarmCreateDefaultAlarms**](doc\/AlarmApi.md#alarmcreatedefaultalarms) | **POST** /api/alarm/defaults/{homeId} | Create default alarm modes
*AlarmApi* | [**alarmDelete**](doc\/AlarmApi.md#alarmdelete) | **DELETE** /api/alarm/{alarmModeId} | Delete an alarm mode
*AlarmApi* | [**alarmDeleteAllForHome**](doc\/AlarmApi.md#alarmdeleteallforhome) | **DELETE** /api/alarm/home/{homeId} | Delete all alarm mode for a specified home
*AlarmApi* | [**alarmGetAll**](doc\/AlarmApi.md#alarmgetall) | **GET** /api/alarm/{homeId} | Get all alarm modes for the specified home
*AlarmApi* | [**alarmGetDetail**](doc\/AlarmApi.md#alarmgetdetail) | **GET** /api/alarm/detail/{alarmId} | Get detail info of a specified alarm mode
*AlarmApi* | [**alarmUpdate**](doc\/AlarmApi.md#alarmupdate) | **PUT** /api/alarm | Update an alarm mode
*AuthenticationApi* | [**authenticationAuthenticateWithForm**](doc\/AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token | Authenticate with form parameters (used by Swagger test client)
*AuthenticationApi* | [**authenticationAuthenticateWithJson**](doc\/AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate | Authenticate with Json parameters (used by most clients)
*AutomationApi* | [**automationCreate**](doc\/AutomationApi.md#automationcreate) | **POST** /api/automation | Create an automation
*AutomationApi* | [**automationDelete**](doc\/AutomationApi.md#automationdelete) | **DELETE** /api/automation/{automationId} | Delete an automation
*AutomationApi* | [**automationDeleteAllForUser**](doc\/AutomationApi.md#automationdeleteallforuser) | **DELETE** /api/automation/user/{userId} | Delete all automation for a specified
*AutomationApi* | [**automationGetAll**](doc\/AutomationApi.md#automationgetall) | **GET** /api/automation/{userId} | Get all automations for the specified user
*AutomationApi* | [**automationDeleteAllForHome**](doc\/AutomationApi.md#automationdeleteallforhome) | **DELETE** /api/automation/home/{homeId} | Delete all automation for a specified home
*AutomationApi* | [**automationGetAll**](doc\/AutomationApi.md#automationgetall) | **GET** /api/automation/{homeId} | Get all automations for the specified home
*AutomationApi* | [**automationGetDetail**](doc\/AutomationApi.md#automationgetdetail) | **GET** /api/automation/detail/{automationId} | Get detail info of a specified automation
*AutomationApi* | [**automationUpdate**](doc\/AutomationApi.md#automationupdate) | **PUT** /api/automation | Update an automation
*AzureApi* | [**azureCreate**](doc\/AzureApi.md#azurecreate) | **POST** /azure |
@ -79,29 +83,38 @@ Class | Method | HTTP request | Description
*BooksApi* | [**booksGetAll**](doc\/BooksApi.md#booksgetall) | **GET** /api/books |
*BooksApi* | [**booksUpdate**](doc\/BooksApi.md#booksupdate) | **PUT** /api/books/{id} |
*DeviceApi* | [**deviceCreate**](doc\/DeviceApi.md#devicecreate) | **POST** /api/device | Create a device
*DeviceApi* | [**deviceCreateDevicesFromProvider**](doc\/DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{userId}/fromProvider/{providerId} | Create devices from provider
*DeviceApi* | [**deviceCreateDevicesFromProvider**](doc\/DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{homeId}/fromProvider/{providerId} | Create devices from provider
*DeviceApi* | [**deviceDelete**](doc\/DeviceApi.md#devicedelete) | **DELETE** /api/device/{deviceId} | Delete a device
*DeviceApi* | [**deviceDeleteAllForUser**](doc\/DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified user
*DeviceApi* | [**deviceDeleteDevicesFromProvider**](doc\/DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{userId}/fromProvider/{providerId} | Delete devices from provider
*DeviceApi* | [**deviceGetAll**](doc\/DeviceApi.md#devicegetall) | **GET** /api/device/{userId} | Get all devices summary
*DeviceApi* | [**deviceDeleteAllForHome**](doc\/DeviceApi.md#devicedeleteallforhome) | **DELETE** /api/device/home/{homeId} | Delete all device for a specified home
*DeviceApi* | [**deviceDeleteDevicesFromProvider**](doc\/DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{homeId}/fromProvider/{providerId} | Delete devices from provider
*DeviceApi* | [**deviceGetAll**](doc\/DeviceApi.md#devicegetall) | **GET** /api/device/{homeId} | Get all devices summary
*DeviceApi* | [**deviceGetDetail**](doc\/DeviceApi.md#devicegetdetail) | **GET** /api/device/detail/{deviceId} | Get a specific device info
*DeviceApi* | [**deviceGetDevicesByType**](doc\/DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{userId}/type/{type} | Get list of devices from a type
*DeviceApi* | [**deviceGetDevicesFromProvider**](doc\/DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{userId}/fromProvider/{providerId} | Get devices from provider
*DeviceApi* | [**deviceGetDevicesFromZigbee2Mqtt**](doc\/DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt devices
*DeviceApi* | [**deviceGetDevicesByType**](doc\/DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{homeId}/type/{type} | Get list of devices from a type
*DeviceApi* | [**deviceGetDevicesFromProvider**](doc\/DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{homeId}/fromProvider/{providerId} | Get devices from provider
*DeviceApi* | [**deviceGetDevicesFromZigbee2Mqtt**](doc\/DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{homeId} | Get all zigbee2Mqtt devices
*DeviceApi* | [**deviceUpdate**](doc\/DeviceApi.md#deviceupdate) | **PUT** /api/device/{deviceId} | Update a device
*EnergyApi* | [**energyGetElectricityProduction**](doc\/EnergyApi.md#energygetelectricityproduction) | **GET** /api/energy/electricity | Get summary production of Kwh/Year
*EventApi* | [**eventDelete**](doc\/EventApi.md#eventdelete) | **DELETE** /api/event/{eventId} | Delete an event
*EventApi* | [**eventDeleteAllForHome**](doc\/EventApi.md#eventdeleteallforhome) | **DELETE** /api/event/home/{homeId} | Delete all events for a specified home
*EventApi* | [**eventGet**](doc\/EventApi.md#eventget) | **GET** /api/event/{homeId} | Get events for the specified home
*EventApi* | [**eventGetDetail**](doc\/EventApi.md#eventgetdetail) | **GET** /api/event/detail/{eventId} | Get detail info of a specified event
*FacebookApi* | [**facebookCreate**](doc\/FacebookApi.md#facebookcreate) | **POST** /facebook |
*GoogleApi* | [**googleCreate**](doc\/GoogleApi.md#googlecreate) | **POST** /google |
*GroupApi* | [**groupCreate**](doc\/GroupApi.md#groupcreate) | **POST** /api/group | Create a group
*GroupApi* | [**groupCreateDevicesFromZigbee2Mqtt**](doc\/GroupApi.md#groupcreatedevicesfromzigbee2mqtt) | **POST** /api/group/{userId}/fromZigbee | Create groups from provider
*GroupApi* | [**groupCreateDevicesFromZigbee2Mqtt**](doc\/GroupApi.md#groupcreatedevicesfromzigbee2mqtt) | **POST** /api/group/{homeId}/fromZigbee | Create groups from provider
*GroupApi* | [**groupDelete**](doc\/GroupApi.md#groupdelete) | **DELETE** /api/group/{groupId}/device/{deviceId} | Delete device from a group
*GroupApi* | [**groupDelete2**](doc\/GroupApi.md#groupdelete2) | **DELETE** /api/group/{groupId} | Delete a group
*GroupApi* | [**groupDeleteAllForUser**](doc\/GroupApi.md#groupdeleteallforuser) | **DELETE** /api/group/user/{userId} | Delete all group for a specified
*GroupApi* | [**groupGetAll**](doc\/GroupApi.md#groupgetall) | **GET** /api/group/{userId} | Get all groups for the specified user
*GroupApi* | [**groupDeleteAllForHome**](doc\/GroupApi.md#groupdeleteallforhome) | **DELETE** /api/group/home/{homeId} | Delete all group for a specified home
*GroupApi* | [**groupGetAll**](doc\/GroupApi.md#groupgetall) | **GET** /api/group/{homeId} | Get all groups for the specified home
*GroupApi* | [**groupGetDetail**](doc\/GroupApi.md#groupgetdetail) | **GET** /api/group/detail/{groupId} | Get detail info of a specified group
*GroupApi* | [**groupGetGroupsByType**](doc\/GroupApi.md#groupgetgroupsbytype) | **GET** /api/group/{userId}/type/{type} | Get list of group from a type
*GroupApi* | [**groupGetGroupsFromZigbee2Mqtt**](doc\/GroupApi.md#groupgetgroupsfromzigbee2mqtt) | **GET** /api/group/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt groups
*GroupApi* | [**groupGetGroupsByType**](doc\/GroupApi.md#groupgetgroupsbytype) | **GET** /api/group/{homeId}/type/{type} | Get list of group from a type
*GroupApi* | [**groupGetGroupsFromZigbee2Mqtt**](doc\/GroupApi.md#groupgetgroupsfromzigbee2mqtt) | **GET** /api/group/zigbee2Mqtt/{homeId} | Get all zigbee2Mqtt groups
*GroupApi* | [**groupUpdate**](doc\/GroupApi.md#groupupdate) | **PUT** /api/group | Update a group
*HomeApi* | [**homeCreate**](doc\/HomeApi.md#homecreate) | **POST** /api/home | Create a home
*HomeApi* | [**homeDelete**](doc\/HomeApi.md#homedelete) | **DELETE** /api/home/{homeId} | Delete a home
*HomeApi* | [**homeGetAll**](doc\/HomeApi.md#homegetall) | **GET** /api/home/{userId} | Get all home for specified user
*HomeApi* | [**homeGetDetail**](doc\/HomeApi.md#homegetdetail) | **GET** /api/home/detail/{homeId} | Get detail info of a specified home
*HomeApi* | [**homeUpdate**](doc\/HomeApi.md#homeupdate) | **PUT** /api/home | Update a home
*IOTApi* | [**iOTGetSmartPrinterMessages**](doc\/IOTApi.md#iotgetsmartprintermessages) | **GET** /api/iot/smartprinter/{idDevice} | Retrieve all SmartPrinterMessage
*IOTApi* | [**iOTPostToDBPrinter**](doc\/IOTApi.md#iotposttodbprinter) | **POST** /api/iot/smartprinter/{idDevice} | It's the method to post data from mqtt broker to Database (Thanks Rpi!)
*IOTApi* | [**iOTPostToDBSmartGarden**](doc\/IOTApi.md#iotposttodbsmartgarden) | **POST** /api/iot/smartgarden/{idDevice} | It's the method to post data from mqtt broker to Database (Thanks Rpi!)
@ -111,13 +124,13 @@ Class | Method | HTTP request | Description
*OddApi* | [**oddGetForCountry**](doc\/OddApi.md#oddgetforcountry) | **GET** /api/odd/country/{id}/{oddRequest} | Get odds for one country and one odd value maximum
*ProviderApi* | [**providerCreate**](doc\/ProviderApi.md#providercreate) | **POST** /api/provider | Create a provider
*ProviderApi* | [**providerDelete**](doc\/ProviderApi.md#providerdelete) | **DELETE** /api/provider/{providerId} | Delete a provider
*ProviderApi* | [**providerGetAll**](doc\/ProviderApi.md#providergetall) | **GET** /api/provider/{userId} | Get all user providers
*ProviderApi* | [**providerGetAll**](doc\/ProviderApi.md#providergetall) | **GET** /api/provider/{homeId} | Get all home providers
*ProviderApi* | [**providerUpdate**](doc\/ProviderApi.md#providerupdate) | **PUT** /api/provider | Update a provider
*RoomApi* | [**roomCreate**](doc\/RoomApi.md#roomcreate) | **POST** /api/room | Create a room
*RoomApi* | [**roomDelete**](doc\/RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from a room
*RoomApi* | [**roomDelete2**](doc\/RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room
*RoomApi* | [**roomDeleteAllForUser**](doc\/RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified user
*RoomApi* | [**roomGetAll**](doc\/RoomApi.md#roomgetall) | **GET** /api/room/{userId} | Get all rooms for the specified user
*RoomApi* | [**roomDeleteAllForHome**](doc\/RoomApi.md#roomdeleteallforhome) | **DELETE** /api/room/home/{homeId} | Delete all rooms for a specified home
*RoomApi* | [**roomGetAll**](doc\/RoomApi.md#roomgetall) | **GET** /api/room/{homeId} | Get all rooms for the specified home
*RoomApi* | [**roomGetDetail**](doc\/RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room
*RoomApi* | [**roomUpdate**](doc\/RoomApi.md#roomupdate) | **PUT** /api/room | Update a room
*ScreenDeviceApi* | [**screenDeviceCreateDevice**](doc\/ScreenDeviceApi.md#screendevicecreatedevice) | **POST** /api/device/screen | Create screen device
@ -144,33 +157,48 @@ Class | Method | HTTP request | Description
- [Action](doc\/Action.md)
- [ActionType](doc\/ActionType.md)
- [Automation](doc\/Automation.md)
- [AutomationCreateOrUpdateDetailDTO](doc\/AutomationCreateOrUpdateDetailDTO.md)
- [AutomationCreateOrUpdateDetailDTOAllOf](doc\/AutomationCreateOrUpdateDetailDTOAllOf.md)
- [AlarmMode](doc\/AlarmMode.md)
- [AlarmModeCreateOrUpdateDetailDTO](doc\/AlarmModeCreateOrUpdateDetailDTO.md)
- [AlarmModeCreateOrUpdateDetailDTOAllOf](doc\/AlarmModeCreateOrUpdateDetailDTOAllOf.md)
- [AlarmModeDTO](doc\/AlarmModeDTO.md)
- [AlarmModeDetailDTO](doc\/AlarmModeDetailDTO.md)
- [AlarmModeDetailDTOAllOf](doc\/AlarmModeDetailDTOAllOf.md)
- [AlarmTriggered](doc\/AlarmTriggered.md)
- [AlarmType](doc\/AlarmType.md)
- [AutomationDTO](doc\/AutomationDTO.md)
- [AutomationDetailDTO](doc\/AutomationDetailDTO.md)
- [AutomationDetailDTOAllOf](doc\/AutomationDetailDTOAllOf.md)
- [AutomationState](doc\/AutomationState.md)
- [AutomationTriggered](doc\/AutomationTriggered.md)
- [AzureADAuthModel](doc\/AzureADAuthModel.md)
- [Book](doc\/Book.md)
- [Condition](doc\/Condition.md)
- [ConditionType](doc\/ConditionType.md)
- [ConditionValue](doc\/ConditionValue.md)
- [ConnectionStatus](doc\/ConnectionStatus.md)
- [Device](doc\/Device.md)
- [CreateOrUpdateHomeDTO](doc\/CreateOrUpdateHomeDTO.md)
- [CreateOrUpdateHomeDTOAllOf](doc\/CreateOrUpdateHomeDTOAllOf.md)
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
- [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md)
- [DeviceState](doc\/DeviceState.md)
- [DeviceSummaryDTO](doc\/DeviceSummaryDTO.md)
- [DeviceType](doc\/DeviceType.md)
- [ElectricityProduction](doc\/ElectricityProduction.md)
- [EventDTO](doc\/EventDTO.md)
- [EventDetailDTO](doc\/EventDetailDTO.md)
- [EventDetailDTOAllOf](doc\/EventDetailDTOAllOf.md)
- [EventType](doc\/EventType.md)
- [FacebookAuthModel](doc\/FacebookAuthModel.md)
- [GeolocalizedMode](doc\/GeolocalizedMode.md)
- [GoogleAuthModel](doc\/GoogleAuthModel.md)
- [Group](doc\/Group.md)
- [GroupCreateOrUpdateDetailDTO](doc\/GroupCreateOrUpdateDetailDTO.md)
- [GroupCreateOrUpdateDetailDTOAllOf](doc\/GroupCreateOrUpdateDetailDTOAllOf.md)
- [GroupDetailDTO](doc\/GroupDetailDTO.md)
- [GroupDetailDTOAllOf](doc\/GroupDetailDTOAllOf.md)
- [GroupSummaryDTO](doc\/GroupSummaryDTO.md)
- [HomeDTO](doc\/HomeDTO.md)
- [HomeDetailDTO](doc\/HomeDetailDTO.md)
- [HomeDetailDTOAllOf](doc\/HomeDetailDTOAllOf.md)
- [LoginDTO](doc\/LoginDTO.md)
- [MeansOfCommunication](doc\/MeansOfCommunication.md)
- [MqttMessageDTO](doc\/MqttMessageDTO.md)
@ -178,17 +206,16 @@ Class | Method | HTTP request | Description
- [OddObject](doc\/OddObject.md)
- [PanelMenuItem](doc\/PanelMenuItem.md)
- [PanelSection](doc\/PanelSection.md)
- [PlaceDTO](doc\/PlaceDTO.md)
- [Provider](doc\/Provider.md)
- [ProgrammedMode](doc\/ProgrammedMode.md)
- [ProviderDTO](doc\/ProviderDTO.md)
- [ProviderType](doc\/ProviderType.md)
- [RoomCreateOrUpdateDetailDTO](doc\/RoomCreateOrUpdateDetailDTO.md)
- [RoomDetailDTO](doc\/RoomDetailDTO.md)
- [RoomSummaryDTO](doc\/RoomSummaryDTO.md)
- [ScreenConfiguration](doc\/ScreenConfiguration.md)
- [ScreenDevice](doc\/ScreenDevice.md)
- [ScreenWidget](doc\/ScreenWidget.md)
- [SmartGardenMessage](doc\/SmartGardenMessage.md)
- [SmartPrinterMessage](doc\/SmartPrinterMessage.md)
- [TimePeriodAlarm](doc\/TimePeriodAlarm.md)
- [TokenDTO](doc\/TokenDTO.md)
- [Trigger](doc\/Trigger.md)
- [TriggerType](doc\/TriggerType.md)

View File

@ -14,6 +14,7 @@ Name | Type | Description | Notes
**rawRequest** | **String** | | [optional]
**providerId** | **String** | | [optional]
**type** | [**ActionType**](ActionType.md) | | [optional]
**isForce** | **bool** | | [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)

367
mycore_api/doc/AlarmApi.md Normal file
View File

@ -0,0 +1,367 @@
# mycoreapi.api.AlarmApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**alarmActivate**](AlarmApi.md#alarmactivate) | **POST** /api/alarm/activate/{alarmModeId} | Activate current alarm mode
[**alarmCreate**](AlarmApi.md#alarmcreate) | **POST** /api/alarm | Create an alarm mode
[**alarmCreateDefaultAlarms**](AlarmApi.md#alarmcreatedefaultalarms) | **POST** /api/alarm/defaults/{homeId} | Create default alarm modes
[**alarmDelete**](AlarmApi.md#alarmdelete) | **DELETE** /api/alarm/{alarmModeId} | Delete an alarm mode
[**alarmDeleteAllForHome**](AlarmApi.md#alarmdeleteallforhome) | **DELETE** /api/alarm/home/{homeId} | Delete all alarm mode for a specified home
[**alarmGetAll**](AlarmApi.md#alarmgetall) | **GET** /api/alarm/{homeId} | Get all alarm modes for the specified home
[**alarmGetDetail**](AlarmApi.md#alarmgetdetail) | **GET** /api/alarm/detail/{alarmId} | Get detail info of a specified alarm mode
[**alarmUpdate**](AlarmApi.md#alarmupdate) | **PUT** /api/alarm | Update an alarm mode
# **alarmActivate**
> String alarmActivate(alarmModeId)
Activate current alarm mode
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final alarmModeId = alarmModeId_example; // String | Alarm mode to activate
try {
final result = api_instance.alarmActivate(alarmModeId);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmActivate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alarmModeId** | **String**| Alarm mode to activate |
### 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)
# **alarmCreate**
> AlarmModeDetailDTO alarmCreate(alarmModeCreateOrUpdateDetailDTO)
Create an alarm mode
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final alarmModeCreateOrUpdateDetailDTO = AlarmModeCreateOrUpdateDetailDTO(); // AlarmModeCreateOrUpdateDetailDTO | Alarm mode to create
try {
final result = api_instance.alarmCreate(alarmModeCreateOrUpdateDetailDTO);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmCreate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alarmModeCreateOrUpdateDetailDTO** | [**AlarmModeCreateOrUpdateDetailDTO**](AlarmModeCreateOrUpdateDetailDTO.md)| Alarm mode to create |
### Return type
[**AlarmModeDetailDTO**](AlarmModeDetailDTO.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)
# **alarmCreateDefaultAlarms**
> bool alarmCreateDefaultAlarms(homeId)
Create default alarm modes
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.alarmCreateDefaultAlarms(homeId);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmCreateDefaultAlarms: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| Home Id |
### Return type
**bool**
### 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)
# **alarmDelete**
> String alarmDelete(alarmModeId)
Delete an alarm mode
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final alarmModeId = alarmModeId_example; // String | Id of alarm mode to delete
try {
final result = api_instance.alarmDelete(alarmModeId);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmDelete: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alarmModeId** | **String**| Id of alarm mode to delete |
### 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)
# **alarmDeleteAllForHome**
> String alarmDeleteAllForHome(homeId)
Delete all alarm mode for a specified home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.alarmDeleteAllForHome(homeId);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmDeleteAllForHome: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| Home Id |
### 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)
# **alarmGetAll**
> List<AlarmModeDTO> alarmGetAll(homeId)
Get all alarm modes for the specified home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.alarmGetAll(homeId);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmGetAll: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| Home Id |
### Return type
[**List<AlarmModeDTO>**](AlarmModeDTO.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)
# **alarmGetDetail**
> AlarmModeDetailDTO alarmGetDetail(alarmId, alarmModeId)
Get detail info of a specified alarm mode
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final alarmId = alarmId_example; // String |
final alarmModeId = alarmModeId_example; // String | alarm id
try {
final result = api_instance.alarmGetDetail(alarmId, alarmModeId);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmGetDetail: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alarmId** | **String**| |
**alarmModeId** | **String**| alarm id | [optional]
### Return type
[**AlarmModeDetailDTO**](AlarmModeDetailDTO.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)
# **alarmUpdate**
> AlarmModeDetailDTO alarmUpdate(alarmModeCreateOrUpdateDetailDTO)
Update an alarm mode
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AlarmApi();
final alarmModeCreateOrUpdateDetailDTO = AlarmModeCreateOrUpdateDetailDTO(); // AlarmModeCreateOrUpdateDetailDTO | alarm mode to update
try {
final result = api_instance.alarmUpdate(alarmModeCreateOrUpdateDetailDTO);
print(result);
} catch (e) {
print('Exception when calling AlarmApi->alarmUpdate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**alarmModeCreateOrUpdateDetailDTO** | [**AlarmModeCreateOrUpdateDetailDTO**](AlarmModeCreateOrUpdateDetailDTO.md)| alarm mode to update |
### Return type
[**AlarmModeDetailDTO**](AlarmModeDetailDTO.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,28 @@
# mycoreapi.model.AlarmMode
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**activated** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**notification** | **bool** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**type** | [**AlarmType**](AlarmType.md) | | [optional]
**programmedMode** | [**OneOfProgrammedMode**](OneOfProgrammedMode.md) | | [optional]
**geolocalizedMode** | [**OneOfGeolocalizedMode**](OneOfGeolocalizedMode.md) | | [optional]
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
**devicesIds** | **List<String>** | | [optional] [default to const []]
[[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,27 @@
# mycoreapi.model.AlarmModeCreateOrUpdateDetailDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | [**AlarmType**](AlarmType.md) | | [optional]
**activated** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**notification** | **bool** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
**programmedMode** | [**OneOfProgrammedMode**](OneOfProgrammedMode.md) | | [optional]
**geolocalizedMode** | [**OneOfGeolocalizedMode**](OneOfGeolocalizedMode.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,18 @@
# mycoreapi.model.AlarmModeCreateOrUpdateDetailDTOAllOf
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
**actions** | [**List<Action>**](Action.md) | | [optional] [default to const []]
**programmedMode** | [**OneOfProgrammedMode**](OneOfProgrammedMode.md) | | [optional]
**geolocalizedMode** | [**OneOfGeolocalizedMode**](OneOfGeolocalizedMode.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,23 @@
# mycoreapi.model.AlarmModeDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | [**AlarmType**](AlarmType.md) | | [optional]
**activated** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**notification** | **bool** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**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,27 @@
# mycoreapi.model.AlarmModeDetailDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | [**AlarmType**](AlarmType.md) | | [optional]
**activated** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**notification** | **bool** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
**devices** | [**List<DeviceDetailDTO>**](DeviceDetailDTO.md) | | [optional] [default to const []]
**programmedMode** | [**OneOfProgrammedMode**](OneOfProgrammedMode.md) | | [optional]
**geolocalizedMode** | [**OneOfGeolocalizedMode**](OneOfGeolocalizedMode.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,18 @@
# mycoreapi.model.AlarmModeDetailDTOAllOf
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]
**devices** | [**List<DeviceDetailDTO>**](DeviceDetailDTO.md) | | [optional] [default to const []]
**programmedMode** | [**OneOfProgrammedMode**](OneOfProgrammedMode.md) | | [optional]
**geolocalizedMode** | [**OneOfGeolocalizedMode**](OneOfGeolocalizedMode.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,17 @@
# mycoreapi.model.AlarmTriggered
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**alarmModeId** | **String** | | [optional]
**alarmModeName** | **String** | | [optional]
**type** | [**AlarmType**](AlarmType.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,14 @@
# mycoreapi.model.AlarmType
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[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:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,20 +5,20 @@
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**automationCreate**](AutomationApi.md#automationcreate) | **POST** /api/automation | Create an automation
[**automationDelete**](AutomationApi.md#automationdelete) | **DELETE** /api/automation/{automationId} | Delete an automation
[**automationDeleteAllForUser**](AutomationApi.md#automationdeleteallforuser) | **DELETE** /api/automation/user/{userId} | Delete all automation for a specified
[**automationGetAll**](AutomationApi.md#automationgetall) | **GET** /api/automation/{userId} | Get all automations for the specified user
[**automationDeleteAllForHome**](AutomationApi.md#automationdeleteallforhome) | **DELETE** /api/automation/home/{homeId} | Delete all automation for a specified home
[**automationGetAll**](AutomationApi.md#automationgetall) | **GET** /api/automation/{homeId} | Get all automations for the specified home
[**automationGetDetail**](AutomationApi.md#automationgetdetail) | **GET** /api/automation/detail/{automationId} | Get detail info of a specified automation
[**automationUpdate**](AutomationApi.md#automationupdate) | **PUT** /api/automation | Update an automation
# **automationCreate**
> AutomationDTO automationCreate(automationCreateOrUpdateDetailDTO)
> AutomationDTO automationCreate(automationDetailDTO)
Create an automation
@ -29,10 +29,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO | Automation to create
final automationDetailDTO = AutomationDetailDTO(); // AutomationDetailDTO | Automation to create
try {
final result = api_instance.automationCreate(automationCreateOrUpdateDetailDTO);
final result = api_instance.automationCreate(automationDetailDTO);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationCreate: $e\n');
@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**automationCreateOrUpdateDetailDTO** | [**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)| Automation to create |
**automationDetailDTO** | [**AutomationDetailDTO**](AutomationDetailDTO.md)| Automation to create |
### Return type
@ -103,10 +103,10 @@ 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)
# **automationDeleteAllForUser**
> String automationDeleteAllForUser(userId)
# **automationDeleteAllForHome**
> String automationDeleteAllForHome(homeId)
Delete all automation for a specified
Delete all automation for a specified home
### Example
```dart
@ -115,13 +115,13 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.automationDeleteAllForUser(userId);
final result = api_instance.automationDeleteAllForHome(homeId);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationDeleteAllForUser: $e\n');
print('Exception when calling AutomationApi->automationDeleteAllForHome: $e\n');
}
```
@ -129,7 +129,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
@ -147,9 +147,9 @@ 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)
# **automationGetAll**
> List<RoomSummaryDTO> automationGetAll(userId)
> List<AutomationDTO> automationGetAll(homeId)
Get all automations for the specified user
Get all automations for the specified home
### Example
```dart
@ -158,10 +158,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.automationGetAll(userId);
final result = api_instance.automationGetAll(homeId);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationGetAll: $e\n');
@ -172,11 +172,11 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
[**List<RoomSummaryDTO>**](RoomSummaryDTO.md)
[**List<AutomationDTO>**](AutomationDTO.md)
### Authorization
@ -233,7 +233,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)
# **automationUpdate**
> AutomationCreateOrUpdateDetailDTO automationUpdate(automationCreateOrUpdateDetailDTO)
> AutomationDetailDTO automationUpdate(automationDetailDTO)
Update an automation
@ -244,10 +244,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = AutomationApi();
final automationCreateOrUpdateDetailDTO = AutomationCreateOrUpdateDetailDTO(); // AutomationCreateOrUpdateDetailDTO | automation to update
final automationDetailDTO = AutomationDetailDTO(); // AutomationDetailDTO | automation to update
try {
final result = api_instance.automationUpdate(automationCreateOrUpdateDetailDTO);
final result = api_instance.automationUpdate(automationDetailDTO);
print(result);
} catch (e) {
print('Exception when calling AutomationApi->automationUpdate: $e\n');
@ -258,11 +258,11 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**automationCreateOrUpdateDetailDTO** | [**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)| automation to update |
**automationDetailDTO** | [**AutomationDetailDTO**](AutomationDetailDTO.md)| automation to update |
### Return type
[**AutomationCreateOrUpdateDetailDTO**](AutomationCreateOrUpdateDetailDTO.md)
[**AutomationDetailDTO**](AutomationDetailDTO.md)
### Authorization

View File

@ -11,7 +11,7 @@ Name | Type | Description | Notes
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**active** | **bool** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]

View File

@ -11,7 +11,7 @@ Name | Type | Description | Notes
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**active** | **bool** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**triggers** | [**List<Trigger>**](Trigger.md) | | [optional] [default to const []]

View File

@ -0,0 +1,16 @@
# mycoreapi.model.AutomationTriggered
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**automationId** | **String** | | [optional]
**automationName** | **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)

View File

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

View File

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

View File

@ -0,0 +1,22 @@
# mycoreapi.model.CreateOrUpdateHomeDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**isAlarm** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**currentAlarmMode** | [**OneOfAlarmModeDTO**](OneOfAlarmModeDTO.md) | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**usersIds** | **List<String>** | | [optional] [default to const []]
[[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,15 @@
# mycoreapi.model.CreateOrUpdateHomeDTOAllOf
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**usersIds** | **List<String>** | | [optional] [default to const []]
[[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,20 +5,20 @@
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deviceCreate**](DeviceApi.md#devicecreate) | **POST** /api/device | Create a device
[**deviceCreateDevicesFromProvider**](DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{userId}/fromProvider/{providerId} | Create devices from provider
[**deviceCreateDevicesFromProvider**](DeviceApi.md#devicecreatedevicesfromprovider) | **POST** /api/device/{homeId}/fromProvider/{providerId} | Create devices from provider
[**deviceDelete**](DeviceApi.md#devicedelete) | **DELETE** /api/device/{deviceId} | Delete a device
[**deviceDeleteAllForUser**](DeviceApi.md#devicedeleteallforuser) | **DELETE** /api/device/user/{userId} | Delete all device for a specified user
[**deviceDeleteDevicesFromProvider**](DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{userId}/fromProvider/{providerId} | Delete devices from provider
[**deviceGetAll**](DeviceApi.md#devicegetall) | **GET** /api/device/{userId} | Get all devices summary
[**deviceDeleteAllForHome**](DeviceApi.md#devicedeleteallforhome) | **DELETE** /api/device/home/{homeId} | Delete all device for a specified home
[**deviceDeleteDevicesFromProvider**](DeviceApi.md#devicedeletedevicesfromprovider) | **DELETE** /api/device/{homeId}/fromProvider/{providerId} | Delete devices from provider
[**deviceGetAll**](DeviceApi.md#devicegetall) | **GET** /api/device/{homeId} | Get all devices summary
[**deviceGetDetail**](DeviceApi.md#devicegetdetail) | **GET** /api/device/detail/{deviceId} | Get a specific device info
[**deviceGetDevicesByType**](DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{userId}/type/{type} | Get list of devices from a type
[**deviceGetDevicesFromProvider**](DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{userId}/fromProvider/{providerId} | Get devices from provider
[**deviceGetDevicesFromZigbee2Mqtt**](DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt devices
[**deviceGetDevicesByType**](DeviceApi.md#devicegetdevicesbytype) | **GET** /api/device/{homeId}/type/{type} | Get list of devices from a type
[**deviceGetDevicesFromProvider**](DeviceApi.md#devicegetdevicesfromprovider) | **GET** /api/device/{homeId}/fromProvider/{providerId} | Get devices from provider
[**deviceGetDevicesFromZigbee2Mqtt**](DeviceApi.md#devicegetdevicesfromzigbee2mqtt) | **GET** /api/device/zigbee2Mqtt/{homeId} | Get all zigbee2Mqtt devices
[**deviceUpdate**](DeviceApi.md#deviceupdate) | **PUT** /api/device/{deviceId} | Update a device
@ -66,7 +66,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)
# **deviceCreateDevicesFromProvider**
> List<DeviceDetailDTO> deviceCreateDevicesFromProvider(userId, providerId)
> List<DeviceDetailDTO> deviceCreateDevicesFromProvider(homeId, providerId)
Create devices from provider
@ -77,11 +77,11 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | User Id
final homeId = homeId_example; // String | Home Id
final providerId = providerId_example; // String | Id of Provider
try {
final result = api_instance.deviceCreateDevicesFromProvider(userId, providerId);
final result = api_instance.deviceCreateDevicesFromProvider(homeId, providerId);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceCreateDevicesFromProvider: $e\n');
@ -92,7 +92,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
**homeId** | **String**| Home Id |
**providerId** | **String**| Id of Provider |
### Return type
@ -153,10 +153,10 @@ 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)
# **deviceDeleteAllForUser**
> String deviceDeleteAllForUser(userId)
# **deviceDeleteAllForHome**
> String deviceDeleteAllForHome(homeId)
Delete all device for a specified user
Delete all device for a specified home
### Example
```dart
@ -165,13 +165,13 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Id of home
try {
final result = api_instance.deviceDeleteAllForUser(userId);
final result = api_instance.deviceDeleteAllForHome(homeId);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceDeleteAllForUser: $e\n');
print('Exception when calling DeviceApi->deviceDeleteAllForHome: $e\n');
}
```
@ -179,7 +179,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Id of home |
### Return type
@ -197,7 +197,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)
# **deviceDeleteDevicesFromProvider**
> String deviceDeleteDevicesFromProvider(userId, providerId)
> String deviceDeleteDevicesFromProvider(homeId, providerId)
Delete devices from provider
@ -208,11 +208,11 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | User Id
final homeId = homeId_example; // String | Home Id
final providerId = providerId_example; // String | Id of Provider
try {
final result = api_instance.deviceDeleteDevicesFromProvider(userId, providerId);
final result = api_instance.deviceDeleteDevicesFromProvider(homeId, providerId);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceDeleteDevicesFromProvider: $e\n');
@ -223,7 +223,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
**homeId** | **String**| Home Id |
**providerId** | **String**| Id of Provider |
### Return type
@ -242,7 +242,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)
# **deviceGetAll**
> List<DeviceSummaryDTO> deviceGetAll(userId)
> List<DeviceSummaryDTO> deviceGetAll(homeId)
Get all devices summary
@ -253,10 +253,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.deviceGetAll(userId);
final result = api_instance.deviceGetAll(homeId);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceGetAll: $e\n');
@ -267,7 +267,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
@ -328,7 +328,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)
# **deviceGetDevicesByType**
> List<DeviceDetailDTO> deviceGetDevicesByType(userId, type)
> List<DeviceDetailDTO> deviceGetDevicesByType(homeId, type)
Get list of devices from a type
@ -339,11 +339,11 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | user Id
final homeId = homeId_example; // String | Home Id
final type = ; // DeviceType | device type
try {
final result = api_instance.deviceGetDevicesByType(userId, type);
final result = api_instance.deviceGetDevicesByType(homeId, type);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceGetDevicesByType: $e\n');
@ -354,7 +354,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| user Id |
**homeId** | **String**| Home Id |
**type** | [**DeviceType**](.md)| device type |
### Return type
@ -373,7 +373,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)
# **deviceGetDevicesFromProvider**
> List<DeviceDetailDTO> deviceGetDevicesFromProvider(userId, providerId)
> List<DeviceDetailDTO> deviceGetDevicesFromProvider(homeId, providerId)
Get devices from provider
@ -384,11 +384,11 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | User Id
final homeId = homeId_example; // String | Home Id
final providerId = providerId_example; // String | Id of Provider
try {
final result = api_instance.deviceGetDevicesFromProvider(userId, providerId);
final result = api_instance.deviceGetDevicesFromProvider(homeId, providerId);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceGetDevicesFromProvider: $e\n');
@ -399,7 +399,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
**homeId** | **String**| Home Id |
**providerId** | **String**| Id of Provider |
### Return type
@ -418,7 +418,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)
# **deviceGetDevicesFromZigbee2Mqtt**
> List<DeviceDetailDTO> deviceGetDevicesFromZigbee2Mqtt(userId)
> List<DeviceDetailDTO> deviceGetDevicesFromZigbee2Mqtt(homeId)
Get all zigbee2Mqtt devices
@ -429,10 +429,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = DeviceApi();
final userId = userId_example; // String | User Id
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.deviceGetDevicesFromZigbee2Mqtt(userId);
final result = api_instance.deviceGetDevicesFromZigbee2Mqtt(homeId);
print(result);
} catch (e) {
print('Exception when calling DeviceApi->deviceGetDevicesFromZigbee2Mqtt: $e\n');
@ -443,7 +443,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
**homeId** | **String**| Home Id |
### Return type

View File

@ -9,17 +9,16 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**description** | **String** | | [optional]
**name** | **String** | | [optional]
**model** | **String** | | [optional]
**type** | [**DeviceType**](DeviceType.md) | | [optional]
**status** | **bool** | | [optional]
**connectionStatus** | [**ConnectionStatus**](ConnectionStatus.md) | | [optional]
**locationId** | **String** | | [optional]
**roomId** | **String** | | [optional]
**providerId** | **String** | | [optional]
**providerName** | **String** | | [optional]
**location** | [**OneOfPlaceDTO**](OneOfPlaceDTO.md) | | [optional]
**lastStateDate** | [**DateTime**](DateTime.md) | | [optional]
**battery** | **bool** | | [optional]
**batteryStatus** | **int** | | [optional]

View File

@ -0,0 +1,18 @@
# mycoreapi.model.DeviceState
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**deviceId** | **String** | | [optional]
**deviceName** | **String** | | [optional]
**message** | **String** | | [optional]
**deviceType** | [**DeviceType**](DeviceType.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

@ -9,17 +9,16 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**description** | **String** | | [optional]
**name** | **String** | | [optional]
**model** | **String** | | [optional]
**type** | [**DeviceType**](DeviceType.md) | | [optional]
**status** | **bool** | | [optional]
**connectionStatus** | [**ConnectionStatus**](ConnectionStatus.md) | | [optional]
**locationId** | **String** | | [optional]
**roomId** | **String** | | [optional]
**providerId** | **String** | | [optional]
**providerName** | **String** | | [optional]
**location** | [**OneOfPlaceDTO**](OneOfPlaceDTO.md) | | [optional]
**lastStateDate** | [**DateTime**](DateTime.md) | | [optional]
**battery** | **bool** | | [optional]
**batteryStatus** | **int** | | [optional]

View File

@ -10,7 +10,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**deviceId** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**watt** | **double** | | [optional]
**ampere** | **double** | | [optional]
**timestamp** | [**DateTime**](DateTime.md) | | [optional]

View File

@ -5,7 +5,7 @@
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
@ -13,7 +13,7 @@ Method | HTTP request | Description
# **energyGetElectricityProduction**
> List<ElectricityProduction> energyGetElectricityProduction(userId, viewBy)
> List<ElectricityProduction> energyGetElectricityProduction(homeId, viewBy)
Get summary production of Kwh/Year
@ -24,11 +24,11 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = EnergyApi();
final userId = userId_example; // String |
final homeId = homeId_example; // String |
final viewBy = ; // ViewBy |
try {
final result = api_instance.energyGetElectricityProduction(userId, viewBy);
final result = api_instance.energyGetElectricityProduction(homeId, viewBy);
print(result);
} catch (e) {
print('Exception when calling EnergyApi->energyGetElectricityProduction: $e\n');
@ -39,7 +39,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| | [optional]
**homeId** | **String**| | [optional]
**viewBy** | [**ViewBy**](.md)| | [optional]
### Return type

205
mycore_api/doc/EventApi.md Normal file
View File

@ -0,0 +1,205 @@
# mycoreapi.api.EventApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**eventDelete**](EventApi.md#eventdelete) | **DELETE** /api/event/{eventId} | Delete an event
[**eventDeleteAllForHome**](EventApi.md#eventdeleteallforhome) | **DELETE** /api/event/home/{homeId} | Delete all events for a specified home
[**eventGet**](EventApi.md#eventget) | **GET** /api/event/{homeId} | Get events for the specified home
[**eventGetDetail**](EventApi.md#eventgetdetail) | **GET** /api/event/detail/{eventId} | Get detail info of a specified event
# **eventDelete**
> String eventDelete(eventId)
Delete an event
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = EventApi();
final eventId = eventId_example; // String | Id of event to delete
try {
final result = api_instance.eventDelete(eventId);
print(result);
} catch (e) {
print('Exception when calling EventApi->eventDelete: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**eventId** | **String**| Id of event to delete |
### 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)
# **eventDeleteAllForHome**
> String eventDeleteAllForHome(homeId)
Delete all events for a specified home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = EventApi();
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.eventDeleteAllForHome(homeId);
print(result);
} catch (e) {
print('Exception when calling EventApi->eventDeleteAllForHome: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| Home Id |
### 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)
# **eventGet**
> List<EventDetailDTO> eventGet(homeId, deviceId, roomId, startIndex, count, dateStart, dateEnd, eventType, deviceType)
Get events for the specified home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = EventApi();
final homeId = homeId_example; // String | Home Id
final deviceId = deviceId_example; // String |
final roomId = roomId_example; // String |
final startIndex = 56; // int |
final count = 56; // int |
final dateStart = 2013-10-20T19:20:30+01:00; // DateTime |
final dateEnd = 2013-10-20T19:20:30+01:00; // DateTime |
final eventType = ; // OneOfEventType |
final deviceType = ; // OneOfDeviceType |
try {
final result = api_instance.eventGet(homeId, deviceId, roomId, startIndex, count, dateStart, dateEnd, eventType, deviceType);
print(result);
} catch (e) {
print('Exception when calling EventApi->eventGet: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| Home Id |
**deviceId** | **String**| | [optional]
**roomId** | **String**| | [optional]
**startIndex** | **int**| | [optional]
**count** | **int**| | [optional]
**dateStart** | **DateTime**| | [optional]
**dateEnd** | **DateTime**| | [optional]
**eventType** | [**OneOfEventType**](.md)| | [optional]
**deviceType** | [**OneOfDeviceType**](.md)| | [optional]
### Return type
[**List<EventDetailDTO>**](EventDetailDTO.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)
# **eventGetDetail**
> EventDetailDTO eventGetDetail(eventId)
Get detail info of a specified event
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = EventApi();
final eventId = eventId_example; // String | event id
try {
final result = api_instance.eventGetDetail(eventId);
print(result);
} catch (e) {
print('Exception when calling EventApi->eventGetDetail: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**eventId** | **String**| event id |
### Return type
[**EventDetailDTO**](EventDetailDTO.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)

View File

@ -0,0 +1,19 @@
# mycoreapi.model.EventDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**homeId** | **String** | | [optional]
**date** | [**DateTime**](DateTime.md) | | [optional]
**type** | [**EventType**](EventType.md) | | [optional]
**roomId** | **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)

View File

@ -0,0 +1,22 @@
# mycoreapi.model.EventDetailDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**homeId** | **String** | | [optional]
**date** | [**DateTime**](DateTime.md) | | [optional]
**type** | [**EventType**](EventType.md) | | [optional]
**roomId** | **String** | | [optional]
**deviceState** | [**OneOfDeviceState**](OneOfDeviceState.md) | | [optional]
**automationTriggered** | [**OneOfAutomationTriggered**](OneOfAutomationTriggered.md) | | [optional]
**alarmTriggered** | [**OneOfAlarmTriggered**](OneOfAlarmTriggered.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,17 @@
# mycoreapi.model.EventDetailDTOAllOf
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**deviceState** | [**OneOfDeviceState**](OneOfDeviceState.md) | | [optional]
**automationTriggered** | [**OneOfAutomationTriggered**](OneOfAutomationTriggered.md) | | [optional]
**alarmTriggered** | [**OneOfAlarmTriggered**](OneOfAlarmTriggered.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,14 @@
# mycoreapi.model.EventType
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[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:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -0,0 +1,18 @@
# mycoreapi.model.GeolocalizedMode
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**latitude** | **String** | | [optional]
**longitude** | **String** | | [optional]
**homeMode** | [**OneOfAlarmMode**](OneOfAlarmMode.md) | | [optional]
**absentMode** | [**OneOfAlarmMode**](OneOfAlarmMode.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:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -5,19 +5,19 @@
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**groupCreate**](GroupApi.md#groupcreate) | **POST** /api/group | Create a group
[**groupCreateDevicesFromZigbee2Mqtt**](GroupApi.md#groupcreatedevicesfromzigbee2mqtt) | **POST** /api/group/{userId}/fromZigbee | Create groups from provider
[**groupCreateDevicesFromZigbee2Mqtt**](GroupApi.md#groupcreatedevicesfromzigbee2mqtt) | **POST** /api/group/{homeId}/fromZigbee | Create groups from provider
[**groupDelete**](GroupApi.md#groupdelete) | **DELETE** /api/group/{groupId}/device/{deviceId} | Delete device from a group
[**groupDelete2**](GroupApi.md#groupdelete2) | **DELETE** /api/group/{groupId} | Delete a group
[**groupDeleteAllForUser**](GroupApi.md#groupdeleteallforuser) | **DELETE** /api/group/user/{userId} | Delete all group for a specified
[**groupGetAll**](GroupApi.md#groupgetall) | **GET** /api/group/{userId} | Get all groups for the specified user
[**groupDeleteAllForHome**](GroupApi.md#groupdeleteallforhome) | **DELETE** /api/group/home/{homeId} | Delete all group for a specified home
[**groupGetAll**](GroupApi.md#groupgetall) | **GET** /api/group/{homeId} | Get all groups for the specified home
[**groupGetDetail**](GroupApi.md#groupgetdetail) | **GET** /api/group/detail/{groupId} | Get detail info of a specified group
[**groupGetGroupsByType**](GroupApi.md#groupgetgroupsbytype) | **GET** /api/group/{userId}/type/{type} | Get list of group from a type
[**groupGetGroupsFromZigbee2Mqtt**](GroupApi.md#groupgetgroupsfromzigbee2mqtt) | **GET** /api/group/zigbee2Mqtt/{userId} | Get all zigbee2Mqtt groups
[**groupGetGroupsByType**](GroupApi.md#groupgetgroupsbytype) | **GET** /api/group/{homeId}/type/{type} | Get list of group from a type
[**groupGetGroupsFromZigbee2Mqtt**](GroupApi.md#groupgetgroupsfromzigbee2mqtt) | **GET** /api/group/zigbee2Mqtt/{homeId} | Get all zigbee2Mqtt groups
[**groupUpdate**](GroupApi.md#groupupdate) | **PUT** /api/group | Update a group
@ -65,7 +65,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)
# **groupCreateDevicesFromZigbee2Mqtt**
> List<GroupDetailDTO> groupCreateDevicesFromZigbee2Mqtt(userId)
> List<GroupDetailDTO> groupCreateDevicesFromZigbee2Mqtt(homeId)
Create groups from provider
@ -76,10 +76,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = GroupApi();
final userId = userId_example; // String | User Id
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.groupCreateDevicesFromZigbee2Mqtt(userId);
final result = api_instance.groupCreateDevicesFromZigbee2Mqtt(homeId);
print(result);
} catch (e) {
print('Exception when calling GroupApi->groupCreateDevicesFromZigbee2Mqtt: $e\n');
@ -90,7 +90,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
**homeId** | **String**| Home Id |
### Return type
@ -195,10 +195,10 @@ 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)
# **groupDeleteAllForUser**
> String groupDeleteAllForUser(userId)
# **groupDeleteAllForHome**
> String groupDeleteAllForHome(homeId)
Delete all group for a specified
Delete all group for a specified home
### Example
```dart
@ -207,13 +207,13 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = GroupApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.groupDeleteAllForUser(userId);
final result = api_instance.groupDeleteAllForHome(homeId);
print(result);
} catch (e) {
print('Exception when calling GroupApi->groupDeleteAllForUser: $e\n');
print('Exception when calling GroupApi->groupDeleteAllForHome: $e\n');
}
```
@ -221,7 +221,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
@ -239,9 +239,9 @@ 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)
# **groupGetAll**
> List<GroupSummaryDTO> groupGetAll(userId)
> List<GroupSummaryDTO> groupGetAll(homeId)
Get all groups for the specified user
Get all groups for the specified home
### Example
```dart
@ -250,10 +250,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = GroupApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.groupGetAll(userId);
final result = api_instance.groupGetAll(homeId);
print(result);
} catch (e) {
print('Exception when calling GroupApi->groupGetAll: $e\n');
@ -264,7 +264,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
@ -325,7 +325,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)
# **groupGetGroupsByType**
> List<GroupSummaryDTO> groupGetGroupsByType(userId, type)
> List<GroupSummaryDTO> groupGetGroupsByType(homeId, type)
Get list of group from a type
@ -336,11 +336,11 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = GroupApi();
final userId = userId_example; // String | user Id
final homeId = homeId_example; // String | home Id
final type = type_example; // String | group type
try {
final result = api_instance.groupGetGroupsByType(userId, type);
final result = api_instance.groupGetGroupsByType(homeId, type);
print(result);
} catch (e) {
print('Exception when calling GroupApi->groupGetGroupsByType: $e\n');
@ -351,7 +351,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| user Id |
**homeId** | **String**| home Id |
**type** | **String**| group type |
### Return type
@ -370,7 +370,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)
# **groupGetGroupsFromZigbee2Mqtt**
> List<GroupDetailDTO> groupGetGroupsFromZigbee2Mqtt(userId)
> List<GroupDetailDTO> groupGetGroupsFromZigbee2Mqtt(homeId)
Get all zigbee2Mqtt groups
@ -381,10 +381,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = GroupApi();
final userId = userId_example; // String | User Id
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.groupGetGroupsFromZigbee2Mqtt(userId);
final result = api_instance.groupGetGroupsFromZigbee2Mqtt(homeId);
print(result);
} catch (e) {
print('Exception when calling GroupApi->groupGetGroupsFromZigbee2Mqtt: $e\n');
@ -395,7 +395,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
**homeId** | **String**| Home Id |
### Return type

View File

@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | **String** | | [optional]
**isAlarm** | **bool** | | [optional]

View File

@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | **String** | | [optional]
**isAlarm** | **bool** | | [optional]

View File

@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | **String** | | [optional]
**isAlarm** | **bool** | | [optional]

233
mycore_api/doc/HomeApi.md Normal file
View File

@ -0,0 +1,233 @@
# mycoreapi.api.HomeApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**homeCreate**](HomeApi.md#homecreate) | **POST** /api/home | Create a home
[**homeDelete**](HomeApi.md#homedelete) | **DELETE** /api/home/{homeId} | Delete a home
[**homeGetAll**](HomeApi.md#homegetall) | **GET** /api/home/{userId} | Get all home for specified user
[**homeGetDetail**](HomeApi.md#homegetdetail) | **GET** /api/home/detail/{homeId} | Get detail info of a specified home
[**homeUpdate**](HomeApi.md#homeupdate) | **PUT** /api/home | Update a home
# **homeCreate**
> HomeDTO homeCreate(createOrUpdateHomeDTO)
Create a home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = HomeApi();
final createOrUpdateHomeDTO = CreateOrUpdateHomeDTO(); // CreateOrUpdateHomeDTO | Home to create
try {
final result = api_instance.homeCreate(createOrUpdateHomeDTO);
print(result);
} catch (e) {
print('Exception when calling HomeApi->homeCreate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createOrUpdateHomeDTO** | [**CreateOrUpdateHomeDTO**](CreateOrUpdateHomeDTO.md)| Home to create |
### Return type
[**HomeDTO**](HomeDTO.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)
# **homeDelete**
> String homeDelete(homeId)
Delete a home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = HomeApi();
final homeId = homeId_example; // String | Id of home to delete
try {
final result = api_instance.homeDelete(homeId);
print(result);
} catch (e) {
print('Exception when calling HomeApi->homeDelete: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| Id of home to delete |
### 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)
# **homeGetAll**
> List<HomeDTO> homeGetAll(userId)
Get all home for specified user
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = HomeApi();
final userId = userId_example; // String | User Id
try {
final result = api_instance.homeGetAll(userId);
print(result);
} catch (e) {
print('Exception when calling HomeApi->homeGetAll: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| User Id |
### Return type
[**List<HomeDTO>**](HomeDTO.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)
# **homeGetDetail**
> HomeDetailDTO homeGetDetail(homeId)
Get detail info of a specified home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = HomeApi();
final homeId = homeId_example; // String | home id
try {
final result = api_instance.homeGetDetail(homeId);
print(result);
} catch (e) {
print('Exception when calling HomeApi->homeGetDetail: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**homeId** | **String**| home id |
### Return type
[**HomeDetailDTO**](HomeDetailDTO.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)
# **homeUpdate**
> HomeDTO homeUpdate(createOrUpdateHomeDTO)
Update a home
### Example
```dart
import 'package:mycoreapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = HomeApi();
final createOrUpdateHomeDTO = CreateOrUpdateHomeDTO(); // CreateOrUpdateHomeDTO | Home to update
try {
final result = api_instance.homeUpdate(createOrUpdateHomeDTO);
print(result);
} catch (e) {
print('Exception when calling HomeApi->homeUpdate: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createOrUpdateHomeDTO** | [**CreateOrUpdateHomeDTO**](CreateOrUpdateHomeDTO.md)| Home to update |
### Return type
[**HomeDTO**](HomeDTO.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)

22
mycore_api/doc/HomeDTO.md Normal file
View File

@ -0,0 +1,22 @@
# mycoreapi.model.HomeDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**isAlarm** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**currentAlarmMode** | [**OneOfAlarmModeDTO**](OneOfAlarmModeDTO.md) | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**usersIds** | **List<String>** | | [optional] [default to const []]
[[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,27 @@
# mycoreapi.model.HomeDetailDTO
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**isAlarm** | **bool** | | [optional]
**isDefault** | **bool** | | [optional]
**currentAlarmMode** | [**OneOfAlarmModeDTO**](OneOfAlarmModeDTO.md) | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]
**usersIds** | **List<String>** | | [optional] [default to const []]
**users** | [**List<UserInfoDetailDTO>**](UserInfoDetailDTO.md) | | [optional] [default to const []]
**devices** | [**List<DeviceSummaryDTO>**](DeviceSummaryDTO.md) | | [optional] [default to const []]
**automations** | [**List<AutomationDTO>**](AutomationDTO.md) | | [optional] [default to const []]
**providers** | [**List<ProviderDTO>**](ProviderDTO.md) | | [optional] [default to const []]
**groups** | [**List<GroupSummaryDTO>**](GroupSummaryDTO.md) | | [optional] [default to const []]
[[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,19 @@
# mycoreapi.model.HomeDetailDTOAllOf
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**users** | [**List<UserInfoDetailDTO>**](UserInfoDetailDTO.md) | | [optional] [default to const []]
**devices** | [**List<DeviceSummaryDTO>**](DeviceSummaryDTO.md) | | [optional] [default to const []]
**automations** | [**List<AutomationDTO>**](AutomationDTO.md) | | [optional] [default to const []]
**providers** | [**List<ProviderDTO>**](ProviderDTO.md) | | [optional] [default to const []]
**groups** | [**List<GroupSummaryDTO>**](GroupSummaryDTO.md) | | [optional] [default to const []]
[[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:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

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

View File

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

View File

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

View File

@ -0,0 +1,21 @@
# mycoreapi.model.ProgrammedMode
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**monday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
**tuesday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
**wednesday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
**thursday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
**friday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
**saturday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
**sunday** | [**List<TimePeriodAlarm>**](TimePeriodAlarm.md) | | [optional] [default to const []]
[[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,13 +5,13 @@
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**providerCreate**](ProviderApi.md#providercreate) | **POST** /api/provider | Create a provider
[**providerDelete**](ProviderApi.md#providerdelete) | **DELETE** /api/provider/{providerId} | Delete a provider
[**providerGetAll**](ProviderApi.md#providergetall) | **GET** /api/provider/{userId} | Get all user providers
[**providerGetAll**](ProviderApi.md#providergetall) | **GET** /api/provider/{homeId} | Get all home providers
[**providerUpdate**](ProviderApi.md#providerupdate) | **PUT** /api/provider | Update a provider
@ -102,9 +102,9 @@ 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)
# **providerGetAll**
> List<ProviderDTO> providerGetAll(userId)
> List<ProviderDTO> providerGetAll(homeId)
Get all user providers
Get all home providers
### Example
```dart
@ -113,10 +113,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = ProviderApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.providerGetAll(userId);
final result = api_instance.providerGetAll(homeId);
print(result);
} catch (e) {
print('Exception when calling ProviderApi->providerGetAll: $e\n');
@ -127,7 +127,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type

View File

@ -10,8 +10,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**name** | **String** | | [optional]
**type** | **String** | | [optional]
**userId** | **String** | | [optional]
**type** | [**ProviderType**](ProviderType.md) | | [optional]
**homeId** | **String** | | [optional]
**endpoint** | **String** | | [optional]
**username** | **String** | | [optional]
**password** | **String** | | [optional]

View File

@ -0,0 +1,14 @@
# mycoreapi.model.ProviderType
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[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,15 +5,15 @@
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------
[**roomCreate**](RoomApi.md#roomcreate) | **POST** /api/room | Create a room
[**roomDelete**](RoomApi.md#roomdelete) | **DELETE** /api/room/{roomId}/device/{deviceId} | Delete device from a room
[**roomDelete2**](RoomApi.md#roomdelete2) | **DELETE** /api/room/{roomId} | Delete a room
[**roomDeleteAllForUser**](RoomApi.md#roomdeleteallforuser) | **DELETE** /api/room/user/{userId} | Delete all room for a specified user
[**roomGetAll**](RoomApi.md#roomgetall) | **GET** /api/room/{userId} | Get all rooms for the specified user
[**roomDeleteAllForHome**](RoomApi.md#roomdeleteallforhome) | **DELETE** /api/room/home/{homeId} | Delete all rooms for a specified home
[**roomGetAll**](RoomApi.md#roomgetall) | **GET** /api/room/{homeId} | Get all rooms for the specified home
[**roomGetDetail**](RoomApi.md#roomgetdetail) | **GET** /api/room/detail/{roomId} | Get detail info of a specified room
[**roomUpdate**](RoomApi.md#roomupdate) | **PUT** /api/room | Update a room
@ -149,10 +149,10 @@ 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)
# **roomDeleteAllForUser**
> String roomDeleteAllForUser(userId)
# **roomDeleteAllForHome**
> String roomDeleteAllForHome(homeId)
Delete all room for a specified user
Delete all rooms for a specified home
### Example
```dart
@ -161,13 +161,13 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = RoomApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.roomDeleteAllForUser(userId);
final result = api_instance.roomDeleteAllForHome(homeId);
print(result);
} catch (e) {
print('Exception when calling RoomApi->roomDeleteAllForUser: $e\n');
print('Exception when calling RoomApi->roomDeleteAllForHome: $e\n');
}
```
@ -175,7 +175,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
@ -193,9 +193,9 @@ 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)
# **roomGetAll**
> List<RoomSummaryDTO> roomGetAll(userId)
> List<RoomSummaryDTO> roomGetAll(homeId)
Get all rooms for the specified user
Get all rooms for the specified home
### Example
```dart
@ -204,10 +204,10 @@ import 'package:mycoreapi/api.dart';
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = RoomApi();
final userId = userId_example; // String | Id of user
final homeId = homeId_example; // String | Home Id
try {
final result = api_instance.roomGetAll(userId);
final result = api_instance.roomGetAll(homeId);
print(result);
} catch (e) {
print('Exception when calling RoomApi->roomGetAll: $e\n');
@ -218,7 +218,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| Id of user |
**homeId** | **String**| Home Id |
### Return type
@ -236,7 +236,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)
# **roomGetDetail**
> RoomDetailDTO roomGetDetail(roomId, userId)
> RoomDetailDTO roomGetDetail(roomId)
Get detail info of a specified room
@ -248,10 +248,9 @@ import 'package:mycoreapi/api.dart';
final api_instance = RoomApi();
final roomId = roomId_example; // String | room id
final userId = userId_example; // String | user id
try {
final result = api_instance.roomGetDetail(roomId, userId);
final result = api_instance.roomGetDetail(roomId);
print(result);
} catch (e) {
print('Exception when calling RoomApi->roomGetDetail: $e\n');
@ -263,7 +262,6 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**roomId** | **String**| room id |
**userId** | **String**| user id | [optional]
### Return type

View File

@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**deviceIds** | **List<String>** | | [optional] [default to const []]

View File

@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **String** | | [optional]
**createdDate** | [**DateTime**](DateTime.md) | | [optional]
**updatedDate** | [**DateTime**](DateTime.md) | | [optional]

View File

@ -9,7 +9,7 @@ import 'package:mycoreapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**userId** | **String** | | [optional]
**homeId** | **String** | | [optional]
**name** | **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)

View File

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

View File

@ -0,0 +1,17 @@
# mycoreapi.model.TimePeriodAlarm
## Load the model package
```dart
import 'package:mycoreapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**start** | **String** | | [optional]
**end** | **String** | | [optional]
**alarmMode** | [**OneOfAlarmMode**](OneOfAlarmMode.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:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

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

View File

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

View File

@ -16,6 +16,7 @@ Name | Type | Description | Notes
**lastName** | **String** | | [optional]
**token** | **String** | | [optional]
**birthday** | [**DateTime**](DateTime.md) | | [optional]
**homeIds** | **List<String>** | | [optional] [default to const []]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**address** | **String** | | [optional]
**city** | **String** | | [optional]
@ -24,12 +25,6 @@ Name | Type | Description | Notes
**language** | **String** | | [optional]
**timeZone** | **String** | | [optional]
**postalCode** | **int** | | [optional]
**automations** | [**List<Automation>**](Automation.md) | | [optional] [default to const []]
**devices** | [**List<Device>**](Device.md) | | [optional] [default to const []]
**providers** | [**List<Provider>**](Provider.md) | | [optional] [default to const []]
**groups** | [**List<Group>**](Group.md) | | [optional] [default to const []]
**screenConfigurationIds** | [**List<ScreenConfiguration>**](ScreenConfiguration.md) | | [optional] [default to const []]
**deviceIds** | [**List<ScreenDevice>**](ScreenDevice.md) | | [optional] [default to const []]
[[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:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
All URIs are relative to *http://192.168.31.140*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@ -27,15 +27,18 @@ part 'auth/oauth.dart';
part 'auth/http_basic_auth.dart';
part 'auth/http_bearer_auth.dart';
part 'api/alarm_api.dart';
part 'api/authentication_api.dart';
part 'api/automation_api.dart';
part 'api/azure_api.dart';
part 'api/books_api.dart';
part 'api/device_api.dart';
part 'api/energy_api.dart';
part 'api/event_api.dart';
part 'api/facebook_api.dart';
part 'api/google_api.dart';
part 'api/group_api.dart';
part 'api/home_api.dart';
part 'api/iot_api.dart';
part 'api/layout_api.dart';
part 'api/mqtt_api.dart';
@ -50,33 +53,48 @@ part 'api/values_api.dart';
part 'model/action.dart';
part 'model/action_type.dart';
part 'model/automation.dart';
part 'model/automation_create_or_update_detail_dto.dart';
part 'model/automation_create_or_update_detail_dto_all_of.dart';
part 'model/alarm_mode.dart';
part 'model/alarm_mode_create_or_update_detail_dto.dart';
part 'model/alarm_mode_create_or_update_detail_dto_all_of.dart';
part 'model/alarm_mode_dto.dart';
part 'model/alarm_mode_detail_dto.dart';
part 'model/alarm_mode_detail_dto_all_of.dart';
part 'model/alarm_triggered.dart';
part 'model/alarm_type.dart';
part 'model/automation_dto.dart';
part 'model/automation_detail_dto.dart';
part 'model/automation_detail_dto_all_of.dart';
part 'model/automation_state.dart';
part 'model/automation_triggered.dart';
part 'model/azure_ad_auth_model.dart';
part 'model/book.dart';
part 'model/condition.dart';
part 'model/condition_type.dart';
part 'model/condition_value.dart';
part 'model/connection_status.dart';
part 'model/device.dart';
part 'model/create_or_update_home_dto.dart';
part 'model/create_or_update_home_dto_all_of.dart';
part 'model/device_detail_dto.dart';
part 'model/device_detail_dto_all_of.dart';
part 'model/device_state.dart';
part 'model/device_summary_dto.dart';
part 'model/device_type.dart';
part 'model/electricity_production.dart';
part 'model/event_dto.dart';
part 'model/event_detail_dto.dart';
part 'model/event_detail_dto_all_of.dart';
part 'model/event_type.dart';
part 'model/facebook_auth_model.dart';
part 'model/geolocalized_mode.dart';
part 'model/google_auth_model.dart';
part 'model/group.dart';
part 'model/group_create_or_update_detail_dto.dart';
part 'model/group_create_or_update_detail_dto_all_of.dart';
part 'model/group_detail_dto.dart';
part 'model/group_detail_dto_all_of.dart';
part 'model/group_summary_dto.dart';
part 'model/home_dto.dart';
part 'model/home_detail_dto.dart';
part 'model/home_detail_dto_all_of.dart';
part 'model/login_dto.dart';
part 'model/means_of_communication.dart';
part 'model/mqtt_message_dto.dart';
@ -84,17 +102,16 @@ part 'model/odd_nice.dart';
part 'model/odd_object.dart';
part 'model/panel_menu_item.dart';
part 'model/panel_section.dart';
part 'model/place_dto.dart';
part 'model/provider.dart';
part 'model/programmed_mode.dart';
part 'model/provider_dto.dart';
part 'model/provider_type.dart';
part 'model/room_create_or_update_detail_dto.dart';
part 'model/room_detail_dto.dart';
part 'model/room_summary_dto.dart';
part 'model/screen_configuration.dart';
part 'model/screen_device.dart';
part 'model/screen_widget.dart';
part 'model/smart_garden_message.dart';
part 'model/smart_printer_message.dart';
part 'model/time_period_alarm.dart';
part 'model/token_dto.dart';
part 'model/trigger.dart';
part 'model/trigger_type.dart';

View File

@ -0,0 +1,593 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmApi {
AlarmApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Activate current alarm mode
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] alarmModeId (required):
/// Alarm mode to activate
Future<Response> alarmActivateWithHttpInfo(String alarmModeId) async {
// Verify required params are set.
if (alarmModeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmModeId');
}
final path = r'/api/alarm/activate/{alarmModeId}'
.replaceAll('{' + 'alarmModeId' + '}', alarmModeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Activate current alarm mode
///
/// Parameters:
///
/// * [String] alarmModeId (required):
/// Alarm mode to activate
Future<String> alarmActivate(String alarmModeId) async {
final response = await alarmActivateWithHttpInfo(alarmModeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String;
}
return Future<String>.value(null);
}
/// Create an alarm mode
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AlarmModeCreateOrUpdateDetailDTO] alarmModeCreateOrUpdateDetailDTO (required):
/// Alarm mode to create
Future<Response> alarmCreateWithHttpInfo(AlarmModeCreateOrUpdateDetailDTO alarmModeCreateOrUpdateDetailDTO) async {
// Verify required params are set.
if (alarmModeCreateOrUpdateDetailDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmModeCreateOrUpdateDetailDTO');
}
final path = r'/api/alarm';
Object postBody = alarmModeCreateOrUpdateDetailDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>['application/json'];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Create an alarm mode
///
/// Parameters:
///
/// * [AlarmModeCreateOrUpdateDetailDTO] alarmModeCreateOrUpdateDetailDTO (required):
/// Alarm mode to create
Future<AlarmModeDetailDTO> alarmCreate(AlarmModeCreateOrUpdateDetailDTO alarmModeCreateOrUpdateDetailDTO) async {
final response = await alarmCreateWithHttpInfo(alarmModeCreateOrUpdateDetailDTO);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'AlarmModeDetailDTO') as AlarmModeDetailDTO;
}
return Future<AlarmModeDetailDTO>.value(null);
}
/// Create default alarm modes
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<Response> alarmCreateDefaultAlarmsWithHttpInfo(String homeId) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/alarm/defaults/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Create default alarm modes
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<bool> alarmCreateDefaultAlarms(String homeId) async {
final response = await alarmCreateDefaultAlarmsWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'bool') as bool;
}
return Future<bool>.value(null);
}
/// Delete an alarm mode
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] alarmModeId (required):
/// Id of alarm mode to delete
Future<Response> alarmDeleteWithHttpInfo(String alarmModeId) async {
// Verify required params are set.
if (alarmModeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmModeId');
}
final path = r'/api/alarm/{alarmModeId}'
.replaceAll('{' + 'alarmModeId' + '}', alarmModeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Delete an alarm mode
///
/// Parameters:
///
/// * [String] alarmModeId (required):
/// Id of alarm mode to delete
Future<String> alarmDelete(String alarmModeId) async {
final response = await alarmDeleteWithHttpInfo(alarmModeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String;
}
return Future<String>.value(null);
}
/// Delete all alarm mode for a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<Response> alarmDeleteAllForHomeWithHttpInfo(String homeId) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/alarm/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Delete all alarm mode for a specified home
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<String> alarmDeleteAllForHome(String homeId) async {
final response = await alarmDeleteAllForHomeWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String;
}
return Future<String>.value(null);
}
/// Get all alarm modes for the specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<Response> alarmGetAllWithHttpInfo(String homeId) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/alarm/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Get all alarm modes for the specified home
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<List<AlarmModeDTO>> alarmGetAll(String homeId) async {
final response = await alarmGetAllWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<AlarmModeDTO>') as List)
.cast<AlarmModeDTO>()
.toList(growable: false);
}
return Future<List<AlarmModeDTO>>.value(null);
}
/// Get detail info of a specified alarm mode
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] alarmId (required):
///
/// * [String] alarmModeId:
/// alarm id
Future<Response> alarmGetDetailWithHttpInfo(String alarmId, { String alarmModeId }) async {
// Verify required params are set.
if (alarmId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmId');
}
final path = r'/api/alarm/detail/{alarmId}'
.replaceAll('{' + 'alarmId' + '}', alarmId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (alarmModeId != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'alarmModeId', alarmModeId));
}
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Get detail info of a specified alarm mode
///
/// Parameters:
///
/// * [String] alarmId (required):
///
/// * [String] alarmModeId:
/// alarm id
Future<AlarmModeDetailDTO> alarmGetDetail(String alarmId, { String alarmModeId }) async {
final response = await alarmGetDetailWithHttpInfo(alarmId, alarmModeId: alarmModeId );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'AlarmModeDetailDTO') as AlarmModeDetailDTO;
}
return Future<AlarmModeDetailDTO>.value(null);
}
/// Update an alarm mode
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [AlarmModeCreateOrUpdateDetailDTO] alarmModeCreateOrUpdateDetailDTO (required):
/// alarm mode to update
Future<Response> alarmUpdateWithHttpInfo(AlarmModeCreateOrUpdateDetailDTO alarmModeCreateOrUpdateDetailDTO) async {
// Verify required params are set.
if (alarmModeCreateOrUpdateDetailDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: alarmModeCreateOrUpdateDetailDTO');
}
final path = r'/api/alarm';
Object postBody = alarmModeCreateOrUpdateDetailDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>['application/json'];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Update an alarm mode
///
/// Parameters:
///
/// * [AlarmModeCreateOrUpdateDetailDTO] alarmModeCreateOrUpdateDetailDTO (required):
/// alarm mode to update
Future<AlarmModeDetailDTO> alarmUpdate(AlarmModeCreateOrUpdateDetailDTO alarmModeCreateOrUpdateDetailDTO) async {
final response = await alarmUpdateWithHttpInfo(alarmModeCreateOrUpdateDetailDTO);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'AlarmModeDetailDTO') as AlarmModeDetailDTO;
}
return Future<AlarmModeDetailDTO>.value(null);
}
}

View File

@ -21,17 +21,17 @@ class AutomationApi {
///
/// Parameters:
///
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
/// * [AutomationDetailDTO] automationDetailDTO (required):
/// Automation to create
Future<Response> automationCreateWithHttpInfo(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
Future<Response> automationCreateWithHttpInfo(AutomationDetailDTO automationDetailDTO) async {
// Verify required params are set.
if (automationCreateOrUpdateDetailDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationCreateOrUpdateDetailDTO');
if (automationDetailDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationDetailDTO');
}
final path = r'/api/automation';
Object postBody = automationCreateOrUpdateDetailDTO;
Object postBody = automationDetailDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -69,10 +69,10 @@ class AutomationApi {
///
/// Parameters:
///
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
/// * [AutomationDetailDTO] automationDetailDTO (required):
/// Automation to create
Future<AutomationDTO> automationCreate(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
final response = await automationCreateWithHttpInfo(automationCreateOrUpdateDetailDTO);
Future<AutomationDTO> automationCreate(AutomationDetailDTO automationDetailDTO) async {
final response = await automationCreateWithHttpInfo(automationDetailDTO);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -156,22 +156,22 @@ class AutomationApi {
return Future<String>.value(null);
}
/// Delete all automation for a specified
/// Delete all automation for a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> automationDeleteAllForUserWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> automationDeleteAllForHomeWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/automation/user/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/automation/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -207,14 +207,14 @@ class AutomationApi {
);
}
/// Delete all automation for a specified
/// Delete all automation for a specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<String> automationDeleteAllForUser(String userId) async {
final response = await automationDeleteAllForUserWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<String> automationDeleteAllForHome(String homeId) async {
final response = await automationDeleteAllForHomeWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -227,22 +227,22 @@ class AutomationApi {
return Future<String>.value(null);
}
/// Get all automations for the specified user
/// Get all automations for the specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> automationGetAllWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> automationGetAllWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/automation/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/automation/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -278,14 +278,14 @@ class AutomationApi {
);
}
/// Get all automations for the specified user
/// Get all automations for the specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<List<AutomationDTO>> automationGetAll(String userId) async {
final response = await automationGetAllWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<AutomationDTO>> automationGetAll(String homeId) async {
final response = await automationGetAllWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -377,17 +377,17 @@ class AutomationApi {
///
/// Parameters:
///
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
/// * [AutomationDetailDTO] automationDetailDTO (required):
/// automation to update
Future<Response> automationUpdateWithHttpInfo(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
Future<Response> automationUpdateWithHttpInfo(AutomationDetailDTO automationDetailDTO) async {
// Verify required params are set.
if (automationCreateOrUpdateDetailDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationCreateOrUpdateDetailDTO');
if (automationDetailDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: automationDetailDTO');
}
final path = r'/api/automation';
Object postBody = automationCreateOrUpdateDetailDTO;
Object postBody = automationDetailDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
@ -425,10 +425,10 @@ class AutomationApi {
///
/// Parameters:
///
/// * [AutomationCreateOrUpdateDetailDTO] automationCreateOrUpdateDetailDTO (required):
/// * [AutomationDetailDTO] automationDetailDTO (required):
/// automation to update
Future<AutomationCreateOrUpdateDetailDTO> automationUpdate(AutomationCreateOrUpdateDetailDTO automationCreateOrUpdateDetailDTO) async {
final response = await automationUpdateWithHttpInfo(automationCreateOrUpdateDetailDTO);
Future<AutomationDetailDTO> automationUpdate(AutomationDetailDTO automationDetailDTO) async {
final response = await automationUpdateWithHttpInfo(automationDetailDTO);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -436,8 +436,8 @@ class AutomationApi {
// 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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'AutomationCreateOrUpdateDetailDTO') as AutomationCreateOrUpdateDetailDTO;
return apiClient.deserialize(_decodeBodyBytes(response), 'AutomationDetailDTO') as AutomationDetailDTO;
}
return Future<AutomationCreateOrUpdateDetailDTO>.value(null);
return Future<AutomationDetailDTO>.value(null);
}
}

View File

@ -91,22 +91,22 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
/// * [String] homeId (required):
/// Home Id
///
/// * [String] providerId (required):
/// Id of Provider
Future<Response> deviceCreateDevicesFromProviderWithHttpInfo(String userId, String providerId) async {
Future<Response> deviceCreateDevicesFromProviderWithHttpInfo(String homeId, String providerId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
if (providerId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: providerId');
}
final path = r'/api/device/{userId}/fromProvider/{providerId}'
.replaceAll('{' + 'userId' + '}', userId.toString())
final path = r'/api/device/{homeId}/fromProvider/{providerId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString())
.replaceAll('{' + 'providerId' + '}', providerId.toString());
Object postBody;
@ -147,13 +147,13 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
/// * [String] homeId (required):
/// Home Id
///
/// * [String] providerId (required):
/// Id of Provider
Future<List<DeviceDetailDTO>> deviceCreateDevicesFromProvider(String userId, String providerId) async {
final response = await deviceCreateDevicesFromProviderWithHttpInfo(userId, providerId);
Future<List<DeviceDetailDTO>> deviceCreateDevicesFromProvider(String homeId, String providerId) async {
final response = await deviceCreateDevicesFromProviderWithHttpInfo(homeId, providerId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -239,22 +239,22 @@ class DeviceApi {
return Future<String>.value(null);
}
/// Delete all device for a specified user
/// Delete all device for a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> deviceDeleteAllForUserWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Id of home
Future<Response> deviceDeleteAllForHomeWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/device/user/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/device/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -290,14 +290,14 @@ class DeviceApi {
);
}
/// Delete all device for a specified user
/// Delete all device for a specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<String> deviceDeleteAllForUser(String userId) async {
final response = await deviceDeleteAllForUserWithHttpInfo(userId);
/// * [String] homeId (required):
/// Id of home
Future<String> deviceDeleteAllForHome(String homeId) async {
final response = await deviceDeleteAllForHomeWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -316,22 +316,22 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
/// * [String] homeId (required):
/// Home Id
///
/// * [String] providerId (required):
/// Id of Provider
Future<Response> deviceDeleteDevicesFromProviderWithHttpInfo(String userId, String providerId) async {
Future<Response> deviceDeleteDevicesFromProviderWithHttpInfo(String homeId, String providerId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
if (providerId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: providerId');
}
final path = r'/api/device/{userId}/fromProvider/{providerId}'
.replaceAll('{' + 'userId' + '}', userId.toString())
final path = r'/api/device/{homeId}/fromProvider/{providerId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString())
.replaceAll('{' + 'providerId' + '}', providerId.toString());
Object postBody;
@ -372,13 +372,13 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
/// * [String] homeId (required):
/// Home Id
///
/// * [String] providerId (required):
/// Id of Provider
Future<String> deviceDeleteDevicesFromProvider(String userId, String providerId) async {
final response = await deviceDeleteDevicesFromProviderWithHttpInfo(userId, providerId);
Future<String> deviceDeleteDevicesFromProvider(String homeId, String providerId) async {
final response = await deviceDeleteDevicesFromProviderWithHttpInfo(homeId, providerId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -397,16 +397,16 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> deviceGetAllWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> deviceGetAllWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/device/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/device/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -446,10 +446,10 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<List<DeviceSummaryDTO>> deviceGetAll(String userId) async {
final response = await deviceGetAllWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<DeviceSummaryDTO>> deviceGetAll(String homeId) async {
final response = await deviceGetAllWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -541,22 +541,22 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// user Id
/// * [String] homeId (required):
/// Home Id
///
/// * [DeviceType] type (required):
/// device type
Future<Response> deviceGetDevicesByTypeWithHttpInfo(String userId, DeviceType type) async {
Future<Response> deviceGetDevicesByTypeWithHttpInfo(String homeId, DeviceType type) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
if (type == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: type');
}
final path = r'/api/device/{userId}/type/{type}'
.replaceAll('{' + 'userId' + '}', userId.toString())
final path = r'/api/device/{homeId}/type/{type}'
.replaceAll('{' + 'homeId' + '}', homeId.toString())
.replaceAll('{' + 'type' + '}', type.toString());
Object postBody;
@ -597,13 +597,13 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// user Id
/// * [String] homeId (required):
/// Home Id
///
/// * [DeviceType] type (required):
/// device type
Future<List<DeviceDetailDTO>> deviceGetDevicesByType(String userId, DeviceType type) async {
final response = await deviceGetDevicesByTypeWithHttpInfo(userId, type);
Future<List<DeviceDetailDTO>> deviceGetDevicesByType(String homeId, DeviceType type) async {
final response = await deviceGetDevicesByTypeWithHttpInfo(homeId, type);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -624,22 +624,22 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
/// * [String] homeId (required):
/// Home Id
///
/// * [String] providerId (required):
/// Id of Provider
Future<Response> deviceGetDevicesFromProviderWithHttpInfo(String userId, String providerId) async {
Future<Response> deviceGetDevicesFromProviderWithHttpInfo(String homeId, String providerId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
if (providerId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: providerId');
}
final path = r'/api/device/{userId}/fromProvider/{providerId}'
.replaceAll('{' + 'userId' + '}', userId.toString())
final path = r'/api/device/{homeId}/fromProvider/{providerId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString())
.replaceAll('{' + 'providerId' + '}', providerId.toString());
Object postBody;
@ -680,13 +680,13 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
/// * [String] homeId (required):
/// Home Id
///
/// * [String] providerId (required):
/// Id of Provider
Future<List<DeviceDetailDTO>> deviceGetDevicesFromProvider(String userId, String providerId) async {
final response = await deviceGetDevicesFromProviderWithHttpInfo(userId, providerId);
Future<List<DeviceDetailDTO>> deviceGetDevicesFromProvider(String homeId, String providerId) async {
final response = await deviceGetDevicesFromProviderWithHttpInfo(homeId, providerId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -707,16 +707,16 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<Response> deviceGetDevicesFromZigbee2MqttWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> deviceGetDevicesFromZigbee2MqttWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/device/zigbee2Mqtt/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/device/zigbee2Mqtt/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -756,10 +756,10 @@ class DeviceApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<List<DeviceDetailDTO>> deviceGetDevicesFromZigbee2Mqtt(String userId) async {
final response = await deviceGetDevicesFromZigbee2MqttWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<DeviceDetailDTO>> deviceGetDevicesFromZigbee2Mqtt(String homeId) async {
final response = await deviceGetDevicesFromZigbee2MqttWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}

View File

@ -21,10 +21,10 @@ class EnergyApi {
///
/// Parameters:
///
/// * [String] userId:
/// * [String] homeId:
///
/// * [ViewBy] viewBy:
Future<Response> energyGetElectricityProductionWithHttpInfo({ String userId, ViewBy viewBy }) async {
Future<Response> energyGetElectricityProductionWithHttpInfo({ String homeId, ViewBy viewBy }) async {
// Verify required params are set.
final path = r'/api/energy/electricity';
@ -35,8 +35,8 @@ class EnergyApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (userId != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'userId', userId));
if (homeId != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'homeId', homeId));
}
if (viewBy != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'viewBy', viewBy));
@ -74,11 +74,11 @@ class EnergyApi {
///
/// Parameters:
///
/// * [String] userId:
/// * [String] homeId:
///
/// * [ViewBy] viewBy:
Future<List<ElectricityProduction>> energyGetElectricityProduction({ String userId, ViewBy viewBy }) async {
final response = await energyGetElectricityProductionWithHttpInfo( userId: userId, viewBy: viewBy );
Future<List<ElectricityProduction>> energyGetElectricityProduction({ String homeId, ViewBy viewBy }) async {
final response = await energyGetElectricityProductionWithHttpInfo( homeId: homeId, viewBy: viewBy );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}

View File

@ -0,0 +1,360 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class EventApi {
EventApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Delete an event
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] eventId (required):
/// Id of event to delete
Future<Response> eventDeleteWithHttpInfo(String eventId) async {
// Verify required params are set.
if (eventId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: eventId');
}
final path = r'/api/event/{eventId}'
.replaceAll('{' + 'eventId' + '}', eventId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Delete an event
///
/// Parameters:
///
/// * [String] eventId (required):
/// Id of event to delete
Future<String> eventDelete(String eventId) async {
final response = await eventDeleteWithHttpInfo(eventId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String;
}
return Future<String>.value(null);
}
/// Delete all events for a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<Response> eventDeleteAllForHomeWithHttpInfo(String homeId) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/event/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Delete all events for a specified home
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
Future<String> eventDeleteAllForHome(String homeId) async {
final response = await eventDeleteAllForHomeWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String;
}
return Future<String>.value(null);
}
/// Get events for the specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
///
/// * [String] deviceId:
///
/// * [String] roomId:
///
/// * [int] startIndex:
///
/// * [int] count:
///
/// * [DateTime] dateStart:
///
/// * [DateTime] dateEnd:
///
/// * [OneOfEventType] eventType:
///
/// * [OneOfDeviceType] deviceType:
Future<Response> eventGetWithHttpInfo(String homeId, { String deviceId, String roomId, int startIndex, int count, DateTime dateStart, DateTime dateEnd, OneOfEventType eventType, OneOfDeviceType deviceType }) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/event/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (deviceId != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'DeviceId', deviceId));
}
if (roomId != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'RoomId', roomId));
}
if (startIndex != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'StartIndex', startIndex));
}
if (count != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'Count', count));
}
if (dateStart != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'DateStart', dateStart));
}
if (dateEnd != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'DateEnd', dateEnd));
}
if (eventType != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'EventType', eventType));
}
if (deviceType != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'DeviceType', deviceType));
}
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Get events for the specified home
///
/// Parameters:
///
/// * [String] homeId (required):
/// Home Id
///
/// * [String] deviceId:
///
/// * [String] roomId:
///
/// * [int] startIndex:
///
/// * [int] count:
///
/// * [DateTime] dateStart:
///
/// * [DateTime] dateEnd:
///
/// * [OneOfEventType] eventType:
///
/// * [OneOfDeviceType] deviceType:
Future<List<EventDetailDTO>> eventGet(String homeId, { String deviceId, String roomId, int startIndex, int count, DateTime dateStart, DateTime dateEnd, OneOfEventType eventType, OneOfDeviceType deviceType }) async {
final response = await eventGetWithHttpInfo(homeId, deviceId: deviceId, roomId: roomId, startIndex: startIndex, count: count, dateStart: dateStart, dateEnd: dateEnd, eventType: eventType, deviceType: deviceType );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<EventDetailDTO>') as List)
.cast<EventDetailDTO>()
.toList(growable: false);
}
return Future<List<EventDetailDTO>>.value(null);
}
/// Get detail info of a specified event
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] eventId (required):
/// event id
Future<Response> eventGetDetailWithHttpInfo(String eventId) async {
// Verify required params are set.
if (eventId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: eventId');
}
final path = r'/api/event/detail/{eventId}'
.replaceAll('{' + 'eventId' + '}', eventId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Get detail info of a specified event
///
/// Parameters:
///
/// * [String] eventId (required):
/// event id
Future<EventDetailDTO> eventGetDetail(String eventId) async {
final response = await eventGetDetailWithHttpInfo(eventId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'EventDetailDTO') as EventDetailDTO;
}
return Future<EventDetailDTO>.value(null);
}
}

View File

@ -91,16 +91,16 @@ class GroupApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<Response> groupCreateDevicesFromZigbee2MqttWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> groupCreateDevicesFromZigbee2MqttWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/group/{userId}/fromZigbee'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/group/{homeId}/fromZigbee'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -140,10 +140,10 @@ class GroupApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<List<GroupDetailDTO>> groupCreateDevicesFromZigbee2Mqtt(String userId) async {
final response = await groupCreateDevicesFromZigbee2MqttWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<GroupDetailDTO>> groupCreateDevicesFromZigbee2Mqtt(String homeId) async {
final response = await groupCreateDevicesFromZigbee2MqttWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -310,22 +310,22 @@ class GroupApi {
return Future<String>.value(null);
}
/// Delete all group for a specified
/// Delete all group for a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> groupDeleteAllForUserWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> groupDeleteAllForHomeWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/group/user/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/group/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -361,14 +361,14 @@ class GroupApi {
);
}
/// Delete all group for a specified
/// Delete all group for a specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<String> groupDeleteAllForUser(String userId) async {
final response = await groupDeleteAllForUserWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<String> groupDeleteAllForHome(String homeId) async {
final response = await groupDeleteAllForHomeWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -381,22 +381,22 @@ class GroupApi {
return Future<String>.value(null);
}
/// Get all groups for the specified user
/// Get all groups for the specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> groupGetAllWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> groupGetAllWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/group/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/group/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -432,14 +432,14 @@ class GroupApi {
);
}
/// Get all groups for the specified user
/// Get all groups for the specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<List<GroupSummaryDTO>> groupGetAll(String userId) async {
final response = await groupGetAllWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<GroupSummaryDTO>> groupGetAll(String homeId) async {
final response = await groupGetAllWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -531,22 +531,22 @@ class GroupApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// user Id
/// * [String] homeId (required):
/// home Id
///
/// * [String] type (required):
/// group type
Future<Response> groupGetGroupsByTypeWithHttpInfo(String userId, String type) async {
Future<Response> groupGetGroupsByTypeWithHttpInfo(String homeId, String type) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
if (type == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: type');
}
final path = r'/api/group/{userId}/type/{type}'
.replaceAll('{' + 'userId' + '}', userId.toString())
final path = r'/api/group/{homeId}/type/{type}'
.replaceAll('{' + 'homeId' + '}', homeId.toString())
.replaceAll('{' + 'type' + '}', type.toString());
Object postBody;
@ -587,13 +587,13 @@ class GroupApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// user Id
/// * [String] homeId (required):
/// home Id
///
/// * [String] type (required):
/// group type
Future<List<GroupSummaryDTO>> groupGetGroupsByType(String userId, String type) async {
final response = await groupGetGroupsByTypeWithHttpInfo(userId, type);
Future<List<GroupSummaryDTO>> groupGetGroupsByType(String homeId, String type) async {
final response = await groupGetGroupsByTypeWithHttpInfo(homeId, type);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -614,16 +614,16 @@ class GroupApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<Response> groupGetGroupsFromZigbee2MqttWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> groupGetGroupsFromZigbee2MqttWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/group/zigbee2Mqtt/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/group/zigbee2Mqtt/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -663,10 +663,10 @@ class GroupApi {
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<List<GroupDetailDTO>> groupGetGroupsFromZigbee2Mqtt(String userId) async {
final response = await groupGetGroupsFromZigbee2MqttWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<GroupDetailDTO>> groupGetGroupsFromZigbee2Mqtt(String homeId) async {
final response = await groupGetGroupsFromZigbee2MqttWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}

View File

@ -0,0 +1,372 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class HomeApi {
HomeApi([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Create a home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [CreateOrUpdateHomeDTO] createOrUpdateHomeDTO (required):
/// Home to create
Future<Response> homeCreateWithHttpInfo(CreateOrUpdateHomeDTO createOrUpdateHomeDTO) async {
// Verify required params are set.
if (createOrUpdateHomeDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: createOrUpdateHomeDTO');
}
final path = r'/api/home';
Object postBody = createOrUpdateHomeDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>['application/json'];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Create a home
///
/// Parameters:
///
/// * [CreateOrUpdateHomeDTO] createOrUpdateHomeDTO (required):
/// Home to create
Future<HomeDTO> homeCreate(CreateOrUpdateHomeDTO createOrUpdateHomeDTO) async {
final response = await homeCreateWithHttpInfo(createOrUpdateHomeDTO);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'HomeDTO') as HomeDTO;
}
return Future<HomeDTO>.value(null);
}
/// Delete a home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// Id of home to delete
Future<Response> homeDeleteWithHttpInfo(String homeId) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Delete a home
///
/// Parameters:
///
/// * [String] homeId (required):
/// Id of home to delete
Future<String> homeDelete(String homeId) async {
final response = await homeDeleteWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'String') as String;
}
return Future<String>.value(null);
}
/// Get all home for specified user
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<Response> homeGetAllWithHttpInfo(String userId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
}
final path = r'/api/home/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Get all home for specified user
///
/// Parameters:
///
/// * [String] userId (required):
/// User Id
Future<List<HomeDTO>> homeGetAll(String userId) async {
final response = await homeGetAllWithHttpInfo(userId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return (apiClient.deserialize(_decodeBodyBytes(response), 'List<HomeDTO>') as List)
.cast<HomeDTO>()
.toList(growable: false);
}
return Future<List<HomeDTO>>.value(null);
}
/// Get detail info of a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] homeId (required):
/// home id
Future<Response> homeGetDetailWithHttpInfo(String homeId) async {
// Verify required params are set.
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/home/detail/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Get detail info of a specified home
///
/// Parameters:
///
/// * [String] homeId (required):
/// home id
Future<HomeDetailDTO> homeGetDetail(String homeId) async {
final response = await homeGetDetailWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'HomeDetailDTO') as HomeDetailDTO;
}
return Future<HomeDetailDTO>.value(null);
}
/// Update a home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [CreateOrUpdateHomeDTO] createOrUpdateHomeDTO (required):
/// Home to update
Future<Response> homeUpdateWithHttpInfo(CreateOrUpdateHomeDTO createOrUpdateHomeDTO) async {
// Verify required params are set.
if (createOrUpdateHomeDTO == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: createOrUpdateHomeDTO');
}
final path = r'/api/home';
Object postBody = createOrUpdateHomeDTO;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>['application/json'];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
/// Update a home
///
/// Parameters:
///
/// * [CreateOrUpdateHomeDTO] createOrUpdateHomeDTO (required):
/// Home to update
Future<HomeDTO> homeUpdate(CreateOrUpdateHomeDTO createOrUpdateHomeDTO) async {
final response = await homeUpdateWithHttpInfo(createOrUpdateHomeDTO);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _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 != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'HomeDTO') as HomeDTO;
}
return Future<HomeDTO>.value(null);
}
}

View File

@ -156,22 +156,22 @@ class ProviderApi {
return Future<String>.value(null);
}
/// Get all user providers
/// Get all home providers
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> providerGetAllWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> providerGetAllWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/provider/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/provider/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -207,14 +207,14 @@ class ProviderApi {
);
}
/// Get all user providers
/// Get all home providers
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<List<ProviderDTO>> providerGetAll(String userId) async {
final response = await providerGetAllWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<ProviderDTO>> providerGetAll(String homeId) async {
final response = await providerGetAllWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}

View File

@ -237,22 +237,22 @@ class RoomApi {
return Future<String>.value(null);
}
/// Delete all room for a specified user
/// Delete all rooms for a specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> roomDeleteAllForUserWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> roomDeleteAllForHomeWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/room/user/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/room/home/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -288,14 +288,14 @@ class RoomApi {
);
}
/// Delete all room for a specified user
/// Delete all rooms for a specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<String> roomDeleteAllForUser(String userId) async {
final response = await roomDeleteAllForUserWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<String> roomDeleteAllForHome(String homeId) async {
final response = await roomDeleteAllForHomeWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -308,22 +308,22 @@ class RoomApi {
return Future<String>.value(null);
}
/// Get all rooms for the specified user
/// Get all rooms for the specified home
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<Response> roomGetAllWithHttpInfo(String userId) async {
/// * [String] homeId (required):
/// Home Id
Future<Response> roomGetAllWithHttpInfo(String homeId) async {
// Verify required params are set.
if (userId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: userId');
if (homeId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: homeId');
}
final path = r'/api/room/{userId}'
.replaceAll('{' + 'userId' + '}', userId.toString());
final path = r'/api/room/{homeId}'
.replaceAll('{' + 'homeId' + '}', homeId.toString());
Object postBody;
@ -359,14 +359,14 @@ class RoomApi {
);
}
/// Get all rooms for the specified user
/// Get all rooms for the specified home
///
/// Parameters:
///
/// * [String] userId (required):
/// Id of user
Future<List<RoomSummaryDTO>> roomGetAll(String userId) async {
final response = await roomGetAllWithHttpInfo(userId);
/// * [String] homeId (required):
/// Home Id
Future<List<RoomSummaryDTO>> roomGetAll(String homeId) async {
final response = await roomGetAllWithHttpInfo(homeId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
@ -389,10 +389,7 @@ class RoomApi {
///
/// * [String] roomId (required):
/// room id
///
/// * [String] userId:
/// user id
Future<Response> roomGetDetailWithHttpInfo(String roomId, { String userId }) async {
Future<Response> roomGetDetailWithHttpInfo(String roomId) async {
// Verify required params are set.
if (roomId == null) {
throw ApiException(HttpStatus.badRequest, 'Missing required param: roomId');
@ -407,10 +404,6 @@ class RoomApi {
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (userId != null) {
queryParams.addAll(_convertParametersForCollectionFormat('', 'userId', userId));
}
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
@ -445,11 +438,8 @@ class RoomApi {
///
/// * [String] roomId (required):
/// room id
///
/// * [String] userId:
/// user id
Future<RoomDetailDTO> roomGetDetail(String roomId, { String userId }) async {
final response = await roomGetDetailWithHttpInfo(roomId, userId: userId );
Future<RoomDetailDTO> roomGetDetail(String roomId) async {
final response = await roomGetDetailWithHttpInfo(roomId);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}

View File

@ -10,7 +10,7 @@
part of openapi.api;
class ApiClient {
ApiClient({this.basePath = 'http://localhost:25049'}) {
ApiClient({this.basePath = 'http://192.168.31.140'}) {
// Setup authentications (key: authentication name, value: authentication).
_authentications[r'bearer'] = OAuth();
}
@ -161,12 +161,23 @@ class ApiClient {
case 'ActionType':
return ActionTypeTypeTransformer().decode(value);
case 'Automation':
return Automation.fromJson(value);
case 'AutomationCreateOrUpdateDetailDTO':
return AutomationCreateOrUpdateDetailDTO.fromJson(value);
case 'AutomationCreateOrUpdateDetailDTOAllOf':
return AutomationCreateOrUpdateDetailDTOAllOf.fromJson(value);
case 'AlarmMode':
return AlarmMode.fromJson(value);
case 'AlarmModeCreateOrUpdateDetailDTO':
return AlarmModeCreateOrUpdateDetailDTO.fromJson(value);
case 'AlarmModeCreateOrUpdateDetailDTOAllOf':
return AlarmModeCreateOrUpdateDetailDTOAllOf.fromJson(value);
case 'AlarmModeDTO':
return AlarmModeDTO.fromJson(value);
case 'AlarmModeDetailDTO':
return AlarmModeDetailDTO.fromJson(value);
case 'AlarmModeDetailDTOAllOf':
return AlarmModeDetailDTOAllOf.fromJson(value);
case 'AlarmTriggered':
return AlarmTriggered.fromJson(value);
case 'AlarmType':
return AlarmTypeTypeTransformer().decode(value);
case 'AutomationDTO':
return AutomationDTO.fromJson(value);
case 'AutomationDetailDTO':
@ -175,6 +186,8 @@ class ApiClient {
return AutomationDetailDTOAllOf.fromJson(value);
case 'AutomationState':
return AutomationState.fromJson(value);
case 'AutomationTriggered':
return AutomationTriggered.fromJson(value);
case 'AzureADAuthModel':
return AzureADAuthModel.fromJson(value);
case 'Book':
@ -190,12 +203,16 @@ class ApiClient {
case 'ConnectionStatus':
return ConnectionStatusTypeTransformer().decode(value);
case 'Device':
return Device.fromJson(value);
case 'CreateOrUpdateHomeDTO':
return CreateOrUpdateHomeDTO.fromJson(value);
case 'CreateOrUpdateHomeDTOAllOf':
return CreateOrUpdateHomeDTOAllOf.fromJson(value);
case 'DeviceDetailDTO':
return DeviceDetailDTO.fromJson(value);
case 'DeviceDetailDTOAllOf':
return DeviceDetailDTOAllOf.fromJson(value);
case 'DeviceState':
return DeviceState.fromJson(value);
case 'DeviceSummaryDTO':
return DeviceSummaryDTO.fromJson(value);
case 'DeviceType':
@ -203,12 +220,21 @@ class ApiClient {
case 'ElectricityProduction':
return ElectricityProduction.fromJson(value);
case 'EventDTO':
return EventDTO.fromJson(value);
case 'EventDetailDTO':
return EventDetailDTO.fromJson(value);
case 'EventDetailDTOAllOf':
return EventDetailDTOAllOf.fromJson(value);
case 'EventType':
return EventTypeTypeTransformer().decode(value);
case 'FacebookAuthModel':
return FacebookAuthModel.fromJson(value);
case 'GeolocalizedMode':
return GeolocalizedMode.fromJson(value);
case 'GoogleAuthModel':
return GoogleAuthModel.fromJson(value);
case 'Group':
return Group.fromJson(value);
case 'GroupCreateOrUpdateDetailDTO':
return GroupCreateOrUpdateDetailDTO.fromJson(value);
case 'GroupCreateOrUpdateDetailDTOAllOf':
@ -219,6 +245,12 @@ class ApiClient {
return GroupDetailDTOAllOf.fromJson(value);
case 'GroupSummaryDTO':
return GroupSummaryDTO.fromJson(value);
case 'HomeDTO':
return HomeDTO.fromJson(value);
case 'HomeDetailDTO':
return HomeDetailDTO.fromJson(value);
case 'HomeDetailDTOAllOf':
return HomeDetailDTOAllOf.fromJson(value);
case 'LoginDTO':
return LoginDTO.fromJson(value);
case 'MeansOfCommunication':
@ -234,28 +266,27 @@ class ApiClient {
return PanelMenuItem.fromJson(value);
case 'PanelSection':
return PanelSection.fromJson(value);
case 'PlaceDTO':
return PlaceDTO.fromJson(value);
case 'Provider':
return Provider.fromJson(value);
case 'ProgrammedMode':
return ProgrammedMode.fromJson(value);
case 'ProviderDTO':
return ProviderDTO.fromJson(value);
case 'ProviderType':
return ProviderTypeTypeTransformer().decode(value);
case 'RoomCreateOrUpdateDetailDTO':
return RoomCreateOrUpdateDetailDTO.fromJson(value);
case 'RoomDetailDTO':
return RoomDetailDTO.fromJson(value);
case 'RoomSummaryDTO':
return RoomSummaryDTO.fromJson(value);
case 'ScreenConfiguration':
return ScreenConfiguration.fromJson(value);
case 'ScreenDevice':
return ScreenDevice.fromJson(value);
case 'ScreenWidget':
return ScreenWidget.fromJson(value);
case 'SmartGardenMessage':
return SmartGardenMessage.fromJson(value);
case 'SmartPrinterMessage':
return SmartPrinterMessage.fromJson(value);
case 'TimePeriodAlarm':
return TimePeriodAlarm.fromJson(value);
case 'TokenDTO':
return TokenDTO.fromJson(value);
case 'Trigger':

View File

@ -61,6 +61,9 @@ String parameterToString(dynamic value) {
if (value is ActionType) {
return ActionTypeTypeTransformer().encode(value).toString();
}
if (value is AlarmType) {
return AlarmTypeTypeTransformer().encode(value).toString();
}
if (value is ConditionType) {
return ConditionTypeTypeTransformer().encode(value).toString();
}
@ -73,9 +76,15 @@ String parameterToString(dynamic value) {
if (value is DeviceType) {
return DeviceTypeTypeTransformer().encode(value).toString();
}
if (value is EventType) {
return EventTypeTypeTransformer().encode(value).toString();
}
if (value is MeansOfCommunication) {
return MeansOfCommunicationTypeTransformer().encode(value).toString();
}
if (value is ProviderType) {
return ProviderTypeTypeTransformer().encode(value).toString();
}
if (value is TriggerType) {
return TriggerTypeTypeTransformer().encode(value).toString();
}

View File

@ -18,6 +18,7 @@ class Action {
this.rawRequest,
this.providerId,
this.type,
this.isForce,
});
String groupId;
@ -32,6 +33,8 @@ class Action {
ActionType type;
bool isForce;
@override
bool operator ==(Object other) => identical(this, other) || other is Action &&
other.groupId == groupId &&
@ -39,7 +42,8 @@ class Action {
other.states == states &&
other.rawRequest == rawRequest &&
other.providerId == providerId &&
other.type == type;
other.type == type &&
other.isForce == isForce;
@override
int get hashCode =>
@ -48,10 +52,11 @@ class Action {
(states == null ? 0 : states.hashCode) +
(rawRequest == null ? 0 : rawRequest.hashCode) +
(providerId == null ? 0 : providerId.hashCode) +
(type == null ? 0 : type.hashCode);
(type == null ? 0 : type.hashCode) +
(isForce == null ? 0 : isForce.hashCode);
@override
String toString() => 'Action[groupId=$groupId, deviceId=$deviceId, states=$states, rawRequest=$rawRequest, providerId=$providerId, type=$type]';
String toString() => 'Action[groupId=$groupId, deviceId=$deviceId, states=$states, rawRequest=$rawRequest, providerId=$providerId, type=$type, isForce=$isForce]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -73,6 +78,9 @@ class Action {
if (type != null) {
json[r'type'] = type;
}
if (isForce != null) {
json[r'isForce'] = isForce;
}
return json;
}
@ -87,6 +95,7 @@ class Action {
rawRequest: json[r'rawRequest'],
providerId: json[r'providerId'],
type: ActionType.fromJson(json[r'type']),
isForce: json[r'isForce'],
);
static List<Action> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>

View File

@ -0,0 +1,194 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmMode {
/// Returns a new [AlarmMode] instance.
AlarmMode({
this.id,
this.homeId,
this.name,
this.activated,
this.isDefault,
this.notification,
this.createdDate,
this.updatedDate,
this.type,
this.programmedMode,
this.geolocalizedMode,
this.triggers,
this.actions,
this.devicesIds,
});
String id;
String homeId;
String name;
bool activated;
bool isDefault;
bool notification;
DateTime createdDate;
DateTime updatedDate;
AlarmType type;
OneOfProgrammedMode programmedMode;
OneOfGeolocalizedMode geolocalizedMode;
List<Trigger> triggers;
List<Action> actions;
List<String> devicesIds;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmMode &&
other.id == id &&
other.homeId == homeId &&
other.name == name &&
other.activated == activated &&
other.isDefault == isDefault &&
other.notification == notification &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate &&
other.type == type &&
other.programmedMode == programmedMode &&
other.geolocalizedMode == geolocalizedMode &&
other.triggers == triggers &&
other.actions == actions &&
other.devicesIds == devicesIds;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(name == null ? 0 : name.hashCode) +
(activated == null ? 0 : activated.hashCode) +
(isDefault == null ? 0 : isDefault.hashCode) +
(notification == null ? 0 : notification.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode) +
(type == null ? 0 : type.hashCode) +
(programmedMode == null ? 0 : programmedMode.hashCode) +
(geolocalizedMode == null ? 0 : geolocalizedMode.hashCode) +
(triggers == null ? 0 : triggers.hashCode) +
(actions == null ? 0 : actions.hashCode) +
(devicesIds == null ? 0 : devicesIds.hashCode);
@override
String toString() => 'AlarmMode[id=$id, homeId=$homeId, name=$name, activated=$activated, isDefault=$isDefault, notification=$notification, createdDate=$createdDate, updatedDate=$updatedDate, type=$type, programmedMode=$programmedMode, geolocalizedMode=$geolocalizedMode, triggers=$triggers, actions=$actions, devicesIds=$devicesIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (name != null) {
json[r'name'] = name;
}
if (activated != null) {
json[r'activated'] = activated;
}
if (isDefault != null) {
json[r'isDefault'] = isDefault;
}
if (notification != null) {
json[r'notification'] = notification;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
}
if (updatedDate != null) {
json[r'updatedDate'] = updatedDate.toUtc().toIso8601String();
}
if (type != null) {
json[r'type'] = type;
}
if (programmedMode != null) {
json[r'programmedMode'] = programmedMode;
}
if (geolocalizedMode != null) {
json[r'geolocalizedMode'] = geolocalizedMode;
}
if (triggers != null) {
json[r'triggers'] = triggers;
}
if (actions != null) {
json[r'actions'] = actions;
}
if (devicesIds != null) {
json[r'devicesIds'] = devicesIds;
}
return json;
}
/// Returns a new [AlarmMode] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmMode fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmMode(
id: json[r'id'],
homeId: json[r'homeId'],
name: json[r'name'],
activated: json[r'activated'],
isDefault: json[r'isDefault'],
notification: json[r'notification'],
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),
updatedDate: json[r'updatedDate'] == null
? null
: DateTime.parse(json[r'updatedDate']),
type: AlarmType.fromJson(json[r'type']),
programmedMode: OneOfProgrammedMode.fromJson(json[r'programmedMode']),
geolocalizedMode: OneOfGeolocalizedMode.fromJson(json[r'geolocalizedMode']),
triggers: Trigger.listFromJson(json[r'triggers']),
actions: Action.listFromJson(json[r'actions']),
devicesIds: json[r'devicesIds'] == null
? null
: (json[r'devicesIds'] as List).cast<String>(),
);
static List<AlarmMode> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmMode>[]
: json.map((v) => AlarmMode.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmMode> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmMode>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmMode.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmMode-objects as value to a dart map
static Map<String, List<AlarmMode>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmMode>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmMode.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,183 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmModeCreateOrUpdateDetailDTO {
/// Returns a new [AlarmModeCreateOrUpdateDetailDTO] instance.
AlarmModeCreateOrUpdateDetailDTO({
this.id,
this.homeId,
this.name,
this.type,
this.activated,
this.isDefault,
this.notification,
this.createdDate,
this.updatedDate,
this.triggers,
this.actions,
this.programmedMode,
this.geolocalizedMode,
});
String id;
String homeId;
String name;
AlarmType type;
bool activated;
bool isDefault;
bool notification;
DateTime createdDate;
DateTime updatedDate;
List<Trigger> triggers;
List<Action> actions;
OneOfProgrammedMode programmedMode;
OneOfGeolocalizedMode geolocalizedMode;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmModeCreateOrUpdateDetailDTO &&
other.id == id &&
other.homeId == homeId &&
other.name == name &&
other.type == type &&
other.activated == activated &&
other.isDefault == isDefault &&
other.notification == notification &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate &&
other.triggers == triggers &&
other.actions == actions &&
other.programmedMode == programmedMode &&
other.geolocalizedMode == geolocalizedMode;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(name == null ? 0 : name.hashCode) +
(type == null ? 0 : type.hashCode) +
(activated == null ? 0 : activated.hashCode) +
(isDefault == null ? 0 : isDefault.hashCode) +
(notification == null ? 0 : notification.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode) +
(triggers == null ? 0 : triggers.hashCode) +
(actions == null ? 0 : actions.hashCode) +
(programmedMode == null ? 0 : programmedMode.hashCode) +
(geolocalizedMode == null ? 0 : geolocalizedMode.hashCode);
@override
String toString() => 'AlarmModeCreateOrUpdateDetailDTO[id=$id, homeId=$homeId, name=$name, type=$type, activated=$activated, isDefault=$isDefault, notification=$notification, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, actions=$actions, programmedMode=$programmedMode, geolocalizedMode=$geolocalizedMode]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (name != null) {
json[r'name'] = name;
}
if (type != null) {
json[r'type'] = type;
}
if (activated != null) {
json[r'activated'] = activated;
}
if (isDefault != null) {
json[r'isDefault'] = isDefault;
}
if (notification != null) {
json[r'notification'] = notification;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
}
if (updatedDate != null) {
json[r'updatedDate'] = updatedDate.toUtc().toIso8601String();
}
if (triggers != null) {
json[r'triggers'] = triggers;
}
if (actions != null) {
json[r'actions'] = actions;
}
if (programmedMode != null) {
json[r'programmedMode'] = programmedMode;
}
if (geolocalizedMode != null) {
json[r'geolocalizedMode'] = geolocalizedMode;
}
return json;
}
/// Returns a new [AlarmModeCreateOrUpdateDetailDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmModeCreateOrUpdateDetailDTO fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmModeCreateOrUpdateDetailDTO(
id: json[r'id'],
homeId: json[r'homeId'],
name: json[r'name'],
type: AlarmType.fromJson(json[r'type']),
activated: json[r'activated'],
isDefault: json[r'isDefault'],
notification: json[r'notification'],
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),
updatedDate: json[r'updatedDate'] == null
? null
: DateTime.parse(json[r'updatedDate']),
triggers: Trigger.listFromJson(json[r'triggers']),
actions: Action.listFromJson(json[r'actions']),
programmedMode: OneOfProgrammedMode.fromJson(json[r'programmedMode']),
geolocalizedMode: OneOfGeolocalizedMode.fromJson(json[r'geolocalizedMode']),
);
static List<AlarmModeCreateOrUpdateDetailDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmModeCreateOrUpdateDetailDTO>[]
: json.map((v) => AlarmModeCreateOrUpdateDetailDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmModeCreateOrUpdateDetailDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmModeCreateOrUpdateDetailDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmModeCreateOrUpdateDetailDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmModeCreateOrUpdateDetailDTO-objects as value to a dart map
static Map<String, List<AlarmModeCreateOrUpdateDetailDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmModeCreateOrUpdateDetailDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmModeCreateOrUpdateDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,98 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmModeCreateOrUpdateDetailDTOAllOf {
/// Returns a new [AlarmModeCreateOrUpdateDetailDTOAllOf] instance.
AlarmModeCreateOrUpdateDetailDTOAllOf({
this.triggers,
this.actions,
this.programmedMode,
this.geolocalizedMode,
});
List<Trigger> triggers;
List<Action> actions;
OneOfProgrammedMode programmedMode;
OneOfGeolocalizedMode geolocalizedMode;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmModeCreateOrUpdateDetailDTOAllOf &&
other.triggers == triggers &&
other.actions == actions &&
other.programmedMode == programmedMode &&
other.geolocalizedMode == geolocalizedMode;
@override
int get hashCode =>
(triggers == null ? 0 : triggers.hashCode) +
(actions == null ? 0 : actions.hashCode) +
(programmedMode == null ? 0 : programmedMode.hashCode) +
(geolocalizedMode == null ? 0 : geolocalizedMode.hashCode);
@override
String toString() => 'AlarmModeCreateOrUpdateDetailDTOAllOf[triggers=$triggers, actions=$actions, programmedMode=$programmedMode, geolocalizedMode=$geolocalizedMode]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (triggers != null) {
json[r'triggers'] = triggers;
}
if (actions != null) {
json[r'actions'] = actions;
}
if (programmedMode != null) {
json[r'programmedMode'] = programmedMode;
}
if (geolocalizedMode != null) {
json[r'geolocalizedMode'] = geolocalizedMode;
}
return json;
}
/// Returns a new [AlarmModeCreateOrUpdateDetailDTOAllOf] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmModeCreateOrUpdateDetailDTOAllOf fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmModeCreateOrUpdateDetailDTOAllOf(
triggers: Trigger.listFromJson(json[r'triggers']),
actions: Action.listFromJson(json[r'actions']),
programmedMode: OneOfProgrammedMode.fromJson(json[r'programmedMode']),
geolocalizedMode: OneOfGeolocalizedMode.fromJson(json[r'geolocalizedMode']),
);
static List<AlarmModeCreateOrUpdateDetailDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmModeCreateOrUpdateDetailDTOAllOf>[]
: json.map((v) => AlarmModeCreateOrUpdateDetailDTOAllOf.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmModeCreateOrUpdateDetailDTOAllOf> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmModeCreateOrUpdateDetailDTOAllOf>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmModeCreateOrUpdateDetailDTOAllOf.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmModeCreateOrUpdateDetailDTOAllOf-objects as value to a dart map
static Map<String, List<AlarmModeCreateOrUpdateDetailDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmModeCreateOrUpdateDetailDTOAllOf>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmModeCreateOrUpdateDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,183 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmModeDetailDTO {
/// Returns a new [AlarmModeDetailDTO] instance.
AlarmModeDetailDTO({
this.id,
this.homeId,
this.name,
this.type,
this.activated,
this.isDefault,
this.notification,
this.createdDate,
this.updatedDate,
this.triggers,
this.devices,
this.programmedMode,
this.geolocalizedMode,
});
String id;
String homeId;
String name;
AlarmType type;
bool activated;
bool isDefault;
bool notification;
DateTime createdDate;
DateTime updatedDate;
List<Trigger> triggers;
List<DeviceDetailDTO> devices;
OneOfProgrammedMode programmedMode;
OneOfGeolocalizedMode geolocalizedMode;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmModeDetailDTO &&
other.id == id &&
other.homeId == homeId &&
other.name == name &&
other.type == type &&
other.activated == activated &&
other.isDefault == isDefault &&
other.notification == notification &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate &&
other.triggers == triggers &&
other.devices == devices &&
other.programmedMode == programmedMode &&
other.geolocalizedMode == geolocalizedMode;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(name == null ? 0 : name.hashCode) +
(type == null ? 0 : type.hashCode) +
(activated == null ? 0 : activated.hashCode) +
(isDefault == null ? 0 : isDefault.hashCode) +
(notification == null ? 0 : notification.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode) +
(triggers == null ? 0 : triggers.hashCode) +
(devices == null ? 0 : devices.hashCode) +
(programmedMode == null ? 0 : programmedMode.hashCode) +
(geolocalizedMode == null ? 0 : geolocalizedMode.hashCode);
@override
String toString() => 'AlarmModeDetailDTO[id=$id, homeId=$homeId, name=$name, type=$type, activated=$activated, isDefault=$isDefault, notification=$notification, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, devices=$devices, programmedMode=$programmedMode, geolocalizedMode=$geolocalizedMode]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (name != null) {
json[r'name'] = name;
}
if (type != null) {
json[r'type'] = type;
}
if (activated != null) {
json[r'activated'] = activated;
}
if (isDefault != null) {
json[r'isDefault'] = isDefault;
}
if (notification != null) {
json[r'notification'] = notification;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
}
if (updatedDate != null) {
json[r'updatedDate'] = updatedDate.toUtc().toIso8601String();
}
if (triggers != null) {
json[r'triggers'] = triggers;
}
if (devices != null) {
json[r'devices'] = devices;
}
if (programmedMode != null) {
json[r'programmedMode'] = programmedMode;
}
if (geolocalizedMode != null) {
json[r'geolocalizedMode'] = geolocalizedMode;
}
return json;
}
/// Returns a new [AlarmModeDetailDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmModeDetailDTO fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmModeDetailDTO(
id: json[r'id'],
homeId: json[r'homeId'],
name: json[r'name'],
type: AlarmType.fromJson(json[r'type']),
activated: json[r'activated'],
isDefault: json[r'isDefault'],
notification: json[r'notification'],
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),
updatedDate: json[r'updatedDate'] == null
? null
: DateTime.parse(json[r'updatedDate']),
triggers: Trigger.listFromJson(json[r'triggers']),
devices: DeviceDetailDTO.listFromJson(json[r'devices']),
programmedMode: OneOfProgrammedMode.fromJson(json[r'programmedMode']),
geolocalizedMode: OneOfGeolocalizedMode.fromJson(json[r'geolocalizedMode']),
);
static List<AlarmModeDetailDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmModeDetailDTO>[]
: json.map((v) => AlarmModeDetailDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmModeDetailDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmModeDetailDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmModeDetailDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmModeDetailDTO-objects as value to a dart map
static Map<String, List<AlarmModeDetailDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmModeDetailDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmModeDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,98 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmModeDetailDTOAllOf {
/// Returns a new [AlarmModeDetailDTOAllOf] instance.
AlarmModeDetailDTOAllOf({
this.triggers,
this.devices,
this.programmedMode,
this.geolocalizedMode,
});
List<Trigger> triggers;
List<DeviceDetailDTO> devices;
OneOfProgrammedMode programmedMode;
OneOfGeolocalizedMode geolocalizedMode;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmModeDetailDTOAllOf &&
other.triggers == triggers &&
other.devices == devices &&
other.programmedMode == programmedMode &&
other.geolocalizedMode == geolocalizedMode;
@override
int get hashCode =>
(triggers == null ? 0 : triggers.hashCode) +
(devices == null ? 0 : devices.hashCode) +
(programmedMode == null ? 0 : programmedMode.hashCode) +
(geolocalizedMode == null ? 0 : geolocalizedMode.hashCode);
@override
String toString() => 'AlarmModeDetailDTOAllOf[triggers=$triggers, devices=$devices, programmedMode=$programmedMode, geolocalizedMode=$geolocalizedMode]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (triggers != null) {
json[r'triggers'] = triggers;
}
if (devices != null) {
json[r'devices'] = devices;
}
if (programmedMode != null) {
json[r'programmedMode'] = programmedMode;
}
if (geolocalizedMode != null) {
json[r'geolocalizedMode'] = geolocalizedMode;
}
return json;
}
/// Returns a new [AlarmModeDetailDTOAllOf] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmModeDetailDTOAllOf fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmModeDetailDTOAllOf(
triggers: Trigger.listFromJson(json[r'triggers']),
devices: DeviceDetailDTO.listFromJson(json[r'devices']),
programmedMode: OneOfProgrammedMode.fromJson(json[r'programmedMode']),
geolocalizedMode: OneOfGeolocalizedMode.fromJson(json[r'geolocalizedMode']),
);
static List<AlarmModeDetailDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmModeDetailDTOAllOf>[]
: json.map((v) => AlarmModeDetailDTOAllOf.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmModeDetailDTOAllOf> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmModeDetailDTOAllOf>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmModeDetailDTOAllOf.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmModeDetailDTOAllOf-objects as value to a dart map
static Map<String, List<AlarmModeDetailDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmModeDetailDTOAllOf>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmModeDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,147 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmModeDTO {
/// Returns a new [AlarmModeDTO] instance.
AlarmModeDTO({
this.id,
this.homeId,
this.name,
this.type,
this.activated,
this.isDefault,
this.notification,
this.createdDate,
this.updatedDate,
});
String id;
String homeId;
String name;
AlarmType type;
bool activated;
bool isDefault;
bool notification;
DateTime createdDate;
DateTime updatedDate;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmModeDTO &&
other.id == id &&
other.homeId == homeId &&
other.name == name &&
other.type == type &&
other.activated == activated &&
other.isDefault == isDefault &&
other.notification == notification &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(name == null ? 0 : name.hashCode) +
(type == null ? 0 : type.hashCode) +
(activated == null ? 0 : activated.hashCode) +
(isDefault == null ? 0 : isDefault.hashCode) +
(notification == null ? 0 : notification.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode);
@override
String toString() => 'AlarmModeDTO[id=$id, homeId=$homeId, name=$name, type=$type, activated=$activated, isDefault=$isDefault, notification=$notification, createdDate=$createdDate, updatedDate=$updatedDate]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (name != null) {
json[r'name'] = name;
}
if (type != null) {
json[r'type'] = type;
}
if (activated != null) {
json[r'activated'] = activated;
}
if (isDefault != null) {
json[r'isDefault'] = isDefault;
}
if (notification != null) {
json[r'notification'] = notification;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
}
if (updatedDate != null) {
json[r'updatedDate'] = updatedDate.toUtc().toIso8601String();
}
return json;
}
/// Returns a new [AlarmModeDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmModeDTO fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmModeDTO(
id: json[r'id'],
homeId: json[r'homeId'],
name: json[r'name'],
type: AlarmType.fromJson(json[r'type']),
activated: json[r'activated'],
isDefault: json[r'isDefault'],
notification: json[r'notification'],
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),
updatedDate: json[r'updatedDate'] == null
? null
: DateTime.parse(json[r'updatedDate']),
);
static List<AlarmModeDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmModeDTO>[]
: json.map((v) => AlarmModeDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmModeDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmModeDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmModeDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmModeDTO-objects as value to a dart map
static Map<String, List<AlarmModeDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmModeDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmModeDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,89 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmTriggered {
/// Returns a new [AlarmTriggered] instance.
AlarmTriggered({
this.alarmModeId,
this.alarmModeName,
this.type,
});
String alarmModeId;
String alarmModeName;
AlarmType type;
@override
bool operator ==(Object other) => identical(this, other) || other is AlarmTriggered &&
other.alarmModeId == alarmModeId &&
other.alarmModeName == alarmModeName &&
other.type == type;
@override
int get hashCode =>
(alarmModeId == null ? 0 : alarmModeId.hashCode) +
(alarmModeName == null ? 0 : alarmModeName.hashCode) +
(type == null ? 0 : type.hashCode);
@override
String toString() => 'AlarmTriggered[alarmModeId=$alarmModeId, alarmModeName=$alarmModeName, type=$type]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (alarmModeId != null) {
json[r'alarmModeId'] = alarmModeId;
}
if (alarmModeName != null) {
json[r'alarmModeName'] = alarmModeName;
}
if (type != null) {
json[r'type'] = type;
}
return json;
}
/// Returns a new [AlarmTriggered] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AlarmTriggered fromJson(Map<String, dynamic> json) => json == null
? null
: AlarmTriggered(
alarmModeId: json[r'alarmModeId'],
alarmModeName: json[r'alarmModeName'],
type: AlarmType.fromJson(json[r'type']),
);
static List<AlarmTriggered> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmTriggered>[]
: json.map((v) => AlarmTriggered.fromJson(v)).toList(growable: true == growable);
static Map<String, AlarmTriggered> mapFromJson(Map<String, dynamic> json) {
final map = <String, AlarmTriggered>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AlarmTriggered.fromJson(v));
}
return map;
}
// maps a json object with a list of AlarmTriggered-objects as value to a dart map
static Map<String, List<AlarmTriggered>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AlarmTriggered>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AlarmTriggered.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,88 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlarmType {
/// Instantiate a new enum with the provided [value].
const AlarmType._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const home = AlarmType._(r'Home');
static const absent = AlarmType._(r'Absent');
static const geolocalized = AlarmType._(r'Geolocalized');
static const programmed = AlarmType._(r'Programmed');
static const desarmed = AlarmType._(r'Desarmed');
static const custom = AlarmType._(r'Custom');
/// List of all possible values in this [enum][AlarmType].
static const values = <AlarmType>[
home,
absent,
geolocalized,
programmed,
desarmed,
custom,
];
static AlarmType fromJson(dynamic value) =>
AlarmTypeTypeTransformer().decode(value);
static List<AlarmType> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AlarmType>[]
: json
.map((value) => AlarmType.fromJson(value))
.toList(growable: true == growable);
}
/// Transformation class that can [encode] an instance of [AlarmType] to String,
/// and [decode] dynamic data back to [AlarmType].
class AlarmTypeTypeTransformer {
const AlarmTypeTypeTransformer._();
factory AlarmTypeTypeTransformer() => _instance ??= AlarmTypeTypeTransformer._();
String encode(AlarmType data) => data.value;
/// Decodes a [dynamic value][data] to a AlarmType.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
AlarmType decode(dynamic data, {bool allowNull}) {
switch (data) {
case r'Home': return AlarmType.home;
case r'Absent': return AlarmType.absent;
case r'Geolocalized': return AlarmType.geolocalized;
case r'Programmed': return AlarmType.programmed;
case r'Desarmed': return AlarmType.desarmed;
case r'Custom': return AlarmType.custom;
default:
if (allowNull == false) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
return null;
}
/// Singleton [AlarmTypeTypeTransformer] instance.
static AlarmTypeTypeTransformer _instance;
}

View File

@ -15,7 +15,7 @@ class AutomationDetailDTO {
this.id,
this.name,
this.active,
this.userId,
this.homeId,
this.createdDate,
this.updatedDate,
this.triggers,
@ -30,7 +30,7 @@ class AutomationDetailDTO {
bool active;
String userId;
String homeId;
DateTime createdDate;
@ -49,7 +49,7 @@ class AutomationDetailDTO {
other.id == id &&
other.name == name &&
other.active == active &&
other.userId == userId &&
other.homeId == homeId &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate &&
other.triggers == triggers &&
@ -62,7 +62,7 @@ class AutomationDetailDTO {
(id == null ? 0 : id.hashCode) +
(name == null ? 0 : name.hashCode) +
(active == null ? 0 : active.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode) +
(triggers == null ? 0 : triggers.hashCode) +
@ -71,7 +71,7 @@ class AutomationDetailDTO {
(devicesIds == null ? 0 : devicesIds.hashCode);
@override
String toString() => 'AutomationDetailDTO[id=$id, name=$name, active=$active, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, devicesIds=$devicesIds]';
String toString() => 'AutomationDetailDTO[id=$id, name=$name, active=$active, homeId=$homeId, createdDate=$createdDate, updatedDate=$updatedDate, triggers=$triggers, conditions=$conditions, actions=$actions, devicesIds=$devicesIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -84,8 +84,8 @@ class AutomationDetailDTO {
if (active != null) {
json[r'active'] = active;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
@ -116,7 +116,7 @@ class AutomationDetailDTO {
id: json[r'id'],
name: json[r'name'],
active: json[r'active'],
userId: json[r'userId'],
homeId: json[r'homeId'],
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),

View File

@ -15,7 +15,7 @@ class AutomationDTO {
this.id,
this.name,
this.active,
this.userId,
this.homeId,
this.createdDate,
this.updatedDate,
});
@ -26,7 +26,7 @@ class AutomationDTO {
bool active;
String userId;
String homeId;
DateTime createdDate;
@ -37,7 +37,7 @@ class AutomationDTO {
other.id == id &&
other.name == name &&
other.active == active &&
other.userId == userId &&
other.homeId == homeId &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate;
@ -46,12 +46,12 @@ class AutomationDTO {
(id == null ? 0 : id.hashCode) +
(name == null ? 0 : name.hashCode) +
(active == null ? 0 : active.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode);
@override
String toString() => 'AutomationDTO[id=$id, name=$name, active=$active, userId=$userId, createdDate=$createdDate, updatedDate=$updatedDate]';
String toString() => 'AutomationDTO[id=$id, name=$name, active=$active, homeId=$homeId, createdDate=$createdDate, updatedDate=$updatedDate]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -64,8 +64,8 @@ class AutomationDTO {
if (active != null) {
json[r'active'] = active;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
@ -84,7 +84,7 @@ class AutomationDTO {
id: json[r'id'],
name: json[r'name'],
active: json[r'active'],
userId: json[r'userId'],
homeId: json[r'homeId'],
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),

View File

@ -0,0 +1,80 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AutomationTriggered {
/// Returns a new [AutomationTriggered] instance.
AutomationTriggered({
this.automationId,
this.automationName,
});
String automationId;
String automationName;
@override
bool operator ==(Object other) => identical(this, other) || other is AutomationTriggered &&
other.automationId == automationId &&
other.automationName == automationName;
@override
int get hashCode =>
(automationId == null ? 0 : automationId.hashCode) +
(automationName == null ? 0 : automationName.hashCode);
@override
String toString() => 'AutomationTriggered[automationId=$automationId, automationName=$automationName]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (automationId != null) {
json[r'automationId'] = automationId;
}
if (automationName != null) {
json[r'automationName'] = automationName;
}
return json;
}
/// Returns a new [AutomationTriggered] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static AutomationTriggered fromJson(Map<String, dynamic> json) => json == null
? null
: AutomationTriggered(
automationId: json[r'automationId'],
automationName: json[r'automationName'],
);
static List<AutomationTriggered> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <AutomationTriggered>[]
: json.map((v) => AutomationTriggered.fromJson(v)).toList(growable: true == growable);
static Map<String, AutomationTriggered> mapFromJson(Map<String, dynamic> json) {
final map = <String, AutomationTriggered>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = AutomationTriggered.fromJson(v));
}
return map;
}
// maps a json object with a list of AutomationTriggered-objects as value to a dart map
static Map<String, List<AutomationTriggered>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<AutomationTriggered>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = AutomationTriggered.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -22,7 +22,7 @@ class Condition {
String deviceId;
AutomationState state;
OneOfAutomationState state;
String startTime;
@ -82,7 +82,7 @@ class Condition {
? null
: Condition(
deviceId: json[r'deviceId'],
state: AutomationState.fromJson(json[r'state']),
state: OneOfAutomationState.fromJson(json[r'state']),
startTime: json[r'startTime'],
endTime: json[r'endTime'],
type: ConditionType.fromJson(json[r'type']),

View File

@ -0,0 +1,140 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CreateOrUpdateHomeDTO {
/// Returns a new [CreateOrUpdateHomeDTO] instance.
CreateOrUpdateHomeDTO({
this.id,
this.name,
this.isAlarm,
this.isDefault,
this.currentAlarmMode,
this.createdDate,
this.updatedDate,
this.usersIds,
});
String id;
String name;
bool isAlarm;
bool isDefault;
OneOfAlarmModeDTO currentAlarmMode;
DateTime createdDate;
DateTime updatedDate;
List<String> usersIds;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateOrUpdateHomeDTO &&
other.id == id &&
other.name == name &&
other.isAlarm == isAlarm &&
other.isDefault == isDefault &&
other.currentAlarmMode == currentAlarmMode &&
other.createdDate == createdDate &&
other.updatedDate == updatedDate &&
other.usersIds == usersIds;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(name == null ? 0 : name.hashCode) +
(isAlarm == null ? 0 : isAlarm.hashCode) +
(isDefault == null ? 0 : isDefault.hashCode) +
(currentAlarmMode == null ? 0 : currentAlarmMode.hashCode) +
(createdDate == null ? 0 : createdDate.hashCode) +
(updatedDate == null ? 0 : updatedDate.hashCode) +
(usersIds == null ? 0 : usersIds.hashCode);
@override
String toString() => 'CreateOrUpdateHomeDTO[id=$id, name=$name, isAlarm=$isAlarm, isDefault=$isDefault, currentAlarmMode=$currentAlarmMode, createdDate=$createdDate, updatedDate=$updatedDate, usersIds=$usersIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (name != null) {
json[r'name'] = name;
}
if (isAlarm != null) {
json[r'isAlarm'] = isAlarm;
}
if (isDefault != null) {
json[r'isDefault'] = isDefault;
}
if (currentAlarmMode != null) {
json[r'currentAlarmMode'] = currentAlarmMode;
}
if (createdDate != null) {
json[r'createdDate'] = createdDate.toUtc().toIso8601String();
}
if (updatedDate != null) {
json[r'updatedDate'] = updatedDate.toUtc().toIso8601String();
}
if (usersIds != null) {
json[r'usersIds'] = usersIds;
}
return json;
}
/// Returns a new [CreateOrUpdateHomeDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static CreateOrUpdateHomeDTO fromJson(Map<String, dynamic> json) => json == null
? null
: CreateOrUpdateHomeDTO(
id: json[r'id'],
name: json[r'name'],
isAlarm: json[r'isAlarm'],
isDefault: json[r'isDefault'],
currentAlarmMode: OneOfAlarmModeDTO.fromJson(json[r'currentAlarmMode']),
createdDate: json[r'createdDate'] == null
? null
: DateTime.parse(json[r'createdDate']),
updatedDate: json[r'updatedDate'] == null
? null
: DateTime.parse(json[r'updatedDate']),
usersIds: json[r'usersIds'] == null
? null
: (json[r'usersIds'] as List).cast<String>(),
);
static List<CreateOrUpdateHomeDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <CreateOrUpdateHomeDTO>[]
: json.map((v) => CreateOrUpdateHomeDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, CreateOrUpdateHomeDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, CreateOrUpdateHomeDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = CreateOrUpdateHomeDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of CreateOrUpdateHomeDTO-objects as value to a dart map
static Map<String, List<CreateOrUpdateHomeDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<CreateOrUpdateHomeDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = CreateOrUpdateHomeDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,73 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CreateOrUpdateHomeDTOAllOf {
/// Returns a new [CreateOrUpdateHomeDTOAllOf] instance.
CreateOrUpdateHomeDTOAllOf({
this.usersIds,
});
List<String> usersIds;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateOrUpdateHomeDTOAllOf &&
other.usersIds == usersIds;
@override
int get hashCode =>
(usersIds == null ? 0 : usersIds.hashCode);
@override
String toString() => 'CreateOrUpdateHomeDTOAllOf[usersIds=$usersIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (usersIds != null) {
json[r'usersIds'] = usersIds;
}
return json;
}
/// Returns a new [CreateOrUpdateHomeDTOAllOf] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static CreateOrUpdateHomeDTOAllOf fromJson(Map<String, dynamic> json) => json == null
? null
: CreateOrUpdateHomeDTOAllOf(
usersIds: json[r'usersIds'] == null
? null
: (json[r'usersIds'] as List).cast<String>(),
);
static List<CreateOrUpdateHomeDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <CreateOrUpdateHomeDTOAllOf>[]
: json.map((v) => CreateOrUpdateHomeDTOAllOf.fromJson(v)).toList(growable: true == growable);
static Map<String, CreateOrUpdateHomeDTOAllOf> mapFromJson(Map<String, dynamic> json) {
final map = <String, CreateOrUpdateHomeDTOAllOf>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = CreateOrUpdateHomeDTOAllOf.fromJson(v));
}
return map;
}
// maps a json object with a list of CreateOrUpdateHomeDTOAllOf-objects as value to a dart map
static Map<String, List<CreateOrUpdateHomeDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<CreateOrUpdateHomeDTOAllOf>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = CreateOrUpdateHomeDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -13,17 +13,16 @@ class DeviceDetailDTO {
/// Returns a new [DeviceDetailDTO] instance.
DeviceDetailDTO({
this.id,
this.userId,
this.homeId,
this.description,
this.name,
this.model,
this.type,
this.status,
this.connectionStatus,
this.locationId,
this.roomId,
this.providerId,
this.providerName,
this.location,
this.lastStateDate,
this.battery,
this.batteryStatus,
@ -44,7 +43,7 @@ class DeviceDetailDTO {
String id;
String userId;
String homeId;
String description;
@ -58,14 +57,12 @@ class DeviceDetailDTO {
ConnectionStatus connectionStatus;
String locationId;
String roomId;
String providerId;
String providerName;
PlaceDTO location;
DateTime lastStateDate;
bool battery;
@ -101,17 +98,16 @@ class DeviceDetailDTO {
@override
bool operator ==(Object other) => identical(this, other) || other is DeviceDetailDTO &&
other.id == id &&
other.userId == userId &&
other.homeId == homeId &&
other.description == description &&
other.name == name &&
other.model == model &&
other.type == type &&
other.status == status &&
other.connectionStatus == connectionStatus &&
other.locationId == locationId &&
other.roomId == roomId &&
other.providerId == providerId &&
other.providerName == providerName &&
other.location == location &&
other.lastStateDate == lastStateDate &&
other.battery == battery &&
other.batteryStatus == batteryStatus &&
@ -132,17 +128,16 @@ class DeviceDetailDTO {
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(description == null ? 0 : description.hashCode) +
(name == null ? 0 : name.hashCode) +
(model == null ? 0 : model.hashCode) +
(type == null ? 0 : type.hashCode) +
(status == null ? 0 : status.hashCode) +
(connectionStatus == null ? 0 : connectionStatus.hashCode) +
(locationId == null ? 0 : locationId.hashCode) +
(roomId == null ? 0 : roomId.hashCode) +
(providerId == null ? 0 : providerId.hashCode) +
(providerName == null ? 0 : providerName.hashCode) +
(location == null ? 0 : location.hashCode) +
(lastStateDate == null ? 0 : lastStateDate.hashCode) +
(battery == null ? 0 : battery.hashCode) +
(batteryStatus == null ? 0 : batteryStatus.hashCode) +
@ -161,15 +156,15 @@ class DeviceDetailDTO {
(supportedOperations == null ? 0 : supportedOperations.hashCode);
@override
String toString() => 'DeviceDetailDTO[id=$id, userId=$userId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, locationId=$locationId, providerId=$providerId, providerName=$providerName, location=$location, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus, firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations]';
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, battery=$battery, batteryStatus=$batteryStatus, firmwareVersion=$firmwareVersion, hardwareVersion=$hardwareVersion, port=$port, meansOfCommunications=$meansOfCommunications, createdDate=$createdDate, updatedDate=$updatedDate, lastState=$lastState, ipAddress=$ipAddress, serviceIdentification=$serviceIdentification, manufacturerName=$manufacturerName, groupIds=$groupIds, properties=$properties, supportedOperations=$supportedOperations]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (description != null) {
json[r'description'] = description;
@ -189,8 +184,8 @@ class DeviceDetailDTO {
if (connectionStatus != null) {
json[r'connectionStatus'] = connectionStatus;
}
if (locationId != null) {
json[r'locationId'] = locationId;
if (roomId != null) {
json[r'roomId'] = roomId;
}
if (providerId != null) {
json[r'providerId'] = providerId;
@ -198,9 +193,6 @@ class DeviceDetailDTO {
if (providerName != null) {
json[r'providerName'] = providerName;
}
if (location != null) {
json[r'location'] = location;
}
if (lastStateDate != null) {
json[r'lastStateDate'] = lastStateDate.toUtc().toIso8601String();
}
@ -258,17 +250,16 @@ class DeviceDetailDTO {
? null
: DeviceDetailDTO(
id: json[r'id'],
userId: json[r'userId'],
homeId: json[r'homeId'],
description: json[r'description'],
name: json[r'name'],
model: json[r'model'],
type: DeviceType.fromJson(json[r'type']),
status: json[r'status'],
connectionStatus: ConnectionStatus.fromJson(json[r'connectionStatus']),
locationId: json[r'locationId'],
roomId: json[r'roomId'],
providerId: json[r'providerId'],
providerName: json[r'providerName'],
location: PlaceDTO.fromJson(json[r'location']),
lastStateDate: json[r'lastStateDate'] == null
? null
: DateTime.parse(json[r'lastStateDate']),

View File

@ -0,0 +1,98 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeviceState {
/// Returns a new [DeviceState] instance.
DeviceState({
this.deviceId,
this.deviceName,
this.message,
this.deviceType,
});
String deviceId;
String deviceName;
String message;
DeviceType deviceType;
@override
bool operator ==(Object other) => identical(this, other) || other is DeviceState &&
other.deviceId == deviceId &&
other.deviceName == deviceName &&
other.message == message &&
other.deviceType == deviceType;
@override
int get hashCode =>
(deviceId == null ? 0 : deviceId.hashCode) +
(deviceName == null ? 0 : deviceName.hashCode) +
(message == null ? 0 : message.hashCode) +
(deviceType == null ? 0 : deviceType.hashCode);
@override
String toString() => 'DeviceState[deviceId=$deviceId, deviceName=$deviceName, message=$message, deviceType=$deviceType]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (deviceId != null) {
json[r'deviceId'] = deviceId;
}
if (deviceName != null) {
json[r'deviceName'] = deviceName;
}
if (message != null) {
json[r'message'] = message;
}
if (deviceType != null) {
json[r'deviceType'] = deviceType;
}
return json;
}
/// Returns a new [DeviceState] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static DeviceState fromJson(Map<String, dynamic> json) => json == null
? null
: DeviceState(
deviceId: json[r'deviceId'],
deviceName: json[r'deviceName'],
message: json[r'message'],
deviceType: DeviceType.fromJson(json[r'deviceType']),
);
static List<DeviceState> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <DeviceState>[]
: json.map((v) => DeviceState.fromJson(v)).toList(growable: true == growable);
static Map<String, DeviceState> mapFromJson(Map<String, dynamic> json) {
final map = <String, DeviceState>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = DeviceState.fromJson(v));
}
return map;
}
// maps a json object with a list of DeviceState-objects as value to a dart map
static Map<String, List<DeviceState>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<DeviceState>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = DeviceState.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -13,17 +13,16 @@ class DeviceSummaryDTO {
/// Returns a new [DeviceSummaryDTO] instance.
DeviceSummaryDTO({
this.id,
this.userId,
this.homeId,
this.description,
this.name,
this.model,
this.type,
this.status,
this.connectionStatus,
this.locationId,
this.roomId,
this.providerId,
this.providerName,
this.location,
this.lastStateDate,
this.battery,
this.batteryStatus,
@ -31,7 +30,7 @@ class DeviceSummaryDTO {
String id;
String userId;
String homeId;
String description;
@ -45,14 +44,12 @@ class DeviceSummaryDTO {
ConnectionStatus connectionStatus;
String locationId;
String roomId;
String providerId;
String providerName;
PlaceDTO location;
DateTime lastStateDate;
bool battery;
@ -62,17 +59,16 @@ class DeviceSummaryDTO {
@override
bool operator ==(Object other) => identical(this, other) || other is DeviceSummaryDTO &&
other.id == id &&
other.userId == userId &&
other.homeId == homeId &&
other.description == description &&
other.name == name &&
other.model == model &&
other.type == type &&
other.status == status &&
other.connectionStatus == connectionStatus &&
other.locationId == locationId &&
other.roomId == roomId &&
other.providerId == providerId &&
other.providerName == providerName &&
other.location == location &&
other.lastStateDate == lastStateDate &&
other.battery == battery &&
other.batteryStatus == batteryStatus;
@ -80,31 +76,30 @@ class DeviceSummaryDTO {
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(description == null ? 0 : description.hashCode) +
(name == null ? 0 : name.hashCode) +
(model == null ? 0 : model.hashCode) +
(type == null ? 0 : type.hashCode) +
(status == null ? 0 : status.hashCode) +
(connectionStatus == null ? 0 : connectionStatus.hashCode) +
(locationId == null ? 0 : locationId.hashCode) +
(roomId == null ? 0 : roomId.hashCode) +
(providerId == null ? 0 : providerId.hashCode) +
(providerName == null ? 0 : providerName.hashCode) +
(location == null ? 0 : location.hashCode) +
(lastStateDate == null ? 0 : lastStateDate.hashCode) +
(battery == null ? 0 : battery.hashCode) +
(batteryStatus == null ? 0 : batteryStatus.hashCode);
@override
String toString() => 'DeviceSummaryDTO[id=$id, userId=$userId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, locationId=$locationId, providerId=$providerId, providerName=$providerName, location=$location, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus]';
String toString() => 'DeviceSummaryDTO[id=$id, homeId=$homeId, description=$description, name=$name, model=$model, type=$type, status=$status, connectionStatus=$connectionStatus, roomId=$roomId, providerId=$providerId, providerName=$providerName, lastStateDate=$lastStateDate, battery=$battery, batteryStatus=$batteryStatus]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (description != null) {
json[r'description'] = description;
@ -124,8 +119,8 @@ class DeviceSummaryDTO {
if (connectionStatus != null) {
json[r'connectionStatus'] = connectionStatus;
}
if (locationId != null) {
json[r'locationId'] = locationId;
if (roomId != null) {
json[r'roomId'] = roomId;
}
if (providerId != null) {
json[r'providerId'] = providerId;
@ -133,9 +128,6 @@ class DeviceSummaryDTO {
if (providerName != null) {
json[r'providerName'] = providerName;
}
if (location != null) {
json[r'location'] = location;
}
if (lastStateDate != null) {
json[r'lastStateDate'] = lastStateDate.toUtc().toIso8601String();
}
@ -154,17 +146,16 @@ class DeviceSummaryDTO {
? null
: DeviceSummaryDTO(
id: json[r'id'],
userId: json[r'userId'],
homeId: json[r'homeId'],
description: json[r'description'],
name: json[r'name'],
model: json[r'model'],
type: DeviceType.fromJson(json[r'type']),
status: json[r'status'],
connectionStatus: ConnectionStatus.fromJson(json[r'connectionStatus']),
locationId: json[r'locationId'],
roomId: json[r'roomId'],
providerId: json[r'providerId'],
providerName: json[r'providerName'],
location: PlaceDTO.fromJson(json[r'location']),
lastStateDate: json[r'lastStateDate'] == null
? null
: DateTime.parse(json[r'lastStateDate']),

View File

@ -14,7 +14,7 @@ class ElectricityProduction {
ElectricityProduction({
this.id,
this.deviceId,
this.userId,
this.homeId,
this.watt,
this.ampere,
this.timestamp,
@ -24,7 +24,7 @@ class ElectricityProduction {
String deviceId;
String userId;
String homeId;
double watt;
@ -36,7 +36,7 @@ class ElectricityProduction {
bool operator ==(Object other) => identical(this, other) || other is ElectricityProduction &&
other.id == id &&
other.deviceId == deviceId &&
other.userId == userId &&
other.homeId == homeId &&
other.watt == watt &&
other.ampere == ampere &&
other.timestamp == timestamp;
@ -45,13 +45,13 @@ class ElectricityProduction {
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(deviceId == null ? 0 : deviceId.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(watt == null ? 0 : watt.hashCode) +
(ampere == null ? 0 : ampere.hashCode) +
(timestamp == null ? 0 : timestamp.hashCode);
@override
String toString() => 'ElectricityProduction[id=$id, deviceId=$deviceId, userId=$userId, watt=$watt, ampere=$ampere, timestamp=$timestamp]';
String toString() => 'ElectricityProduction[id=$id, deviceId=$deviceId, homeId=$homeId, watt=$watt, ampere=$ampere, timestamp=$timestamp]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -61,8 +61,8 @@ class ElectricityProduction {
if (deviceId != null) {
json[r'deviceId'] = deviceId;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (watt != null) {
json[r'watt'] = watt;
@ -83,7 +83,7 @@ class ElectricityProduction {
: ElectricityProduction(
id: json[r'id'],
deviceId: json[r'deviceId'],
userId: json[r'userId'],
homeId: json[r'homeId'],
watt: json[r'watt'],
ampere: json[r'ampere'],
timestamp: json[r'timestamp'] == null

View File

@ -0,0 +1,136 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class EventDetailDTO {
/// Returns a new [EventDetailDTO] instance.
EventDetailDTO({
this.id,
this.homeId,
this.date,
this.type,
this.roomId,
this.deviceState,
this.automationTriggered,
this.alarmTriggered,
});
String id;
String homeId;
DateTime date;
EventType type;
String roomId;
OneOfDeviceState deviceState;
OneOfAutomationTriggered automationTriggered;
OneOfAlarmTriggered alarmTriggered;
@override
bool operator ==(Object other) => identical(this, other) || other is EventDetailDTO &&
other.id == id &&
other.homeId == homeId &&
other.date == date &&
other.type == type &&
other.roomId == roomId &&
other.deviceState == deviceState &&
other.automationTriggered == automationTriggered &&
other.alarmTriggered == alarmTriggered;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(date == null ? 0 : date.hashCode) +
(type == null ? 0 : type.hashCode) +
(roomId == null ? 0 : roomId.hashCode) +
(deviceState == null ? 0 : deviceState.hashCode) +
(automationTriggered == null ? 0 : automationTriggered.hashCode) +
(alarmTriggered == null ? 0 : alarmTriggered.hashCode);
@override
String toString() => 'EventDetailDTO[id=$id, homeId=$homeId, date=$date, type=$type, roomId=$roomId, deviceState=$deviceState, automationTriggered=$automationTriggered, alarmTriggered=$alarmTriggered]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (date != null) {
json[r'date'] = date.toUtc().toIso8601String();
}
if (type != null) {
json[r'type'] = type;
}
if (roomId != null) {
json[r'roomId'] = roomId;
}
if (deviceState != null) {
json[r'deviceState'] = deviceState;
}
if (automationTriggered != null) {
json[r'automationTriggered'] = automationTriggered;
}
if (alarmTriggered != null) {
json[r'alarmTriggered'] = alarmTriggered;
}
return json;
}
/// Returns a new [EventDetailDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static EventDetailDTO fromJson(Map<String, dynamic> json) => json == null
? null
: EventDetailDTO(
id: json[r'id'],
homeId: json[r'homeId'],
date: json[r'date'] == null
? null
: DateTime.parse(json[r'date']),
type: EventType.fromJson(json[r'type']),
roomId: json[r'roomId'],
deviceState: OneOfDeviceState.fromJson(json[r'deviceState']),
automationTriggered: OneOfAutomationTriggered.fromJson(json[r'automationTriggered']),
alarmTriggered: OneOfAlarmTriggered.fromJson(json[r'alarmTriggered']),
);
static List<EventDetailDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <EventDetailDTO>[]
: json.map((v) => EventDetailDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, EventDetailDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, EventDetailDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = EventDetailDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of EventDetailDTO-objects as value to a dart map
static Map<String, List<EventDetailDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<EventDetailDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = EventDetailDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,89 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class EventDetailDTOAllOf {
/// Returns a new [EventDetailDTOAllOf] instance.
EventDetailDTOAllOf({
this.deviceState,
this.automationTriggered,
this.alarmTriggered,
});
OneOfDeviceState deviceState;
OneOfAutomationTriggered automationTriggered;
OneOfAlarmTriggered alarmTriggered;
@override
bool operator ==(Object other) => identical(this, other) || other is EventDetailDTOAllOf &&
other.deviceState == deviceState &&
other.automationTriggered == automationTriggered &&
other.alarmTriggered == alarmTriggered;
@override
int get hashCode =>
(deviceState == null ? 0 : deviceState.hashCode) +
(automationTriggered == null ? 0 : automationTriggered.hashCode) +
(alarmTriggered == null ? 0 : alarmTriggered.hashCode);
@override
String toString() => 'EventDetailDTOAllOf[deviceState=$deviceState, automationTriggered=$automationTriggered, alarmTriggered=$alarmTriggered]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (deviceState != null) {
json[r'deviceState'] = deviceState;
}
if (automationTriggered != null) {
json[r'automationTriggered'] = automationTriggered;
}
if (alarmTriggered != null) {
json[r'alarmTriggered'] = alarmTriggered;
}
return json;
}
/// Returns a new [EventDetailDTOAllOf] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static EventDetailDTOAllOf fromJson(Map<String, dynamic> json) => json == null
? null
: EventDetailDTOAllOf(
deviceState: OneOfDeviceState.fromJson(json[r'deviceState']),
automationTriggered: OneOfAutomationTriggered.fromJson(json[r'automationTriggered']),
alarmTriggered: OneOfAlarmTriggered.fromJson(json[r'alarmTriggered']),
);
static List<EventDetailDTOAllOf> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <EventDetailDTOAllOf>[]
: json.map((v) => EventDetailDTOAllOf.fromJson(v)).toList(growable: true == growable);
static Map<String, EventDetailDTOAllOf> mapFromJson(Map<String, dynamic> json) {
final map = <String, EventDetailDTOAllOf>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = EventDetailDTOAllOf.fromJson(v));
}
return map;
}
// maps a json object with a list of EventDetailDTOAllOf-objects as value to a dart map
static Map<String, List<EventDetailDTOAllOf>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<EventDetailDTOAllOf>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = EventDetailDTOAllOf.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,109 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class EventDTO {
/// Returns a new [EventDTO] instance.
EventDTO({
this.id,
this.homeId,
this.date,
this.type,
this.roomId,
});
String id;
String homeId;
DateTime date;
EventType type;
String roomId;
@override
bool operator ==(Object other) => identical(this, other) || other is EventDTO &&
other.id == id &&
other.homeId == homeId &&
other.date == date &&
other.type == type &&
other.roomId == roomId;
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(date == null ? 0 : date.hashCode) +
(type == null ? 0 : type.hashCode) +
(roomId == null ? 0 : roomId.hashCode);
@override
String toString() => 'EventDTO[id=$id, homeId=$homeId, date=$date, type=$type, roomId=$roomId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (date != null) {
json[r'date'] = date.toUtc().toIso8601String();
}
if (type != null) {
json[r'type'] = type;
}
if (roomId != null) {
json[r'roomId'] = roomId;
}
return json;
}
/// Returns a new [EventDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static EventDTO fromJson(Map<String, dynamic> json) => json == null
? null
: EventDTO(
id: json[r'id'],
homeId: json[r'homeId'],
date: json[r'date'] == null
? null
: DateTime.parse(json[r'date']),
type: EventType.fromJson(json[r'type']),
roomId: json[r'roomId'],
);
static List<EventDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <EventDTO>[]
: json.map((v) => EventDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, EventDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, EventDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = EventDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of EventDTO-objects as value to a dart map
static Map<String, List<EventDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<EventDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = EventDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -0,0 +1,79 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class EventType {
/// Instantiate a new enum with the provided [value].
const EventType._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const deviceState = EventType._(r'DeviceState');
static const automationTriggered = EventType._(r'AutomationTriggered');
static const alarmTriggered = EventType._(r'AlarmTriggered');
/// List of all possible values in this [enum][EventType].
static const values = <EventType>[
deviceState,
automationTriggered,
alarmTriggered,
];
static EventType fromJson(dynamic value) =>
EventTypeTypeTransformer().decode(value);
static List<EventType> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <EventType>[]
: json
.map((value) => EventType.fromJson(value))
.toList(growable: true == growable);
}
/// Transformation class that can [encode] an instance of [EventType] to String,
/// and [decode] dynamic data back to [EventType].
class EventTypeTypeTransformer {
const EventTypeTypeTransformer._();
factory EventTypeTypeTransformer() => _instance ??= EventTypeTypeTransformer._();
String encode(EventType data) => data.value;
/// Decodes a [dynamic value][data] to a EventType.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
EventType decode(dynamic data, {bool allowNull}) {
switch (data) {
case r'DeviceState': return EventType.deviceState;
case r'AutomationTriggered': return EventType.automationTriggered;
case r'AlarmTriggered': return EventType.alarmTriggered;
default:
if (allowNull == false) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
return null;
}
/// Singleton [EventTypeTypeTransformer] instance.
static EventTypeTypeTransformer _instance;
}

View File

@ -0,0 +1,98 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class GeolocalizedMode {
/// Returns a new [GeolocalizedMode] instance.
GeolocalizedMode({
this.latitude,
this.longitude,
this.homeMode,
this.absentMode,
});
String latitude;
String longitude;
OneOfAlarmMode homeMode;
OneOfAlarmMode absentMode;
@override
bool operator ==(Object other) => identical(this, other) || other is GeolocalizedMode &&
other.latitude == latitude &&
other.longitude == longitude &&
other.homeMode == homeMode &&
other.absentMode == absentMode;
@override
int get hashCode =>
(latitude == null ? 0 : latitude.hashCode) +
(longitude == null ? 0 : longitude.hashCode) +
(homeMode == null ? 0 : homeMode.hashCode) +
(absentMode == null ? 0 : absentMode.hashCode);
@override
String toString() => 'GeolocalizedMode[latitude=$latitude, longitude=$longitude, homeMode=$homeMode, absentMode=$absentMode]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (latitude != null) {
json[r'latitude'] = latitude;
}
if (longitude != null) {
json[r'longitude'] = longitude;
}
if (homeMode != null) {
json[r'homeMode'] = homeMode;
}
if (absentMode != null) {
json[r'absentMode'] = absentMode;
}
return json;
}
/// Returns a new [GeolocalizedMode] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static GeolocalizedMode fromJson(Map<String, dynamic> json) => json == null
? null
: GeolocalizedMode(
latitude: json[r'latitude'],
longitude: json[r'longitude'],
homeMode: OneOfAlarmMode.fromJson(json[r'homeMode']),
absentMode: OneOfAlarmMode.fromJson(json[r'absentMode']),
);
static List<GeolocalizedMode> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <GeolocalizedMode>[]
: json.map((v) => GeolocalizedMode.fromJson(v)).toList(growable: true == growable);
static Map<String, GeolocalizedMode> mapFromJson(Map<String, dynamic> json) {
final map = <String, GeolocalizedMode>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = GeolocalizedMode.fromJson(v));
}
return map;
}
// maps a json object with a list of GeolocalizedMode-objects as value to a dart map
static Map<String, List<GeolocalizedMode>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<GeolocalizedMode>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = GeolocalizedMode.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -13,7 +13,7 @@ class GroupCreateOrUpdateDetailDTO {
/// Returns a new [GroupCreateOrUpdateDetailDTO] instance.
GroupCreateOrUpdateDetailDTO({
this.id,
this.userId,
this.homeId,
this.name,
this.type,
this.isAlarm,
@ -22,7 +22,7 @@ class GroupCreateOrUpdateDetailDTO {
String id;
String userId;
String homeId;
String name;
@ -35,7 +35,7 @@ class GroupCreateOrUpdateDetailDTO {
@override
bool operator ==(Object other) => identical(this, other) || other is GroupCreateOrUpdateDetailDTO &&
other.id == id &&
other.userId == userId &&
other.homeId == homeId &&
other.name == name &&
other.type == type &&
other.isAlarm == isAlarm &&
@ -44,22 +44,22 @@ class GroupCreateOrUpdateDetailDTO {
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(name == null ? 0 : name.hashCode) +
(type == null ? 0 : type.hashCode) +
(isAlarm == null ? 0 : isAlarm.hashCode) +
(deviceIds == null ? 0 : deviceIds.hashCode);
@override
String toString() => 'GroupCreateOrUpdateDetailDTO[id=$id, userId=$userId, name=$name, type=$type, isAlarm=$isAlarm, deviceIds=$deviceIds]';
String toString() => 'GroupCreateOrUpdateDetailDTO[id=$id, homeId=$homeId, name=$name, type=$type, isAlarm=$isAlarm, deviceIds=$deviceIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (name != null) {
json[r'name'] = name;
@ -82,7 +82,7 @@ class GroupCreateOrUpdateDetailDTO {
? null
: GroupCreateOrUpdateDetailDTO(
id: json[r'id'],
userId: json[r'userId'],
homeId: json[r'homeId'],
name: json[r'name'],
type: json[r'type'],
isAlarm: json[r'isAlarm'],

View File

@ -13,7 +13,7 @@ class GroupDetailDTO {
/// Returns a new [GroupDetailDTO] instance.
GroupDetailDTO({
this.id,
this.userId,
this.homeId,
this.name,
this.type,
this.isAlarm,
@ -24,7 +24,7 @@ class GroupDetailDTO {
String id;
String userId;
String homeId;
String name;
@ -41,7 +41,7 @@ class GroupDetailDTO {
@override
bool operator ==(Object other) => identical(this, other) || other is GroupDetailDTO &&
other.id == id &&
other.userId == userId &&
other.homeId == homeId &&
other.name == name &&
other.type == type &&
other.isAlarm == isAlarm &&
@ -52,7 +52,7 @@ class GroupDetailDTO {
@override
int get hashCode =>
(id == null ? 0 : id.hashCode) +
(userId == null ? 0 : userId.hashCode) +
(homeId == null ? 0 : homeId.hashCode) +
(name == null ? 0 : name.hashCode) +
(type == null ? 0 : type.hashCode) +
(isAlarm == null ? 0 : isAlarm.hashCode) +
@ -61,15 +61,15 @@ class GroupDetailDTO {
(devices == null ? 0 : devices.hashCode);
@override
String toString() => 'GroupDetailDTO[id=$id, userId=$userId, name=$name, type=$type, isAlarm=$isAlarm, createdDate=$createdDate, updatedDate=$updatedDate, devices=$devices]';
String toString() => 'GroupDetailDTO[id=$id, homeId=$homeId, name=$name, type=$type, isAlarm=$isAlarm, createdDate=$createdDate, updatedDate=$updatedDate, devices=$devices]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (id != null) {
json[r'id'] = id;
}
if (userId != null) {
json[r'userId'] = userId;
if (homeId != null) {
json[r'homeId'] = homeId;
}
if (name != null) {
json[r'name'] = name;
@ -98,7 +98,7 @@ class GroupDetailDTO {
? null
: GroupDetailDTO(
id: json[r'id'],
userId: json[r'userId'],
homeId: json[r'homeId'],
name: json[r'name'],
type: json[r'type'],
isAlarm: json[r'isAlarm'],

Some files were not shown because too many files have changed in this diff Show More