[tado] Remove dependency on Swagger CodeGen (#16836)

* Stop using Swagger Codegen

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Andrew Fiddian-Green 2024-06-14 20:02:06 +01:00 committed by Ciprian Pascu
parent b079e09b35
commit 8479dad229
79 changed files with 6590 additions and 178 deletions

View File

@ -14,47 +14,4 @@
<name>openHAB Add-ons :: Bundles :: Tado Binding</name>
<pluginRepositories>
<pluginRepository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<!-- when upgrading, carefully compare generated source files in
target/generated-sources/swagger/src/main/java/org/openhab/binding/tado/internal/api
as 2.4. series created code which lead to runtime errors in the past -->
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/api/tado-api.yaml</inputSpec>
<language>com.github.dfrommi.swagger.OpenHABClientGenerator</language>
<apiPackage>org.openhab.binding.tado.internal.api.client</apiPackage>
<modelPackage>org.openhab.binding.tado.internal.api.model</modelPackage>
<invokerPackage>org.openhab.binding.tado.internal.api</invokerPackage>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.github.dfrommi</groupId>
<artifactId>swagger-codegen-openhab</artifactId>
<version>0.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

View File

@ -18,12 +18,12 @@ import java.util.stream.Stream;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.api.model.AcModeCapabilities;
import org.openhab.binding.tado.internal.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.internal.api.model.ControlDevice;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.Zone;
import org.openhab.binding.tado.swagger.codegen.api.model.AcModeCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.ControlDevice;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.Zone;
/**
* The {@link CapabilitiesSupport} class checks which type of channels are needed in a thing that is to be built around

View File

@ -21,15 +21,15 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.HorizontalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.OperationMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.Overlay;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.internal.builder.TerminationConditionBuilder;
import org.openhab.binding.tado.internal.builder.ZoneSettingsBuilder;
import org.openhab.binding.tado.internal.builder.ZoneStateProvider;
import org.openhab.binding.tado.internal.handler.TadoZoneHandler;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.Overlay;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionType;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.binding.ThingHandler;

View File

@ -21,26 +21,26 @@ import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.OperationMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.TemperatureUnit;
import org.openhab.binding.tado.internal.api.model.ACFanLevel;
import org.openhab.binding.tado.internal.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.internal.api.model.ACVerticalSwing;
import org.openhab.binding.tado.internal.api.model.AcFanSpeed;
import org.openhab.binding.tado.internal.api.model.AcPowerDataPoint;
import org.openhab.binding.tado.internal.api.model.ActivityDataPoints;
import org.openhab.binding.tado.internal.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.HeatingZoneSetting;
import org.openhab.binding.tado.internal.api.model.HotWaterZoneSetting;
import org.openhab.binding.tado.internal.api.model.Overlay;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.internal.api.model.PercentageDataPoint;
import org.openhab.binding.tado.internal.api.model.Power;
import org.openhab.binding.tado.internal.api.model.SensorDataPoints;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.TemperatureDataPoint;
import org.openhab.binding.tado.internal.api.model.TemperatureObject;
import org.openhab.binding.tado.internal.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.internal.api.model.ZoneState;
import org.openhab.binding.tado.swagger.codegen.api.model.ACFanLevel;
import org.openhab.binding.tado.swagger.codegen.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.ACVerticalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.AcFanSpeed;
import org.openhab.binding.tado.swagger.codegen.api.model.AcPowerDataPoint;
import org.openhab.binding.tado.swagger.codegen.api.model.ActivityDataPoints;
import org.openhab.binding.tado.swagger.codegen.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HeatingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HotWaterZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.Overlay;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.swagger.codegen.api.model.PercentageDataPoint;
import org.openhab.binding.tado.swagger.codegen.api.model.Power;
import org.openhab.binding.tado.swagger.codegen.api.model.SensorDataPoints;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureDataPoint;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureObject;
import org.openhab.binding.tado.swagger.codegen.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.ZoneState;
import org.openhab.core.library.types.DateTimeType;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.library.types.OnOffType;

View File

@ -13,9 +13,10 @@
package org.openhab.binding.tado.internal.api;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.tado.internal.api.auth.Authorizer;
import org.openhab.binding.tado.internal.api.auth.OAuthAuthorizer;
import org.openhab.binding.tado.internal.api.client.HomeApi;
import org.openhab.binding.tado.swagger.codegen.api.GsonBuilderFactory;
import org.openhab.binding.tado.swagger.codegen.api.auth.Authorizer;
import org.openhab.binding.tado.swagger.codegen.api.auth.OAuthAuthorizer;
import org.openhab.binding.tado.swagger.codegen.api.client.HomeApi;
import com.google.gson.Gson;

View File

@ -20,22 +20,22 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.HorizontalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.TemperatureUnit;
import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.api.model.ACFanLevel;
import org.openhab.binding.tado.internal.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.internal.api.model.ACVerticalSwing;
import org.openhab.binding.tado.internal.api.model.AcFanSpeed;
import org.openhab.binding.tado.internal.api.model.AcMode;
import org.openhab.binding.tado.internal.api.model.AcModeCapabilities;
import org.openhab.binding.tado.internal.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.ManualTerminationCondition;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationConditionTemplate;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.internal.api.model.TadoModeTerminationCondition;
import org.openhab.binding.tado.internal.api.model.TemperatureObject;
import org.openhab.binding.tado.internal.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.internal.api.model.TimerTerminationConditionTemplate;
import org.openhab.binding.tado.swagger.codegen.api.model.ACFanLevel;
import org.openhab.binding.tado.swagger.codegen.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.ACVerticalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.AcFanSpeed;
import org.openhab.binding.tado.swagger.codegen.api.model.AcMode;
import org.openhab.binding.tado.swagger.codegen.api.model.AcModeCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.ManualTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionTemplate;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoModeTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureObject;
import org.openhab.binding.tado.swagger.codegen.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.TimerTerminationConditionTemplate;
/**
* Utility methods for the conversion of API types.

View File

@ -24,22 +24,22 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.HorizontalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.TemperatureUnit;
import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.TadoApiTypeUtils;
import org.openhab.binding.tado.internal.api.model.ACFanLevel;
import org.openhab.binding.tado.internal.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.internal.api.model.ACVerticalSwing;
import org.openhab.binding.tado.internal.api.model.AcFanSpeed;
import org.openhab.binding.tado.internal.api.model.AcMode;
import org.openhab.binding.tado.internal.api.model.AcModeCapabilities;
import org.openhab.binding.tado.internal.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.IntRange;
import org.openhab.binding.tado.internal.api.model.Power;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.TemperatureObject;
import org.openhab.binding.tado.internal.api.model.TemperatureRange;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.ACFanLevel;
import org.openhab.binding.tado.swagger.codegen.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.ACVerticalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.AcFanSpeed;
import org.openhab.binding.tado.swagger.codegen.api.model.AcMode;
import org.openhab.binding.tado.swagger.codegen.api.model.AcModeCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.IntRange;
import org.openhab.binding.tado.swagger.codegen.api.model.Power;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureObject;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureRange;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -22,13 +22,13 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.FanSpeed;
import org.openhab.binding.tado.internal.TadoBindingConstants.HorizontalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.HeatingZoneSetting;
import org.openhab.binding.tado.internal.api.model.Power;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.TemperatureObject;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HeatingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.Power;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureObject;
/**
* Builder for incremental creation of heating zone settings.

View File

@ -22,14 +22,14 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.FanSpeed;
import org.openhab.binding.tado.internal.TadoBindingConstants.HorizontalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.HotWaterCapabilities;
import org.openhab.binding.tado.internal.api.model.HotWaterZoneSetting;
import org.openhab.binding.tado.internal.api.model.Power;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.TemperatureObject;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HotWaterCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.HotWaterZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.Power;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureObject;
/**
* Builder for incremental creation of hot water zone settings.

View File

@ -18,12 +18,12 @@ import java.io.IOException;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.internal.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.internal.api.model.ZoneState;
import org.openhab.binding.tado.internal.handler.TadoZoneHandler;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.swagger.codegen.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.ZoneState;
/**
* Builder for creation of overlay termination conditions.

View File

@ -23,11 +23,11 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.HvacMode;
import org.openhab.binding.tado.internal.TadoBindingConstants.TemperatureUnit;
import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.ZoneType;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.TemperatureObject;
import org.openhab.binding.tado.internal.handler.TadoZoneHandler;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.TemperatureObject;
/**
* Base class for zone settings builder.

View File

@ -16,9 +16,9 @@ import java.io.IOException;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.ZoneState;
import org.openhab.binding.tado.internal.handler.TadoZoneHandler;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.ZoneState;
/**
* Wrapper for zone state to support lazy loading.

View File

@ -28,10 +28,10 @@ import java.util.stream.Stream;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.TadoBindingConstants;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.MobileDevice;
import org.openhab.binding.tado.internal.api.model.Zone;
import org.openhab.binding.tado.internal.handler.TadoHomeHandler;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.MobileDevice;
import org.openhab.binding.tado.swagger.codegen.api.model.Zone;
import org.openhab.core.config.discovery.AbstractDiscoveryService;
import org.openhab.core.config.discovery.DiscoveryResult;
import org.openhab.core.config.discovery.DiscoveryResultBuilder;

View File

@ -14,7 +14,7 @@ package org.openhab.binding.tado.internal.handler;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.api.client.HomeApi;
import org.openhab.binding.tado.swagger.codegen.api.client.HomeApi;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;

View File

@ -21,9 +21,9 @@ import java.util.Objects;
import java.util.Optional;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.ControlDevice;
import org.openhab.binding.tado.internal.api.model.Zone;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.ControlDevice;
import org.openhab.binding.tado.swagger.codegen.api.model.Zone;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.types.State;
import org.openhab.core.types.UnDefType;

View File

@ -21,16 +21,16 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.TadoBindingConstants;
import org.openhab.binding.tado.internal.TadoBindingConstants.TemperatureUnit;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.HomeApiFactory;
import org.openhab.binding.tado.internal.api.client.HomeApi;
import org.openhab.binding.tado.internal.api.model.HomeInfo;
import org.openhab.binding.tado.internal.api.model.HomePresence;
import org.openhab.binding.tado.internal.api.model.HomeState;
import org.openhab.binding.tado.internal.api.model.PresenceState;
import org.openhab.binding.tado.internal.api.model.User;
import org.openhab.binding.tado.internal.api.model.UserHomes;
import org.openhab.binding.tado.internal.config.TadoHomeConfig;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.client.HomeApi;
import org.openhab.binding.tado.swagger.codegen.api.model.HomeInfo;
import org.openhab.binding.tado.swagger.codegen.api.model.HomePresence;
import org.openhab.binding.tado.swagger.codegen.api.model.HomeState;
import org.openhab.binding.tado.swagger.codegen.api.model.PresenceState;
import org.openhab.binding.tado.swagger.codegen.api.model.User;
import org.openhab.binding.tado.swagger.codegen.api.model.UserHomes;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.ChannelUID;
@ -124,7 +124,7 @@ public class TadoHomeHandler extends BaseBridgeHandler {
// but always make one server call as a 'ping' to confirm we are really still online
HomeInfo homeInfo = api.showHome(homeId);
TemperatureUnit temperatureUnit = org.openhab.binding.tado.internal.api.model.TemperatureUnit.FAHRENHEIT == homeInfo
TemperatureUnit temperatureUnit = org.openhab.binding.tado.swagger.codegen.api.model.TemperatureUnit.FAHRENHEIT == homeInfo
.getTemperatureUnit() ? TemperatureUnit.FAHRENHEIT : TemperatureUnit.CELSIUS;
updateProperty(TadoBindingConstants.PROPERTY_HOME_TEMPERATURE_UNIT, temperatureUnit.name());
} catch (IOException | ApiException e) {

View File

@ -19,9 +19,9 @@ import java.util.concurrent.TimeUnit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.tado.internal.TadoBindingConstants;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.model.MobileDevice;
import org.openhab.binding.tado.internal.config.TadoMobileDeviceConfig;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.model.MobileDevice;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.ChannelUID;

View File

@ -36,24 +36,24 @@ import org.openhab.binding.tado.internal.TadoBindingConstants.VerticalSwing;
import org.openhab.binding.tado.internal.TadoBindingConstants.ZoneType;
import org.openhab.binding.tado.internal.TadoHvacChange;
import org.openhab.binding.tado.internal.adapter.TadoZoneStateAdapter;
import org.openhab.binding.tado.internal.api.ApiException;
import org.openhab.binding.tado.internal.api.GsonBuilderFactory;
import org.openhab.binding.tado.internal.api.TadoApiTypeUtils;
import org.openhab.binding.tado.internal.api.model.ACFanLevel;
import org.openhab.binding.tado.internal.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.internal.api.model.ACVerticalSwing;
import org.openhab.binding.tado.internal.api.model.AcMode;
import org.openhab.binding.tado.internal.api.model.AcModeCapabilities;
import org.openhab.binding.tado.internal.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.GenericZoneSetting;
import org.openhab.binding.tado.internal.api.model.Overlay;
import org.openhab.binding.tado.internal.api.model.OverlayTemplate;
import org.openhab.binding.tado.internal.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.Zone;
import org.openhab.binding.tado.internal.api.model.ZoneState;
import org.openhab.binding.tado.internal.config.TadoZoneConfig;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.GsonBuilderFactory;
import org.openhab.binding.tado.swagger.codegen.api.model.ACFanLevel;
import org.openhab.binding.tado.swagger.codegen.api.model.ACHorizontalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.ACVerticalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.AcMode;
import org.openhab.binding.tado.swagger.codegen.api.model.AcModeCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.Overlay;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTemplate;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.Zone;
import org.openhab.binding.tado.swagger.codegen.api.model.ZoneState;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.QuantityType;

View File

@ -0,0 +1,61 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api;
import org.eclipse.jetty.client.api.ContentResponse;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ApiException extends Exception {
private int code = 0;
private String responseBody = null;
public ApiException() {
}
public ApiException(Throwable throwable) {
super(throwable);
}
public ApiException(String message) {
super(message);
}
public ApiException(ContentResponse response, String message, Throwable throwable) {
super(message, throwable);
this.code = response.getStatus();
this.responseBody = response.getContentAsString();
}
public ApiException(ContentResponse response, String message) {
this(response, message, null);
}
public ApiException(int code, String message) {
super(message);
this.code = code;
}
public int getCode() {
return code;
}
public String getResponseBody() {
return responseBody;
}
}

View File

@ -0,0 +1,105 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import org.openhab.binding.tado.swagger.codegen.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.CoolingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HeatingCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.HeatingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HotWaterCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.HotWaterZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.ManualTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionTemplate;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoModeTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.TimerTerminationCondition;
import org.openhab.binding.tado.swagger.codegen.api.model.TimerTerminationConditionTemplate;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class GsonBuilderFactory {
public static GsonBuilder defaultGsonBuilder() {
return new GsonBuilder().registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeTypeAdapter())
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(GenericZoneCapabilities.class, "type")
.registerSubtype(HotWaterCapabilities.class, "HOT_WATER")
.registerSubtype(AirConditioningCapabilities.class, "AIR_CONDITIONING")
.registerSubtype(HeatingCapabilities.class, "HEATING"))
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(GenericZoneSetting.class, "type")
.registerSubtype(HotWaterZoneSetting.class, "HOT_WATER")
.registerSubtype(CoolingZoneSetting.class, "AIR_CONDITIONING")
.registerSubtype(HeatingZoneSetting.class, "HEATING"))
.registerTypeAdapterFactory(RuntimeTypeAdapterFactory.of(OverlayTerminationCondition.class, "type")
.registerSubtype(TadoModeTerminationCondition.class, "TADO_MODE")
.registerSubtype(TimerTerminationCondition.class, "TIMER")
.registerSubtype(ManualTerminationCondition.class, "MANUAL"))
.registerTypeAdapterFactory(
RuntimeTypeAdapterFactory.of(OverlayTerminationConditionTemplate.class, "type")
.registerSubtype(TimerTerminationConditionTemplate.class, "TIMER"));
}
public static class OffsetDateTimeTypeAdapter extends TypeAdapter<OffsetDateTime> {
private DateTimeFormatter formatter;
public OffsetDateTimeTypeAdapter() {
this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
}
public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
this.formatter = formatter;
}
public void setFormat(DateTimeFormatter dateFormat) {
this.formatter = dateFormat;
}
@Override
public void write(JsonWriter out, OffsetDateTime date) throws IOException {
if (date == null) {
out.nullValue();
} else {
out.value(formatter.format(date));
}
}
@Override
public OffsetDateTime read(JsonReader in) throws IOException {
switch (in.peek()) {
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
if (date.endsWith("+0000")) {
date = date.substring(0, date.length() - 5) + "Z";
}
return OffsetDateTime.parse(date, formatter);
}
}
}
}

View File

@ -0,0 +1,121 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
* <p>
* Adapted version of gson-extras RuntimeTypeAdapterFactory, but without using
* internal packages and fallback to basetype instead of error.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public final class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
private final Class<?> baseType;
private final String typeFieldName;
private final Map<String, Class<?>> labelToSubtype = new LinkedHashMap<String, Class<?>>();
private RuntimeTypeAdapterFactory(Class<?> baseType, String typeFieldName) {
if (typeFieldName == null || baseType == null) {
throw new IllegalArgumentException();
}
this.baseType = baseType;
this.typeFieldName = typeFieldName;
}
public static <T> RuntimeTypeAdapterFactory<T> of(Class<T> baseType, String typeFieldName) {
return new RuntimeTypeAdapterFactory<T>(baseType, typeFieldName);
}
public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) {
if (type == null || label == null) {
throw new IllegalArgumentException();
}
if (labelToSubtype.containsKey(label)) {
throw new IllegalArgumentException("types and labels must be unique");
}
labelToSubtype.put(label, type);
return this;
}
@Override
public <R> TypeAdapter<R> create(Gson gson, TypeToken<R> type) {
if (type.getRawType() != baseType) {
return null;
}
final TypeAdapter<R> baseTypeDelegate = gson.getDelegateAdapter(this, type);
final Map<String, TypeAdapter<?>> labelToDelegate = new LinkedHashMap<>();
final Map<Class<?>, TypeAdapter<?>> subtypeToDelegate = new LinkedHashMap<>();
for (Map.Entry<String, Class<?>> entry : labelToSubtype.entrySet()) {
TypeAdapter<?> delegate = gson.getDelegateAdapter(this, TypeToken.get(entry.getValue()));
labelToDelegate.put(entry.getKey(), delegate);
subtypeToDelegate.put(entry.getValue(), delegate);
}
return new TypeAdapter<R>() {
@Override
public R read(JsonReader in) throws IOException {
JsonElement jsonElement = new JsonParser().parse(in);
JsonElement labelJsonElement = jsonElement.getAsJsonObject().get(typeFieldName);
TypeAdapter<R> delegate = null;
if (labelJsonElement != null) {
String label = labelJsonElement.getAsString();
delegate = (TypeAdapter<R>) labelToDelegate.get(label);
}
if (delegate == null) {
// if label unknown. use base type delegate
delegate = baseTypeDelegate;
}
return delegate.fromJsonTree(jsonElement);
}
@Override
public void write(JsonWriter out, R value) throws IOException {
Class<?> srcType = value.getClass();
TypeAdapter<R> delegate = (TypeAdapter<R>) subtypeToDelegate.get(srcType);
if (delegate == null) {
// if label unknown. use base type delegate
delegate = baseTypeDelegate;
}
delegate.write(out, value);
}
}.nullSafe();
}
}

View File

@ -0,0 +1,27 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.auth;
import java.io.IOException;
import org.eclipse.jetty.client.api.Request;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public interface Authorizer {
void addAuthorization(Request request) throws ApiException, IOException;
}

View File

@ -0,0 +1,177 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.auth;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class OAuthAuthorizer implements Authorizer {
private static final String GRANT_TYPE_PASSWORD = "password";
private static final int TOKEN_GRACE_PERIOD = 30;
private static final HttpClient CLIENT = new HttpClient(new SslContextFactory());
private final Gson gson = new GsonBuilder().create();
private String tokenUrl = "https://auth.tado.com/oauth/token";
private String grantType;
private String username;
private String password;
private String clientId;
private String clientSecret;
private String scope;
private String accessToken;
private String refreshToken;
private LocalDateTime tokenExpiration;
public OAuthAuthorizer() {
}
public OAuthAuthorizer passwordFlow(String username, String password) {
this.grantType = "password";
this.username = username;
this.password = password;
return this;
}
public OAuthAuthorizer tokenUrl(String tokenUrl) {
this.tokenUrl = tokenUrl;
return this;
}
public OAuthAuthorizer clientId(String clientId) {
this.clientId = clientId;
return this;
}
public OAuthAuthorizer clientSecret(String clientSecret) {
this.clientSecret = clientSecret;
return this;
}
public OAuthAuthorizer scopes(String... scopes) {
this.scope = String.join(" ", scopes);
return this;
}
private void initializeTokens() throws IOException {
startHttpClient(CLIENT);
List<String> queryParams = new ArrayList<>();
if (this.refreshToken != null) {
queryParams.add(queryParam("grant_type", "refresh_token"));
queryParams.add(queryParam("refresh_token", this.refreshToken));
} else if (GRANT_TYPE_PASSWORD.equals(this.grantType)) {
queryParams.add(queryParam("grant_type", this.grantType));
queryParams.add(queryParam("username", this.username));
queryParams.add(queryParam("password", this.password));
queryParams.add(queryParam("scope", this.scope));
}
if (this.clientId != null) {
queryParams.add(queryParam("client_id", this.clientId));
}
if (this.clientSecret != null) {
queryParams.add(queryParam("client_secret", this.clientSecret));
}
Request request = CLIENT.newRequest(this.tokenUrl + "?" + String.join("&", queryParams)).method(HttpMethod.POST)
.timeout(5, TimeUnit.SECONDS);
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
try {
ContentResponse response = request.send();
if (response.getStatus() == HttpStatus.OK_200) {
Map<?, ?> tokenValues = gson.fromJson(response.getContentAsString(), Map.class);
this.accessToken = (String) tokenValues.get("access_token");
this.refreshToken = (String) tokenValues.get("refresh_token");
this.tokenExpiration = LocalDateTime.now().plusSeconds(
Double.valueOf(tokenValues.get("expires_in").toString()).longValue() - TOKEN_GRACE_PERIOD);
} else {
this.accessToken = null;
this.refreshToken = null;
this.tokenExpiration = null;
throw new ApiException(response, "Error getting access token");
}
} catch (Exception e) {
throw new IOException("Error calling " + this.tokenUrl, e);
}
}
private String queryParam(String key, String value) {
try {
return key + "=" + URLEncoder.encode(value, "UTF-8");
} catch (UnsupportedEncodingException e) {
return key + "=" + value;
}
}
private boolean isExpired() {
return this.tokenExpiration == null || this.tokenExpiration.isBefore(LocalDateTime.now());
}
public String getToken() throws IOException {
if (accessToken == null || this.isExpired()) {
synchronized (this) {
if (accessToken == null || this.isExpired()) {
initializeTokens();
}
}
}
return this.accessToken;
}
@Override
public void addAuthorization(Request request) throws IOException {
request.header(HttpHeader.AUTHORIZATION, "Bearer " + getToken());
}
private static void startHttpClient(HttpClient client) {
if (!client.isStarted()) {
try {
client.start();
} catch (Exception e) {
// nothing we can do here
}
}
}
}

View File

@ -0,0 +1,630 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.client;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.util.StringContentProvider;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.openhab.binding.tado.swagger.codegen.api.ApiException;
import org.openhab.binding.tado.swagger.codegen.api.auth.Authorizer;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.HomeInfo;
import org.openhab.binding.tado.swagger.codegen.api.model.HomePresence;
import org.openhab.binding.tado.swagger.codegen.api.model.HomeState;
import org.openhab.binding.tado.swagger.codegen.api.model.MobileDevice;
import org.openhab.binding.tado.swagger.codegen.api.model.Overlay;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTemplate;
import org.openhab.binding.tado.swagger.codegen.api.model.User;
import org.openhab.binding.tado.swagger.codegen.api.model.Zone;
import org.openhab.binding.tado.swagger.codegen.api.model.ZoneState;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
/**
* Static imported copy of class created by Swagger Codegen
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HomeApi {
private static final HttpClient CLIENT = new HttpClient(new SslContextFactory());
private String baseUrl = "https://my.tado.com/api/v2";
private int timeout = 5000;
private Gson gson;
private Authorizer authorizer;
public HomeApi(Gson gson, Authorizer authorizer) {
this.gson = gson;
this.authorizer = authorizer;
}
public void deleteZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling deleteZoneOverlay");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling deleteZoneOverlay");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/overlay"
.replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.DELETE).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation deleteZoneOverlay failed with error " + statusCode);
}
}
public HomeState homeState(Long homeId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling homeState");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/state".replaceAll("\\{" + "home_id" + "\\}", homeId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation homeState failed with error " + statusCode);
}
Type returnType = new TypeToken<HomeState>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public List<MobileDevice> listMobileDevices(Long homeId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling listMobileDevices");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/mobileDevices".replaceAll("\\{" + "home_id" + "\\}", homeId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation listMobileDevices failed with error " + statusCode);
}
Type returnType = new TypeToken<List<MobileDevice>>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public List<Zone> listZones(Long homeId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling listZones");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones".replaceAll("\\{" + "home_id" + "\\}", homeId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation listZones failed with error " + statusCode);
}
Type returnType = new TypeToken<List<Zone>>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public HomeInfo showHome(Long homeId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showHome");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}".replaceAll("\\{" + "home_id" + "\\}", homeId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showHome failed with error " + statusCode);
}
Type returnType = new TypeToken<HomeInfo>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public User showUser() throws IOException, ApiException {
startHttpClient(CLIENT);
// create path and map variables
String path = "/me";
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showUser failed with error " + statusCode);
}
Type returnType = new TypeToken<User>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public GenericZoneCapabilities showZoneCapabilities(Long homeId, Long zoneId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneCapabilities");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling showZoneCapabilities");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/capabilities"
.replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showZoneCapabilities failed with error " + statusCode);
}
Type returnType = new TypeToken<GenericZoneCapabilities>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public OverlayTemplate showZoneDefaultOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDefaultOverlay");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling showZoneDefaultOverlay");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/defaultOverlay"
.replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showZoneDefaultOverlay failed with error " + statusCode);
}
Type returnType = new TypeToken<OverlayTemplate>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public Zone showZoneDetails(Long homeId, Long zoneId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneDetails");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling showZoneDetails");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/details"
.replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showZoneDetails failed with error " + statusCode);
}
Type returnType = new TypeToken<Zone>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public Overlay showZoneOverlay(Long homeId, Long zoneId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneOverlay");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling showZoneOverlay");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/overlay"
.replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showZoneOverlay failed with error " + statusCode);
}
Type returnType = new TypeToken<Overlay>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public ZoneState showZoneState(Long homeId, Long zoneId) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling showZoneState");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling showZoneState");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/state".replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.GET).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation showZoneState failed with error " + statusCode);
}
Type returnType = new TypeToken<ZoneState>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
public void updatePresenceLock(Long homeId, HomePresence json) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling updatePresenceLock");
}
// verify the required parameter 'json' is set
if (json == null) {
throw new ApiException(400, "Missing the required parameter 'json' when calling updatePresenceLock");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/presenceLock".replaceAll("\\{" + "home_id" + "\\}", homeId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.PUT).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
String serializedBody = gson.toJson(json);
request.content(new StringContentProvider(serializedBody), "application/json");
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation updatePresenceLock failed with error " + statusCode);
}
}
public Overlay updateZoneOverlay(Long homeId, Long zoneId, Overlay json) throws IOException, ApiException {
// verify the required parameter 'homeId' is set
if (homeId == null) {
throw new ApiException(400, "Missing the required parameter 'homeId' when calling updateZoneOverlay");
}
// verify the required parameter 'zoneId' is set
if (zoneId == null) {
throw new ApiException(400, "Missing the required parameter 'zoneId' when calling updateZoneOverlay");
}
// verify the required parameter 'json' is set
if (json == null) {
throw new ApiException(400, "Missing the required parameter 'json' when calling updateZoneOverlay");
}
startHttpClient(CLIENT);
// create path and map variables
String path = "/homes/{home_id}/zones/{zone_id}/overlay"
.replaceAll("\\{" + "home_id" + "\\}", homeId.toString())
.replaceAll("\\{" + "zone_id" + "\\}", zoneId.toString());
Request request = CLIENT.newRequest(baseUrl + path).method(HttpMethod.PUT).timeout(timeout,
TimeUnit.MILLISECONDS);
request.accept("application/json");
request.header(HttpHeader.USER_AGENT, "openhab/swagger-java/1.0.0");
if (authorizer != null) {
authorizer.addAuthorization(request);
}
String serializedBody = gson.toJson(json);
request.content(new StringContentProvider(serializedBody), "application/json");
ContentResponse response;
try {
response = request.send();
} catch (Exception e) {
throw new IOException(e);
}
int statusCode = response.getStatus();
if (statusCode >= HttpStatus.BAD_REQUEST_400) {
throw new ApiException(response, "Operation updateZoneOverlay failed with error " + statusCode);
}
Type returnType = new TypeToken<Overlay>() {
}.getType();
return gson.fromJson(response.getContentAsString(), returnType);
}
private static void startHttpClient(HttpClient client) {
if (!client.isStarted()) {
try {
client.start();
} catch (Exception e) {
// nothing we can do here
}
}
}
}

View File

@ -0,0 +1,80 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(ACFanLevel.Adapter.class)
public enum ACFanLevel {
SILENT("SILENT"),
LEVEL1("LEVEL1"),
LEVEL2("LEVEL2"),
LEVEL3("LEVEL3"),
LEVEL4("LEVEL4"),
LEVEL5("LEVEL5"),
AUTO("AUTO");
private String value;
ACFanLevel(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ACFanLevel fromValue(String text) {
for (ACFanLevel b : ACFanLevel.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<ACFanLevel> {
@Override
public void write(final JsonWriter jsonWriter, final ACFanLevel enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ACFanLevel read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ACFanLevel.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,82 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(ACHorizontalSwing.Adapter.class)
public enum ACHorizontalSwing {
OFF("OFF"),
ON("ON"),
LEFT("LEFT"),
MID_LEFT("MID_LEFT"),
MID("MID"),
MID_RIGHT("MID_RIGHT"),
RIGHT("RIGHT"),
AUTO("AUTO");
private String value;
ACHorizontalSwing(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ACHorizontalSwing fromValue(String text) {
for (ACHorizontalSwing b : ACHorizontalSwing.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<ACHorizontalSwing> {
@Override
public void write(final JsonWriter jsonWriter, final ACHorizontalSwing enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ACHorizontalSwing read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ACHorizontalSwing.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,82 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(ACVerticalSwing.Adapter.class)
public enum ACVerticalSwing {
OFF("OFF"),
ON("ON"),
UP("UP"),
MID_UP("MID_UP"),
MID("MID"),
MID_DOWN("MID_DOWN"),
DOWN("DOWN"),
AUTO("AUTO");
private String value;
ACVerticalSwing(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ACVerticalSwing fromValue(String text) {
for (ACVerticalSwing b : ACVerticalSwing.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<ACVerticalSwing> {
@Override
public void write(final JsonWriter jsonWriter, final ACVerticalSwing enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ACVerticalSwing read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ACVerticalSwing.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(AcFanSpeed.Adapter.class)
public enum AcFanSpeed {
LOW("LOW"),
MIDDLE("MIDDLE"),
HIGH("HIGH"),
AUTO("AUTO");
private String value;
AcFanSpeed(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static AcFanSpeed fromValue(String text) {
for (AcFanSpeed b : AcFanSpeed.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<AcFanSpeed> {
@Override
public void write(final JsonWriter jsonWriter, final AcFanSpeed enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public AcFanSpeed read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return AcFanSpeed.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,76 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(AcMode.Adapter.class)
public enum AcMode {
COOL("COOL"),
HEAT("HEAT"),
DRY("DRY"),
FAN("FAN"),
AUTO("AUTO");
private String value;
AcMode(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static AcMode fromValue(String text) {
for (AcMode b : AcMode.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<AcMode> {
@Override
public void write(final JsonWriter jsonWriter, final AcMode enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public AcMode read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return AcMode.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,232 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class AcModeCapabilities {
@SerializedName("temperatures")
private TemperatureRange temperatures = null;
@SerializedName("fanSpeeds")
private List<AcFanSpeed> fanSpeeds = null;
@SerializedName("swings")
private List<Power> swings = null;
@SerializedName("light")
private List<Power> light = null;
@SerializedName("fanLevel")
private List<ACFanLevel> fanLevel = null;
@SerializedName("verticalSwing")
private List<ACVerticalSwing> verticalSwing = null;
@SerializedName("horizontalSwing")
private List<ACHorizontalSwing> horizontalSwing = null;
public AcModeCapabilities temperatures(TemperatureRange temperatures) {
this.temperatures = temperatures;
return this;
}
public TemperatureRange getTemperatures() {
return temperatures;
}
public void setTemperatures(TemperatureRange temperatures) {
this.temperatures = temperatures;
}
public AcModeCapabilities fanSpeeds(List<AcFanSpeed> fanSpeeds) {
this.fanSpeeds = fanSpeeds;
return this;
}
public AcModeCapabilities addFanSpeedsItem(AcFanSpeed fanSpeedsItem) {
if (this.fanSpeeds == null) {
this.fanSpeeds = new ArrayList<>();
}
this.fanSpeeds.add(fanSpeedsItem);
return this;
}
public List<AcFanSpeed> getFanSpeeds() {
return fanSpeeds;
}
public void setFanSpeeds(List<AcFanSpeed> fanSpeeds) {
this.fanSpeeds = fanSpeeds;
}
public AcModeCapabilities swings(List<Power> swings) {
this.swings = swings;
return this;
}
public AcModeCapabilities addSwingsItem(Power swingsItem) {
if (this.swings == null) {
this.swings = new ArrayList<>();
}
this.swings.add(swingsItem);
return this;
}
public List<Power> getSwings() {
return swings;
}
public void setSwings(List<Power> swings) {
this.swings = swings;
}
public AcModeCapabilities light(List<Power> light) {
this.light = light;
return this;
}
public AcModeCapabilities addLightItem(Power lightItem) {
if (this.light == null) {
this.light = new ArrayList<>();
}
this.light.add(lightItem);
return this;
}
public List<Power> getLight() {
return light;
}
public void setLight(List<Power> light) {
this.light = light;
}
public AcModeCapabilities fanLevel(List<ACFanLevel> fanLevel) {
this.fanLevel = fanLevel;
return this;
}
public AcModeCapabilities addFanLevelItem(ACFanLevel fanLevelItem) {
if (this.fanLevel == null) {
this.fanLevel = new ArrayList<>();
}
this.fanLevel.add(fanLevelItem);
return this;
}
public List<ACFanLevel> getFanLevel() {
return fanLevel;
}
public void setFanLevel(List<ACFanLevel> fanLevel) {
this.fanLevel = fanLevel;
}
public AcModeCapabilities verticalSwing(List<ACVerticalSwing> verticalSwing) {
this.verticalSwing = verticalSwing;
return this;
}
public AcModeCapabilities addVerticalSwingItem(ACVerticalSwing verticalSwingItem) {
if (this.verticalSwing == null) {
this.verticalSwing = new ArrayList<>();
}
this.verticalSwing.add(verticalSwingItem);
return this;
}
public List<ACVerticalSwing> getVerticalSwing() {
return verticalSwing;
}
public void setVerticalSwing(List<ACVerticalSwing> verticalSwing) {
this.verticalSwing = verticalSwing;
}
public AcModeCapabilities horizontalSwing(List<ACHorizontalSwing> horizontalSwing) {
this.horizontalSwing = horizontalSwing;
return this;
}
public AcModeCapabilities addHorizontalSwingItem(ACHorizontalSwing horizontalSwingItem) {
if (this.horizontalSwing == null) {
this.horizontalSwing = new ArrayList<>();
}
this.horizontalSwing.add(horizontalSwingItem);
return this;
}
public List<ACHorizontalSwing> getHorizontalSwing() {
return horizontalSwing;
}
public void setHorizontalSwing(List<ACHorizontalSwing> horizontalSwing) {
this.horizontalSwing = horizontalSwing;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AcModeCapabilities acModeCapabilities = (AcModeCapabilities) o;
return Objects.equals(this.temperatures, acModeCapabilities.temperatures)
&& Objects.equals(this.fanSpeeds, acModeCapabilities.fanSpeeds)
&& Objects.equals(this.swings, acModeCapabilities.swings)
&& Objects.equals(this.light, acModeCapabilities.light)
&& Objects.equals(this.fanLevel, acModeCapabilities.fanLevel)
&& Objects.equals(this.verticalSwing, acModeCapabilities.verticalSwing)
&& Objects.equals(this.horizontalSwing, acModeCapabilities.horizontalSwing);
}
@Override
public int hashCode() {
return Objects.hash(temperatures, fanSpeeds, swings, light, fanLevel, verticalSwing, horizontalSwing);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AcModeCapabilities {\n");
sb.append(" temperatures: ").append(toIndentedString(temperatures)).append("\n");
sb.append(" fanSpeeds: ").append(toIndentedString(fanSpeeds)).append("\n");
sb.append(" swings: ").append(toIndentedString(swings)).append("\n");
sb.append(" light: ").append(toIndentedString(light)).append("\n");
sb.append(" fanLevel: ").append(toIndentedString(fanLevel)).append("\n");
sb.append(" verticalSwing: ").append(toIndentedString(verticalSwing)).append("\n");
sb.append(" horizontalSwing: ").append(toIndentedString(horizontalSwing)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,93 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class AcPowerDataPoint {
@SerializedName("timestamp")
private OffsetDateTime timestamp = null;
@SerializedName("value")
private String value = null;
public AcPowerDataPoint timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
return this;
}
public OffsetDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
}
public AcPowerDataPoint value(String value) {
this.value = value;
return this;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AcPowerDataPoint acPowerDataPoint = (AcPowerDataPoint) o;
return Objects.equals(this.timestamp, acPowerDataPoint.timestamp)
&& Objects.equals(this.value, acPowerDataPoint.value);
}
@Override
public int hashCode() {
return Objects.hash(timestamp, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AcPowerDataPoint {\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ActivityDataPoints {
@SerializedName("heatingPower")
private PercentageDataPoint heatingPower = null;
@SerializedName("acPower")
private AcPowerDataPoint acPower = null;
public ActivityDataPoints heatingPower(PercentageDataPoint heatingPower) {
this.heatingPower = heatingPower;
return this;
}
public PercentageDataPoint getHeatingPower() {
return heatingPower;
}
public void setHeatingPower(PercentageDataPoint heatingPower) {
this.heatingPower = heatingPower;
}
public ActivityDataPoints acPower(AcPowerDataPoint acPower) {
this.acPower = acPower;
return this;
}
public AcPowerDataPoint getAcPower() {
return acPower;
}
public void setAcPower(AcPowerDataPoint acPower) {
this.acPower = acPower;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActivityDataPoints activityDataPoints = (ActivityDataPoints) o;
return Objects.equals(this.heatingPower, activityDataPoints.heatingPower)
&& Objects.equals(this.acPower, activityDataPoints.acPower);
}
@Override
public int hashCode() {
return Objects.hash(heatingPower, acPower);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActivityDataPoints {\n");
sb.append(" heatingPower: ").append(toIndentedString(heatingPower)).append("\n");
sb.append(" acPower: ").append(toIndentedString(acPower)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,146 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class AirConditioningCapabilities extends GenericZoneCapabilities {
@SerializedName("COOL")
private AcModeCapabilities COOL = null;
@SerializedName("HEAT")
private AcModeCapabilities HEAT = null;
@SerializedName("DRY")
private AcModeCapabilities DRY = null;
@SerializedName("FAN")
private AcModeCapabilities FAN = null;
@SerializedName("AUTO")
private AcModeCapabilities AUTO = null;
public AirConditioningCapabilities COOL(AcModeCapabilities COOL) {
this.COOL = COOL;
return this;
}
public AcModeCapabilities getCOOL() {
return COOL;
}
public void setCOOL(AcModeCapabilities COOL) {
this.COOL = COOL;
}
public AirConditioningCapabilities HEAT(AcModeCapabilities HEAT) {
this.HEAT = HEAT;
return this;
}
public AcModeCapabilities getHEAT() {
return HEAT;
}
public void setHEAT(AcModeCapabilities HEAT) {
this.HEAT = HEAT;
}
public AirConditioningCapabilities DRY(AcModeCapabilities DRY) {
this.DRY = DRY;
return this;
}
public AcModeCapabilities getDRY() {
return DRY;
}
public void setDRY(AcModeCapabilities DRY) {
this.DRY = DRY;
}
public AirConditioningCapabilities FAN(AcModeCapabilities FAN) {
this.FAN = FAN;
return this;
}
public AcModeCapabilities getFAN() {
return FAN;
}
public void setFAN(AcModeCapabilities FAN) {
this.FAN = FAN;
}
public AirConditioningCapabilities AUTO(AcModeCapabilities AUTO) {
this.AUTO = AUTO;
return this;
}
public AcModeCapabilities getAUTO() {
return AUTO;
}
public void setAUTO(AcModeCapabilities AUTO) {
this.AUTO = AUTO;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AirConditioningCapabilities airConditioningCapabilities = (AirConditioningCapabilities) o;
return Objects.equals(this.COOL, airConditioningCapabilities.COOL)
&& Objects.equals(this.HEAT, airConditioningCapabilities.HEAT)
&& Objects.equals(this.DRY, airConditioningCapabilities.DRY)
&& Objects.equals(this.FAN, airConditioningCapabilities.FAN)
&& Objects.equals(this.AUTO, airConditioningCapabilities.AUTO) && super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(COOL, HEAT, DRY, FAN, AUTO, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AirConditioningCapabilities {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" COOL: ").append(toIndentedString(COOL)).append("\n");
sb.append(" HEAT: ").append(toIndentedString(HEAT)).append("\n");
sb.append(" DRY: ").append(toIndentedString(DRY)).append("\n");
sb.append(" FAN: ").append(toIndentedString(FAN)).append("\n");
sb.append(" AUTO: ").append(toIndentedString(AUTO)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,91 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ClientError {
@SerializedName("code")
private String code = null;
@SerializedName("title")
private String title = null;
public ClientError code(String code) {
this.code = code;
return this;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public ClientError title(String title) {
this.title = title;
return this;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClientError clientError = (ClientError) o;
return Objects.equals(this.code, clientError.code) && Objects.equals(this.title, clientError.title);
}
@Override
public int hashCode() {
return Objects.hash(code, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClientError {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,84 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ClientErrorModel {
@SerializedName("errors")
private List<ClientError> errors = null;
public ClientErrorModel errors(List<ClientError> errors) {
this.errors = errors;
return this;
}
public ClientErrorModel addErrorsItem(ClientError errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
this.errors.add(errorsItem);
return this;
}
public List<ClientError> getErrors() {
return errors;
}
public void setErrors(List<ClientError> errors) {
this.errors = errors;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClientErrorModel clientErrorModel = (ClientErrorModel) o;
return Objects.equals(this.errors, clientErrorModel.errors);
}
@Override
public int hashCode() {
return Objects.hash(errors);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClientErrorModel {\n");
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,83 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ControlDevice {
@SerializedName("deviceType")
private String deviceType = null;
@SerializedName("serialNo")
private String serialNo = null;
@SerializedName("batteryState")
private String batteryState = null;
public String getDeviceType() {
return deviceType;
}
public String getSerialNo() {
return serialNo;
}
public String getBatteryState() {
return batteryState;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ControlDevice controlDevice = (ControlDevice) o;
return Objects.equals(this.deviceType, controlDevice.deviceType)
&& Objects.equals(this.serialNo, controlDevice.serialNo)
&& Objects.equals(this.batteryState, controlDevice.batteryState);
}
@Override
public int hashCode() {
return Objects.hash(deviceType, serialNo, batteryState);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ControlDevice {\n");
sb.append(" deviceType: ").append(toIndentedString(deviceType)).append("\n");
sb.append(" serialNo: ").append(toIndentedString(serialNo)).append("\n");
sb.append(" batteryState: ").append(toIndentedString(batteryState)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,219 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class CoolingZoneSetting extends GenericZoneSetting {
@SerializedName("power")
private Power power = null;
@SerializedName("mode")
private AcMode mode = null;
@SerializedName("temperature")
private TemperatureObject temperature = null;
@SerializedName("fanSpeed")
private AcFanSpeed fanSpeed = null;
@SerializedName("swing")
private Power swing = null;
@SerializedName("light")
private Power light = null;
@SerializedName("fanLevel")
private ACFanLevel fanLevel = null;
@SerializedName("verticalSwing")
private ACVerticalSwing verticalSwing = null;
@SerializedName("horizontalSwing")
private ACHorizontalSwing horizontalSwing = null;
public CoolingZoneSetting power(Power power) {
this.power = power;
return this;
}
public Power getPower() {
return power;
}
public void setPower(Power power) {
this.power = power;
}
public CoolingZoneSetting mode(AcMode mode) {
this.mode = mode;
return this;
}
public AcMode getMode() {
return mode;
}
public void setMode(AcMode mode) {
this.mode = mode;
}
public CoolingZoneSetting temperature(TemperatureObject temperature) {
this.temperature = temperature;
return this;
}
public TemperatureObject getTemperature() {
return temperature;
}
public void setTemperature(TemperatureObject temperature) {
this.temperature = temperature;
}
public CoolingZoneSetting fanSpeed(AcFanSpeed fanSpeed) {
this.fanSpeed = fanSpeed;
return this;
}
public AcFanSpeed getFanSpeed() {
return fanSpeed;
}
public void setFanSpeed(AcFanSpeed fanSpeed) {
this.fanSpeed = fanSpeed;
}
public CoolingZoneSetting swing(Power swing) {
this.swing = swing;
return this;
}
public Power getSwing() {
return swing;
}
public void setSwing(Power swing) {
this.swing = swing;
}
public CoolingZoneSetting light(Power light) {
this.light = light;
return this;
}
public Power getLight() {
return light;
}
public void setLight(Power light) {
this.light = light;
}
public CoolingZoneSetting fanLevel(ACFanLevel fanLevel) {
this.fanLevel = fanLevel;
return this;
}
public ACFanLevel getFanLevel() {
return fanLevel;
}
public void setFanLevel(ACFanLevel fanLevel) {
this.fanLevel = fanLevel;
}
public CoolingZoneSetting verticalSwing(ACVerticalSwing verticalSwing) {
this.verticalSwing = verticalSwing;
return this;
}
public ACVerticalSwing getVerticalSwing() {
return verticalSwing;
}
public void setVerticalSwing(ACVerticalSwing verticalSwing) {
this.verticalSwing = verticalSwing;
}
public CoolingZoneSetting horizontalSwing(ACHorizontalSwing horizontalSwing) {
this.horizontalSwing = horizontalSwing;
return this;
}
public ACHorizontalSwing getHorizontalSwing() {
return horizontalSwing;
}
public void setHorizontalSwing(ACHorizontalSwing horizontalSwing) {
this.horizontalSwing = horizontalSwing;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CoolingZoneSetting coolingZoneSetting = (CoolingZoneSetting) o;
return Objects.equals(this.power, coolingZoneSetting.power)
&& Objects.equals(this.mode, coolingZoneSetting.mode)
&& Objects.equals(this.temperature, coolingZoneSetting.temperature)
&& Objects.equals(this.fanSpeed, coolingZoneSetting.fanSpeed)
&& Objects.equals(this.swing, coolingZoneSetting.swing)
&& Objects.equals(this.light, coolingZoneSetting.light)
&& Objects.equals(this.fanLevel, coolingZoneSetting.fanLevel)
&& Objects.equals(this.verticalSwing, coolingZoneSetting.verticalSwing)
&& Objects.equals(this.horizontalSwing, coolingZoneSetting.horizontalSwing) && super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(power, mode, temperature, fanSpeed, swing, light, fanLevel, verticalSwing, horizontalSwing,
super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CoolingZoneSetting {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" power: ").append(toIndentedString(power)).append("\n");
sb.append(" mode: ").append(toIndentedString(mode)).append("\n");
sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n");
sb.append(" fanSpeed: ").append(toIndentedString(fanSpeed)).append("\n");
sb.append(" swing: ").append(toIndentedString(swing)).append("\n");
sb.append(" light: ").append(toIndentedString(light)).append("\n");
sb.append(" fanLevel: ").append(toIndentedString(fanLevel)).append("\n");
sb.append(" verticalSwing: ").append(toIndentedString(verticalSwing)).append("\n");
sb.append(" horizontalSwing: ").append(toIndentedString(horizontalSwing)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class GenericZoneCapabilities {
@SerializedName("type")
private TadoSystemType type = null;
public GenericZoneCapabilities type(TadoSystemType type) {
this.type = type;
return this;
}
public TadoSystemType getType() {
return type;
}
public void setType(TadoSystemType type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GenericZoneCapabilities genericZoneCapabilities = (GenericZoneCapabilities) o;
return Objects.equals(this.type, genericZoneCapabilities.type);
}
@Override
public int hashCode() {
return Objects.hash(type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GenericZoneCapabilities {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class GenericZoneSetting {
@SerializedName("type")
private TadoSystemType type = null;
public GenericZoneSetting type(TadoSystemType type) {
this.type = type;
return this;
}
public TadoSystemType getType() {
return type;
}
public void setType(TadoSystemType type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GenericZoneSetting genericZoneSetting = (GenericZoneSetting) o;
return Objects.equals(this.type, genericZoneSetting.type);
}
@Override
public int hashCode() {
return Objects.hash(type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GenericZoneSetting {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class Geolocation {
@SerializedName("latitude")
private Double latitude = null;
@SerializedName("longitude")
private Double longitude = null;
public Geolocation latitude(Double latitude) {
this.latitude = latitude;
return this;
}
public Double getLatitude() {
return latitude;
}
public void setLatitude(Double latitude) {
this.latitude = latitude;
}
public Geolocation longitude(Double longitude) {
this.longitude = longitude;
return this;
}
public Double getLongitude() {
return longitude;
}
public void setLongitude(Double longitude) {
this.longitude = longitude;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Geolocation geolocation = (Geolocation) o;
return Objects.equals(this.latitude, geolocation.latitude)
&& Objects.equals(this.longitude, geolocation.longitude);
}
@Override
public int hashCode() {
return Objects.hash(latitude, longitude);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Geolocation {\n");
sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n");
sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HeatingCapabilities extends GenericZoneCapabilities {
@SerializedName("temperatures")
private TemperatureRange temperatures = null;
public HeatingCapabilities temperatures(TemperatureRange temperatures) {
this.temperatures = temperatures;
return this;
}
public TemperatureRange getTemperatures() {
return temperatures;
}
public void setTemperatures(TemperatureRange temperatures) {
this.temperatures = temperatures;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HeatingCapabilities heatingCapabilities = (HeatingCapabilities) o;
return Objects.equals(this.temperatures, heatingCapabilities.temperatures) && super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(temperatures, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HeatingCapabilities {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" temperatures: ").append(toIndentedString(temperatures)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HeatingZoneSetting extends GenericZoneSetting {
@SerializedName("power")
private Power power = null;
@SerializedName("temperature")
private TemperatureObject temperature = null;
public HeatingZoneSetting power(Power power) {
this.power = power;
return this;
}
public Power getPower() {
return power;
}
public void setPower(Power power) {
this.power = power;
}
public HeatingZoneSetting temperature(TemperatureObject temperature) {
this.temperature = temperature;
return this;
}
public TemperatureObject getTemperature() {
return temperature;
}
public void setTemperature(TemperatureObject temperature) {
this.temperature = temperature;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HeatingZoneSetting heatingZoneSetting = (HeatingZoneSetting) o;
return Objects.equals(this.power, heatingZoneSetting.power)
&& Objects.equals(this.temperature, heatingZoneSetting.temperature) && super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(power, temperature, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HeatingZoneSetting {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" power: ").append(toIndentedString(power)).append("\n");
sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,163 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HomeInfo {
@SerializedName("id")
private Integer id = null;
@SerializedName("name")
private String name = null;
@SerializedName("dateTimeZone")
private String dateTimeZone = null;
@SerializedName("temperatureUnit")
private TemperatureUnit temperatureUnit = null;
@SerializedName("geolocation")
private Geolocation geolocation = null;
@SerializedName("awayRadiusInMeters")
private Double awayRadiusInMeters = null;
public HomeInfo id(Integer id) {
this.id = id;
return this;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public HomeInfo name(String name) {
this.name = name;
return this;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public HomeInfo dateTimeZone(String dateTimeZone) {
this.dateTimeZone = dateTimeZone;
return this;
}
public String getDateTimeZone() {
return dateTimeZone;
}
public void setDateTimeZone(String dateTimeZone) {
this.dateTimeZone = dateTimeZone;
}
public HomeInfo temperatureUnit(TemperatureUnit temperatureUnit) {
this.temperatureUnit = temperatureUnit;
return this;
}
public TemperatureUnit getTemperatureUnit() {
return temperatureUnit;
}
public void setTemperatureUnit(TemperatureUnit temperatureUnit) {
this.temperatureUnit = temperatureUnit;
}
public HomeInfo geolocation(Geolocation geolocation) {
this.geolocation = geolocation;
return this;
}
public Geolocation getGeolocation() {
return geolocation;
}
public void setGeolocation(Geolocation geolocation) {
this.geolocation = geolocation;
}
public HomeInfo awayRadiusInMeters(Double awayRadiusInMeters) {
this.awayRadiusInMeters = awayRadiusInMeters;
return this;
}
public Double getAwayRadiusInMeters() {
return awayRadiusInMeters;
}
public void setAwayRadiusInMeters(Double awayRadiusInMeters) {
this.awayRadiusInMeters = awayRadiusInMeters;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HomeInfo homeInfo = (HomeInfo) o;
return Objects.equals(this.id, homeInfo.id) && Objects.equals(this.name, homeInfo.name)
&& Objects.equals(this.dateTimeZone, homeInfo.dateTimeZone)
&& Objects.equals(this.temperatureUnit, homeInfo.temperatureUnit)
&& Objects.equals(this.geolocation, homeInfo.geolocation)
&& Objects.equals(this.awayRadiusInMeters, homeInfo.awayRadiusInMeters);
}
@Override
public int hashCode() {
return Objects.hash(id, name, dateTimeZone, temperatureUnit, geolocation, awayRadiusInMeters);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HomeInfo {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" dateTimeZone: ").append(toIndentedString(dateTimeZone)).append("\n");
sb.append(" temperatureUnit: ").append(toIndentedString(temperatureUnit)).append("\n");
sb.append(" geolocation: ").append(toIndentedString(geolocation)).append("\n");
sb.append(" awayRadiusInMeters: ").append(toIndentedString(awayRadiusInMeters)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HomePresence {
@SerializedName("homePresence")
private PresenceState homePresence = null;
public HomePresence homePresence(PresenceState homePresence) {
this.homePresence = homePresence;
return this;
}
public PresenceState getHomePresence() {
return homePresence;
}
public void setHomePresence(PresenceState homePresence) {
this.homePresence = homePresence;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HomePresence homePresence = (HomePresence) o;
return Objects.equals(this.homePresence, homePresence.homePresence);
}
@Override
public int hashCode() {
return Objects.hash(homePresence);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HomePresence {\n");
sb.append(" homePresence: ").append(toIndentedString(homePresence)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,101 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HomeState {
@SerializedName("presence")
private PresenceState presence = null;
@SerializedName("name")
private String name = null;
@SerializedName("presenceLocked")
private Boolean presenceLocked = null;
@SerializedName("showHomePresenceSwitchButton")
private Boolean showHomePresenceSwitchButton = null;
public HomeState presence(PresenceState presence) {
this.presence = presence;
return this;
}
public PresenceState getPresence() {
return presence;
}
public void setPresence(PresenceState presence) {
this.presence = presence;
}
public String getName() {
return name;
}
public Boolean isPresenceLocked() {
return presenceLocked;
}
public Boolean isShowHomePresenceSwitchButton() {
return showHomePresenceSwitchButton;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HomeState homeState = (HomeState) o;
return Objects.equals(this.presence, homeState.presence) && Objects.equals(this.name, homeState.name)
&& Objects.equals(this.presenceLocked, homeState.presenceLocked)
&& Objects.equals(this.showHomePresenceSwitchButton, homeState.showHomePresenceSwitchButton);
}
@Override
public int hashCode() {
return Objects.hash(presence, name, presenceLocked, showHomePresenceSwitchButton);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HomeState {\n");
sb.append(" presence: ").append(toIndentedString(presence)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" presenceLocked: ").append(toIndentedString(presenceLocked)).append("\n");
sb.append(" showHomePresenceSwitchButton: ").append(toIndentedString(showHomePresenceSwitchButton))
.append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HotWaterCapabilities extends GenericZoneCapabilities {
@SerializedName("canSetTemperature")
private Boolean canSetTemperature = null;
@SerializedName("temperatures")
private TemperatureRange temperatures = null;
public HotWaterCapabilities canSetTemperature(Boolean canSetTemperature) {
this.canSetTemperature = canSetTemperature;
return this;
}
public Boolean isCanSetTemperature() {
return canSetTemperature;
}
public void setCanSetTemperature(Boolean canSetTemperature) {
this.canSetTemperature = canSetTemperature;
}
public HotWaterCapabilities temperatures(TemperatureRange temperatures) {
this.temperatures = temperatures;
return this;
}
public TemperatureRange getTemperatures() {
return temperatures;
}
public void setTemperatures(TemperatureRange temperatures) {
this.temperatures = temperatures;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HotWaterCapabilities hotWaterCapabilities = (HotWaterCapabilities) o;
return Objects.equals(this.canSetTemperature, hotWaterCapabilities.canSetTemperature)
&& Objects.equals(this.temperatures, hotWaterCapabilities.temperatures) && super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(canSetTemperature, temperatures, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HotWaterCapabilities {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" canSetTemperature: ").append(toIndentedString(canSetTemperature)).append("\n");
sb.append(" temperatures: ").append(toIndentedString(temperatures)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class HotWaterZoneSetting extends GenericZoneSetting {
@SerializedName("power")
private Power power = null;
@SerializedName("temperature")
private TemperatureObject temperature = null;
public HotWaterZoneSetting power(Power power) {
this.power = power;
return this;
}
public Power getPower() {
return power;
}
public void setPower(Power power) {
this.power = power;
}
public HotWaterZoneSetting temperature(TemperatureObject temperature) {
this.temperature = temperature;
return this;
}
public TemperatureObject getTemperature() {
return temperature;
}
public void setTemperature(TemperatureObject temperature) {
this.temperature = temperature;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HotWaterZoneSetting hotWaterZoneSetting = (HotWaterZoneSetting) o;
return Objects.equals(this.power, hotWaterZoneSetting.power)
&& Objects.equals(this.temperature, hotWaterZoneSetting.temperature) && super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(power, temperature, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HotWaterZoneSetting {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" power: ").append(toIndentedString(power)).append("\n");
sb.append(" temperature: ").append(toIndentedString(temperature)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,109 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class IntRange {
@SerializedName("min")
private Integer min = null;
@SerializedName("max")
private Integer max = null;
@SerializedName("step")
private Float step = null;
public IntRange min(Integer min) {
this.min = min;
return this;
}
public Integer getMin() {
return min;
}
public void setMin(Integer min) {
this.min = min;
}
public IntRange max(Integer max) {
this.max = max;
return this;
}
public Integer getMax() {
return max;
}
public void setMax(Integer max) {
this.max = max;
}
public IntRange step(Float step) {
this.step = step;
return this;
}
public Float getStep() {
return step;
}
public void setStep(Float step) {
this.step = step;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IntRange intRange = (IntRange) o;
return Objects.equals(this.min, intRange.min) && Objects.equals(this.max, intRange.max)
&& Objects.equals(this.step, intRange.step);
}
@Override
public int hashCode() {
return Objects.hash(min, max, step);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IntRange {\n");
sb.append(" min: ").append(toIndentedString(min)).append("\n");
sb.append(" max: ").append(toIndentedString(max)).append("\n");
sb.append(" step: ").append(toIndentedString(step)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,140 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class Link {
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
ONLINE("ONLINE"),
OFFLINE("OFFLINE");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String text) {
for (StateEnum b : StateEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StateEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("state")
private StateEnum state = null;
@SerializedName("reason")
private LinkReason reason = null;
public Link state(StateEnum state) {
this.state = state;
return this;
}
public StateEnum getState() {
return state;
}
public void setState(StateEnum state) {
this.state = state;
}
public Link reason(LinkReason reason) {
this.reason = reason;
return this;
}
public LinkReason getReason() {
return reason;
}
public void setReason(LinkReason reason) {
this.reason = reason;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Link link = (Link) o;
return Objects.equals(this.state, link.state) && Objects.equals(this.reason, link.reason);
}
@Override
public int hashCode() {
return Objects.hash(state, reason);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Link {\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,91 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class LinkReason {
@SerializedName("code")
private String code = null;
@SerializedName("title")
private String title = null;
public LinkReason code(String code) {
this.code = code;
return this;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public LinkReason title(String title) {
this.title = title;
return this;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LinkReason linkReason = (LinkReason) o;
return Objects.equals(this.code, linkReason.code) && Objects.equals(this.title, linkReason.title);
}
@Override
public int hashCode() {
return Objects.hash(code, title);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LinkReason {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,55 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ManualTerminationCondition extends OverlayTerminationCondition {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ManualTerminationCondition {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,118 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class MobileDevice {
@SerializedName("id")
private Integer id = null;
@SerializedName("name")
private String name = null;
@SerializedName("settings")
private MobileDeviceSettings settings = null;
@SerializedName("location")
private MobileDeviceLocation location = null;
public Integer getId() {
return id;
}
public MobileDevice name(String name) {
this.name = name;
return this;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public MobileDevice settings(MobileDeviceSettings settings) {
this.settings = settings;
return this;
}
public MobileDeviceSettings getSettings() {
return settings;
}
public void setSettings(MobileDeviceSettings settings) {
this.settings = settings;
}
public MobileDevice location(MobileDeviceLocation location) {
this.location = location;
return this;
}
public MobileDeviceLocation getLocation() {
return location;
}
public void setLocation(MobileDeviceLocation location) {
this.location = location;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MobileDevice mobileDevice = (MobileDevice) o;
return Objects.equals(this.id, mobileDevice.id) && Objects.equals(this.name, mobileDevice.name)
&& Objects.equals(this.settings, mobileDevice.settings)
&& Objects.equals(this.location, mobileDevice.location);
}
@Override
public int hashCode() {
return Objects.hash(id, name, settings, location);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MobileDevice {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" settings: ").append(toIndentedString(settings)).append("\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class MobileDeviceLocation {
@SerializedName("stale")
private Boolean stale = null;
@SerializedName("atHome")
private Boolean atHome = null;
public MobileDeviceLocation stale(Boolean stale) {
this.stale = stale;
return this;
}
public Boolean isStale() {
return stale;
}
public void setStale(Boolean stale) {
this.stale = stale;
}
public MobileDeviceLocation atHome(Boolean atHome) {
this.atHome = atHome;
return this;
}
public Boolean isAtHome() {
return atHome;
}
public void setAtHome(Boolean atHome) {
this.atHome = atHome;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MobileDeviceLocation mobileDeviceLocation = (MobileDeviceLocation) o;
return Objects.equals(this.stale, mobileDeviceLocation.stale)
&& Objects.equals(this.atHome, mobileDeviceLocation.atHome);
}
@Override
public int hashCode() {
return Objects.hash(stale, atHome);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MobileDeviceLocation {\n");
sb.append(" stale: ").append(toIndentedString(stale)).append("\n");
sb.append(" atHome: ").append(toIndentedString(atHome)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class MobileDeviceSettings {
@SerializedName("geoTrackingEnabled")
private Boolean geoTrackingEnabled = null;
public MobileDeviceSettings geoTrackingEnabled(Boolean geoTrackingEnabled) {
this.geoTrackingEnabled = geoTrackingEnabled;
return this;
}
public Boolean isGeoTrackingEnabled() {
return geoTrackingEnabled;
}
public void setGeoTrackingEnabled(Boolean geoTrackingEnabled) {
this.geoTrackingEnabled = geoTrackingEnabled;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MobileDeviceSettings mobileDeviceSettings = (MobileDeviceSettings) o;
return Objects.equals(this.geoTrackingEnabled, mobileDeviceSettings.geoTrackingEnabled);
}
@Override
public int hashCode() {
return Objects.hash(geoTrackingEnabled);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MobileDeviceSettings {\n");
sb.append(" geoTrackingEnabled: ").append(toIndentedString(geoTrackingEnabled)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,111 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class OpenWindow {
@SerializedName("durationInSeconds")
private Integer durationInSeconds = null;
@SerializedName("expiry")
private OffsetDateTime expiry = null;
@SerializedName("remainingTimeInSeconds")
private Integer remainingTimeInSeconds = null;
public OpenWindow durationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
return this;
}
public Integer getDurationInSeconds() {
return durationInSeconds;
}
public void setDurationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
}
public OpenWindow expiry(OffsetDateTime expiry) {
this.expiry = expiry;
return this;
}
public OffsetDateTime getExpiry() {
return expiry;
}
public void setExpiry(OffsetDateTime expiry) {
this.expiry = expiry;
}
public OpenWindow remainingTimeInSeconds(Integer remainingTimeInSeconds) {
this.remainingTimeInSeconds = remainingTimeInSeconds;
return this;
}
public Integer getRemainingTimeInSeconds() {
return remainingTimeInSeconds;
}
public void setRemainingTimeInSeconds(Integer remainingTimeInSeconds) {
this.remainingTimeInSeconds = remainingTimeInSeconds;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OpenWindow openWindow = (OpenWindow) o;
return Objects.equals(this.durationInSeconds, openWindow.durationInSeconds)
&& Objects.equals(this.expiry, openWindow.expiry)
&& Objects.equals(this.remainingTimeInSeconds, openWindow.remainingTimeInSeconds);
}
@Override
public int hashCode() {
return Objects.hash(durationInSeconds, expiry, remainingTimeInSeconds);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OpenWindow {\n");
sb.append(" durationInSeconds: ").append(toIndentedString(durationInSeconds)).append("\n");
sb.append(" expiry: ").append(toIndentedString(expiry)).append("\n");
sb.append(" remainingTimeInSeconds: ").append(toIndentedString(remainingTimeInSeconds)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,91 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class Overlay {
@SerializedName("setting")
private GenericZoneSetting setting = null;
@SerializedName("termination")
private OverlayTerminationCondition termination = null;
public Overlay setting(GenericZoneSetting setting) {
this.setting = setting;
return this;
}
public GenericZoneSetting getSetting() {
return setting;
}
public void setSetting(GenericZoneSetting setting) {
this.setting = setting;
}
public Overlay termination(OverlayTerminationCondition termination) {
this.termination = termination;
return this;
}
public OverlayTerminationCondition getTermination() {
return termination;
}
public void setTermination(OverlayTerminationCondition termination) {
this.termination = termination;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Overlay overlay = (Overlay) o;
return Objects.equals(this.setting, overlay.setting) && Objects.equals(this.termination, overlay.termination);
}
@Override
public int hashCode() {
return Objects.hash(setting, termination);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Overlay {\n");
sb.append(" setting: ").append(toIndentedString(setting)).append("\n");
sb.append(" termination: ").append(toIndentedString(termination)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class OverlayTemplate {
@SerializedName("terminationCondition")
private OverlayTerminationConditionTemplate terminationCondition = null;
public OverlayTemplate terminationCondition(OverlayTerminationConditionTemplate terminationCondition) {
this.terminationCondition = terminationCondition;
return this;
}
public OverlayTerminationConditionTemplate getTerminationCondition() {
return terminationCondition;
}
public void setTerminationCondition(OverlayTerminationConditionTemplate terminationCondition) {
this.terminationCondition = terminationCondition;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OverlayTemplate overlayTemplate = (OverlayTemplate) o;
return Objects.equals(this.terminationCondition, overlayTemplate.terminationCondition);
}
@Override
public int hashCode() {
return Objects.hash(terminationCondition);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OverlayTemplate {\n");
sb.append(" terminationCondition: ").append(toIndentedString(terminationCondition)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,84 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class OverlayTerminationCondition {
@SerializedName("type")
private OverlayTerminationConditionType type = null;
@SerializedName("projectedExpiry")
private OffsetDateTime projectedExpiry = null;
public OverlayTerminationCondition type(OverlayTerminationConditionType type) {
this.type = type;
return this;
}
public OverlayTerminationConditionType getType() {
return type;
}
public void setType(OverlayTerminationConditionType type) {
this.type = type;
}
public OffsetDateTime getProjectedExpiry() {
return projectedExpiry;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OverlayTerminationCondition overlayTerminationCondition = (OverlayTerminationCondition) o;
return Objects.equals(this.type, overlayTerminationCondition.type)
&& Objects.equals(this.projectedExpiry, overlayTerminationCondition.projectedExpiry);
}
@Override
public int hashCode() {
return Objects.hash(type, projectedExpiry);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OverlayTerminationCondition {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" projectedExpiry: ").append(toIndentedString(projectedExpiry)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class OverlayTerminationConditionTemplate {
@SerializedName("type")
private OverlayTerminationConditionType type = null;
public OverlayTerminationConditionTemplate type(OverlayTerminationConditionType type) {
this.type = type;
return this;
}
public OverlayTerminationConditionType getType() {
return type;
}
public void setType(OverlayTerminationConditionType type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OverlayTerminationConditionTemplate overlayTerminationConditionTemplate = (OverlayTerminationConditionTemplate) o;
return Objects.equals(this.type, overlayTerminationConditionTemplate.type);
}
@Override
public int hashCode() {
return Objects.hash(type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OverlayTerminationConditionTemplate {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,73 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(OverlayTerminationConditionType.Adapter.class)
public enum OverlayTerminationConditionType {
MANUAL("MANUAL"),
TADO_MODE("TADO_MODE"),
TIMER("TIMER");
private String value;
OverlayTerminationConditionType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static OverlayTerminationConditionType fromValue(String text) {
for (OverlayTerminationConditionType b : OverlayTerminationConditionType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<OverlayTerminationConditionType> {
@Override
public void write(final JsonWriter jsonWriter, final OverlayTerminationConditionType enumeration)
throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public OverlayTerminationConditionType read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return OverlayTerminationConditionType.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,93 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class PercentageDataPoint {
@SerializedName("timestamp")
private OffsetDateTime timestamp = null;
@SerializedName("percentage")
private Float percentage = null;
public PercentageDataPoint timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
return this;
}
public OffsetDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
}
public PercentageDataPoint percentage(Float percentage) {
this.percentage = percentage;
return this;
}
public Float getPercentage() {
return percentage;
}
public void setPercentage(Float percentage) {
this.percentage = percentage;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PercentageDataPoint percentageDataPoint = (PercentageDataPoint) o;
return Objects.equals(this.timestamp, percentageDataPoint.timestamp)
&& Objects.equals(this.percentage, percentageDataPoint.percentage);
}
@Override
public int hashCode() {
return Objects.hash(timestamp, percentage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PercentageDataPoint {\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,70 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(Power.Adapter.class)
public enum Power {
ON("ON"),
OFF("OFF");
private String value;
Power(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static Power fromValue(String text) {
for (Power b : Power.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<Power> {
@Override
public void write(final JsonWriter jsonWriter, final Power enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public Power read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return Power.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,110 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class Preparation {
@SerializedName("tadoMode")
private TadoMode tadoMode = null;
@SerializedName("end")
private OffsetDateTime end = null;
@SerializedName("setting")
private GenericZoneSetting setting = null;
public Preparation tadoMode(TadoMode tadoMode) {
this.tadoMode = tadoMode;
return this;
}
public TadoMode getTadoMode() {
return tadoMode;
}
public void setTadoMode(TadoMode tadoMode) {
this.tadoMode = tadoMode;
}
public Preparation end(OffsetDateTime end) {
this.end = end;
return this;
}
public OffsetDateTime getEnd() {
return end;
}
public void setEnd(OffsetDateTime end) {
this.end = end;
}
public Preparation setting(GenericZoneSetting setting) {
this.setting = setting;
return this;
}
public GenericZoneSetting getSetting() {
return setting;
}
public void setSetting(GenericZoneSetting setting) {
this.setting = setting;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Preparation preparation = (Preparation) o;
return Objects.equals(this.tadoMode, preparation.tadoMode) && Objects.equals(this.end, preparation.end)
&& Objects.equals(this.setting, preparation.setting);
}
@Override
public int hashCode() {
return Objects.hash(tadoMode, end, setting);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Preparation {\n");
sb.append(" tadoMode: ").append(toIndentedString(tadoMode)).append("\n");
sb.append(" end: ").append(toIndentedString(end)).append("\n");
sb.append(" setting: ").append(toIndentedString(setting)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,70 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(PresenceState.Adapter.class)
public enum PresenceState {
HOME("HOME"),
AWAY("AWAY");
private String value;
PresenceState(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PresenceState fromValue(String text) {
for (PresenceState b : PresenceState.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<PresenceState> {
@Override
public void write(final JsonWriter jsonWriter, final PresenceState enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PresenceState read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return PresenceState.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class SensorDataPoints {
@SerializedName("insideTemperature")
private TemperatureDataPoint insideTemperature = null;
@SerializedName("humidity")
private PercentageDataPoint humidity = null;
public SensorDataPoints insideTemperature(TemperatureDataPoint insideTemperature) {
this.insideTemperature = insideTemperature;
return this;
}
public TemperatureDataPoint getInsideTemperature() {
return insideTemperature;
}
public void setInsideTemperature(TemperatureDataPoint insideTemperature) {
this.insideTemperature = insideTemperature;
}
public SensorDataPoints humidity(PercentageDataPoint humidity) {
this.humidity = humidity;
return this;
}
public PercentageDataPoint getHumidity() {
return humidity;
}
public void setHumidity(PercentageDataPoint humidity) {
this.humidity = humidity;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SensorDataPoints sensorDataPoints = (SensorDataPoints) o;
return Objects.equals(this.insideTemperature, sensorDataPoints.insideTemperature)
&& Objects.equals(this.humidity, sensorDataPoints.humidity);
}
@Override
public int hashCode() {
return Objects.hash(insideTemperature, humidity);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SensorDataPoints {\n");
sb.append(" insideTemperature: ").append(toIndentedString(insideTemperature)).append("\n");
sb.append(" humidity: ").append(toIndentedString(humidity)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,72 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(TadoMode.Adapter.class)
public enum TadoMode {
HOME("HOME"),
SLEEP("SLEEP"),
AWAY("AWAY");
private String value;
TadoMode(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TadoMode fromValue(String text) {
for (TadoMode b : TadoMode.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TadoMode> {
@Override
public void write(final JsonWriter jsonWriter, final TadoMode enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TadoMode read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TadoMode.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,55 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class TadoModeTerminationCondition extends OverlayTerminationCondition {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TadoModeTerminationCondition {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,72 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(TadoSystemType.Adapter.class)
public enum TadoSystemType {
HEATING("HEATING"),
AIR_CONDITIONING("AIR_CONDITIONING"),
HOT_WATER("HOT_WATER");
private String value;
TadoSystemType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TadoSystemType fromValue(String text) {
for (TadoSystemType b : TadoSystemType.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TadoSystemType> {
@Override
public void write(final JsonWriter jsonWriter, final TadoSystemType enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TadoSystemType read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TadoSystemType.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,111 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class TemperatureDataPoint {
@SerializedName("timestamp")
private OffsetDateTime timestamp = null;
@SerializedName("celsius")
private Float celsius = null;
@SerializedName("fahrenheit")
private Float fahrenheit = null;
public TemperatureDataPoint timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
return this;
}
public OffsetDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
}
public TemperatureDataPoint celsius(Float celsius) {
this.celsius = celsius;
return this;
}
public Float getCelsius() {
return celsius;
}
public void setCelsius(Float celsius) {
this.celsius = celsius;
}
public TemperatureDataPoint fahrenheit(Float fahrenheit) {
this.fahrenheit = fahrenheit;
return this;
}
public Float getFahrenheit() {
return fahrenheit;
}
public void setFahrenheit(Float fahrenheit) {
this.fahrenheit = fahrenheit;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TemperatureDataPoint temperatureDataPoint = (TemperatureDataPoint) o;
return Objects.equals(this.timestamp, temperatureDataPoint.timestamp)
&& Objects.equals(this.celsius, temperatureDataPoint.celsius)
&& Objects.equals(this.fahrenheit, temperatureDataPoint.fahrenheit);
}
@Override
public int hashCode() {
return Objects.hash(timestamp, celsius, fahrenheit);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TemperatureDataPoint {\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" celsius: ").append(toIndentedString(celsius)).append("\n");
sb.append(" fahrenheit: ").append(toIndentedString(fahrenheit)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class TemperatureObject {
@SerializedName("celsius")
private Float celsius = null;
@SerializedName("fahrenheit")
private Float fahrenheit = null;
public TemperatureObject celsius(Float celsius) {
this.celsius = celsius;
return this;
}
public Float getCelsius() {
return celsius;
}
public void setCelsius(Float celsius) {
this.celsius = celsius;
}
public TemperatureObject fahrenheit(Float fahrenheit) {
this.fahrenheit = fahrenheit;
return this;
}
public Float getFahrenheit() {
return fahrenheit;
}
public void setFahrenheit(Float fahrenheit) {
this.fahrenheit = fahrenheit;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TemperatureObject temperatureObject = (TemperatureObject) o;
return Objects.equals(this.celsius, temperatureObject.celsius)
&& Objects.equals(this.fahrenheit, temperatureObject.fahrenheit);
}
@Override
public int hashCode() {
return Objects.hash(celsius, fahrenheit);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TemperatureObject {\n");
sb.append(" celsius: ").append(toIndentedString(celsius)).append("\n");
sb.append(" fahrenheit: ").append(toIndentedString(fahrenheit)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,92 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class TemperatureRange {
@SerializedName("celsius")
private IntRange celsius = null;
@SerializedName("fahrenheit")
private IntRange fahrenheit = null;
public TemperatureRange celsius(IntRange celsius) {
this.celsius = celsius;
return this;
}
public IntRange getCelsius() {
return celsius;
}
public void setCelsius(IntRange celsius) {
this.celsius = celsius;
}
public TemperatureRange fahrenheit(IntRange fahrenheit) {
this.fahrenheit = fahrenheit;
return this;
}
public IntRange getFahrenheit() {
return fahrenheit;
}
public void setFahrenheit(IntRange fahrenheit) {
this.fahrenheit = fahrenheit;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TemperatureRange temperatureRange = (TemperatureRange) o;
return Objects.equals(this.celsius, temperatureRange.celsius)
&& Objects.equals(this.fahrenheit, temperatureRange.fahrenheit);
}
@Override
public int hashCode() {
return Objects.hash(celsius, fahrenheit);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TemperatureRange {\n");
sb.append(" celsius: ").append(toIndentedString(celsius)).append("\n");
sb.append(" fahrenheit: ").append(toIndentedString(fahrenheit)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,70 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
@JsonAdapter(TemperatureUnit.Adapter.class)
public enum TemperatureUnit {
CELSIUS("CELSIUS"),
FAHRENHEIT("FAHRENHEIT");
private String value;
TemperatureUnit(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TemperatureUnit fromValue(String text) {
for (TemperatureUnit b : TemperatureUnit.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter<TemperatureUnit> {
@Override
public void write(final JsonWriter jsonWriter, final TemperatureUnit enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TemperatureUnit read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TemperatureUnit.fromValue(String.valueOf(value));
}
}
}

View File

@ -0,0 +1,103 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.time.OffsetDateTime;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class TimerTerminationCondition extends OverlayTerminationCondition {
@SerializedName("durationInSeconds")
private Integer durationInSeconds = null;
@SerializedName("expiry")
private OffsetDateTime expiry = null;
@SerializedName("remainingTimeInSeconds")
private Integer remainingTimeInSeconds = null;
public TimerTerminationCondition durationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
return this;
}
public Integer getDurationInSeconds() {
return durationInSeconds;
}
public void setDurationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
}
public OffsetDateTime getExpiry() {
return expiry;
}
public TimerTerminationCondition remainingTimeInSeconds(Integer remainingTimeInSeconds) {
this.remainingTimeInSeconds = remainingTimeInSeconds;
return this;
}
public Integer getRemainingTimeInSeconds() {
return remainingTimeInSeconds;
}
public void setRemainingTimeInSeconds(Integer remainingTimeInSeconds) {
this.remainingTimeInSeconds = remainingTimeInSeconds;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TimerTerminationCondition timerTerminationCondition = (TimerTerminationCondition) o;
return Objects.equals(this.durationInSeconds, timerTerminationCondition.durationInSeconds)
&& Objects.equals(this.expiry, timerTerminationCondition.expiry)
&& Objects.equals(this.remainingTimeInSeconds, timerTerminationCondition.remainingTimeInSeconds)
&& super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(durationInSeconds, expiry, remainingTimeInSeconds, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TimerTerminationCondition {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" durationInSeconds: ").append(toIndentedString(durationInSeconds)).append("\n");
sb.append(" expiry: ").append(toIndentedString(expiry)).append("\n");
sb.append(" remainingTimeInSeconds: ").append(toIndentedString(remainingTimeInSeconds)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,75 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class TimerTerminationConditionTemplate extends OverlayTerminationConditionTemplate {
@SerializedName("durationInSeconds")
private Integer durationInSeconds = null;
public TimerTerminationConditionTemplate durationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
return this;
}
public Integer getDurationInSeconds() {
return durationInSeconds;
}
public void setDurationInSeconds(Integer durationInSeconds) {
this.durationInSeconds = durationInSeconds;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TimerTerminationConditionTemplate timerTerminationConditionTemplate = (TimerTerminationConditionTemplate) o;
return Objects.equals(this.durationInSeconds, timerTerminationConditionTemplate.durationInSeconds)
&& super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(durationInSeconds, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TimerTerminationConditionTemplate {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" durationInSeconds: ").append(toIndentedString(durationInSeconds)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,171 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class User {
@SerializedName("name")
private String name = null;
@SerializedName("id")
private String id = null;
@SerializedName("email")
private String email = null;
@SerializedName("username")
private String username = null;
@SerializedName("homes")
private List<UserHomes> homes = null;
@SerializedName("locale")
private String locale = null;
public User name(String name) {
this.name = name;
return this;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public User id(String id) {
this.id = id;
return this;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public User email(String email) {
this.email = email;
return this;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public User username(String username) {
this.username = username;
return this;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public User homes(List<UserHomes> homes) {
this.homes = homes;
return this;
}
public User addHomesItem(UserHomes homesItem) {
if (this.homes == null) {
this.homes = new ArrayList<>();
}
this.homes.add(homesItem);
return this;
}
public List<UserHomes> getHomes() {
return homes;
}
public void setHomes(List<UserHomes> homes) {
this.homes = homes;
}
public User locale(String locale) {
this.locale = locale;
return this;
}
public String getLocale() {
return locale;
}
public void setLocale(String locale) {
this.locale = locale;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return Objects.equals(this.name, user.name) && Objects.equals(this.id, user.id)
&& Objects.equals(this.email, user.email) && Objects.equals(this.username, user.username)
&& Objects.equals(this.homes, user.homes) && Objects.equals(this.locale, user.locale);
}
@Override
public int hashCode() {
return Objects.hash(name, id, email, username, homes, locale);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class User {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" homes: ").append(toIndentedString(homes)).append("\n");
sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,74 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class UserHomes {
@SerializedName("id")
private Integer id = null;
public UserHomes id(Integer id) {
this.id = id;
return this;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserHomes userHomes = (UserHomes) o;
return Objects.equals(this.id, userHomes.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserHomes {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,127 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class Zone {
@SerializedName("id")
private Integer id = null;
@SerializedName("name")
private String name = null;
@SerializedName("type")
private TadoSystemType type = null;
@SerializedName("devices")
private List<ControlDevice> devices = null;
public Integer getId() {
return id;
}
public Zone name(String name) {
this.name = name;
return this;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Zone type(TadoSystemType type) {
this.type = type;
return this;
}
public TadoSystemType getType() {
return type;
}
public void setType(TadoSystemType type) {
this.type = type;
}
public Zone devices(List<ControlDevice> devices) {
this.devices = devices;
return this;
}
public Zone addDevicesItem(ControlDevice devicesItem) {
if (this.devices == null) {
this.devices = new ArrayList<>();
}
this.devices.add(devicesItem);
return this;
}
public List<ControlDevice> getDevices() {
return devices;
}
public void setDevices(List<ControlDevice> devices) {
this.devices = devices;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Zone zone = (Zone) o;
return Objects.equals(this.id, zone.id) && Objects.equals(this.name, zone.name)
&& Objects.equals(this.type, zone.type) && Objects.equals(this.devices, zone.devices);
}
@Override
public int hashCode() {
return Objects.hash(id, name, type, devices);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Zone {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" devices: ").append(toIndentedString(devices)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,236 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tado.swagger.codegen.api.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
/**
* Static imported copy of the Java file originally created by Swagger Codegen.
*
* @author Andrew Fiddian-Green - Initial contribution
*/
public class ZoneState {
@SerializedName("tadoMode")
private TadoMode tadoMode = null;
@SerializedName("preparation")
private Preparation preparation = null;
@SerializedName("geolocationOverride")
private Boolean geolocationOverride = null;
@SerializedName("overlay")
private Overlay overlay = null;
@SerializedName("setting")
private GenericZoneSetting setting = null;
@SerializedName("openWindow")
private OpenWindow openWindow = null;
@SerializedName("openWindowDetected")
private Boolean openWindowDetected = null;
@SerializedName("link")
private Link link = null;
@SerializedName("activityDataPoints")
private ActivityDataPoints activityDataPoints = null;
@SerializedName("sensorDataPoints")
private SensorDataPoints sensorDataPoints = null;
public ZoneState tadoMode(TadoMode tadoMode) {
this.tadoMode = tadoMode;
return this;
}
public TadoMode getTadoMode() {
return tadoMode;
}
public void setTadoMode(TadoMode tadoMode) {
this.tadoMode = tadoMode;
}
public ZoneState preparation(Preparation preparation) {
this.preparation = preparation;
return this;
}
public Preparation getPreparation() {
return preparation;
}
public void setPreparation(Preparation preparation) {
this.preparation = preparation;
}
public ZoneState geolocationOverride(Boolean geolocationOverride) {
this.geolocationOverride = geolocationOverride;
return this;
}
public Boolean isGeolocationOverride() {
return geolocationOverride;
}
public void setGeolocationOverride(Boolean geolocationOverride) {
this.geolocationOverride = geolocationOverride;
}
public ZoneState overlay(Overlay overlay) {
this.overlay = overlay;
return this;
}
public Overlay getOverlay() {
return overlay;
}
public void setOverlay(Overlay overlay) {
this.overlay = overlay;
}
public ZoneState setting(GenericZoneSetting setting) {
this.setting = setting;
return this;
}
public GenericZoneSetting getSetting() {
return setting;
}
public void setSetting(GenericZoneSetting setting) {
this.setting = setting;
}
public ZoneState openWindow(OpenWindow openWindow) {
this.openWindow = openWindow;
return this;
}
public OpenWindow getOpenWindow() {
return openWindow;
}
public void setOpenWindow(OpenWindow openWindow) {
this.openWindow = openWindow;
}
public ZoneState openWindowDetected(Boolean openWindowDetected) {
this.openWindowDetected = openWindowDetected;
return this;
}
public Boolean isOpenWindowDetected() {
return openWindowDetected;
}
public void setOpenWindowDetected(Boolean openWindowDetected) {
this.openWindowDetected = openWindowDetected;
}
public ZoneState link(Link link) {
this.link = link;
return this;
}
public Link getLink() {
return link;
}
public void setLink(Link link) {
this.link = link;
}
public ZoneState activityDataPoints(ActivityDataPoints activityDataPoints) {
this.activityDataPoints = activityDataPoints;
return this;
}
public ActivityDataPoints getActivityDataPoints() {
return activityDataPoints;
}
public void setActivityDataPoints(ActivityDataPoints activityDataPoints) {
this.activityDataPoints = activityDataPoints;
}
public ZoneState sensorDataPoints(SensorDataPoints sensorDataPoints) {
this.sensorDataPoints = sensorDataPoints;
return this;
}
public SensorDataPoints getSensorDataPoints() {
return sensorDataPoints;
}
public void setSensorDataPoints(SensorDataPoints sensorDataPoints) {
this.sensorDataPoints = sensorDataPoints;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ZoneState zoneState = (ZoneState) o;
return Objects.equals(this.tadoMode, zoneState.tadoMode)
&& Objects.equals(this.preparation, zoneState.preparation)
&& Objects.equals(this.geolocationOverride, zoneState.geolocationOverride)
&& Objects.equals(this.overlay, zoneState.overlay) && Objects.equals(this.setting, zoneState.setting)
&& Objects.equals(this.openWindow, zoneState.openWindow)
&& Objects.equals(this.openWindowDetected, zoneState.openWindowDetected)
&& Objects.equals(this.link, zoneState.link)
&& Objects.equals(this.activityDataPoints, zoneState.activityDataPoints)
&& Objects.equals(this.sensorDataPoints, zoneState.sensorDataPoints);
}
@Override
public int hashCode() {
return Objects.hash(tadoMode, preparation, geolocationOverride, overlay, setting, openWindow,
openWindowDetected, link, activityDataPoints, sensorDataPoints);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ZoneState {\n");
sb.append(" tadoMode: ").append(toIndentedString(tadoMode)).append("\n");
sb.append(" preparation: ").append(toIndentedString(preparation)).append("\n");
sb.append(" geolocationOverride: ").append(toIndentedString(geolocationOverride)).append("\n");
sb.append(" overlay: ").append(toIndentedString(overlay)).append("\n");
sb.append(" setting: ").append(toIndentedString(setting)).append("\n");
sb.append(" openWindow: ").append(toIndentedString(openWindow)).append("\n");
sb.append(" openWindowDetected: ").append(toIndentedString(openWindowDetected)).append("\n");
sb.append(" link: ").append(toIndentedString(link)).append("\n");
sb.append(" activityDataPoints: ").append(toIndentedString(activityDataPoints)).append("\n");
sb.append(" sensorDataPoints: ").append(toIndentedString(sensorDataPoints)).append("\n");
sb.append("}");
return sb.toString();
}
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -20,16 +20,16 @@ import java.util.Optional;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.junit.jupiter.api.Test;
import org.openhab.binding.tado.internal.CapabilitiesSupport;
import org.openhab.binding.tado.internal.api.model.ACFanLevel;
import org.openhab.binding.tado.internal.api.model.ACVerticalSwing;
import org.openhab.binding.tado.internal.api.model.AcFanSpeed;
import org.openhab.binding.tado.internal.api.model.AcModeCapabilities;
import org.openhab.binding.tado.internal.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.internal.api.model.ControlDevice;
import org.openhab.binding.tado.internal.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.internal.api.model.Power;
import org.openhab.binding.tado.internal.api.model.TadoSystemType;
import org.openhab.binding.tado.internal.api.model.Zone;
import org.openhab.binding.tado.swagger.codegen.api.model.ACFanLevel;
import org.openhab.binding.tado.swagger.codegen.api.model.ACVerticalSwing;
import org.openhab.binding.tado.swagger.codegen.api.model.AcFanSpeed;
import org.openhab.binding.tado.swagger.codegen.api.model.AcModeCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.AirConditioningCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.ControlDevice;
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneCapabilities;
import org.openhab.binding.tado.swagger.codegen.api.model.Power;
import org.openhab.binding.tado.swagger.codegen.api.model.TadoSystemType;
import org.openhab.binding.tado.swagger.codegen.api.model.Zone;
import com.google.gson.Gson;