All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.zeroone3010.yahueapi.domain.LightState Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc
Show newest version
package io.github.zeroone3010.yahueapi.domain;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * A data transfer object to hold the properties received from the Hue Bridge. Do not try to use this class
 * to change the state of a light, use {@link io.github.zeroone3010.yahueapi.State} instead.
 */
public class LightState {
  @JsonProperty("on")
  private boolean on;
  @JsonProperty("bri")
  private int brightness;
  @JsonProperty("hue")
  private int hue;
  @JsonProperty("sat")
  private int saturation;
  @JsonProperty("effect")
  private String effect;
  @JsonProperty("xy")
  private List xy;
  @JsonProperty("ct")
  private int ct;
  @JsonProperty("alert")
  private String alert;
  @JsonProperty("colormode")
  private String colorMode;
  @JsonProperty("mode")
  private String mode;
  @JsonProperty("reachable")
  private boolean reachable;

  public boolean isOn() {
    return on;
  }

  public int getBrightness() {
    return brightness;
  }

  public int getHue() {
    return hue;
  }

  public int getSaturation() {
    return saturation;
  }

  public String getEffect() {
    return effect;
  }

  public List getXy() {
    return xy;
  }

  public int getCt() {
    return ct;
  }

  public String getAlert() {
    return alert;
  }

  public String getColorMode() {
    return colorMode;
  }

  public String getMode() {
    return mode;
  }

  public boolean isReachable() {
    return reachable;
  }

  @Override
  public String toString() {
    return JsonStringUtil.toJsonString(this);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy