This repository was archived by the owner on Mar 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDeviceRequest.java
More file actions
103 lines (88 loc) · 3.05 KB
/
DeviceRequest.java
File metadata and controls
103 lines (88 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
Copyright 2020 Stijn Groenen
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package nl.stijngroenen.tradfri.payload;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import nl.stijngroenen.tradfri.device.BlindProperties;
import nl.stijngroenen.tradfri.device.LightProperties;
import nl.stijngroenen.tradfri.device.PlugProperties;
import nl.stijngroenen.tradfri.util.ApiCode;
/**
* The class that contains the payload for a request to update a IKEA TRÅDFRI device
* @author Stijn Groenen
* @version 1.0.0
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DeviceRequest {
/**
* The new properties of the light (if the device is a light)
*/
@JsonProperty(ApiCode.LIGHT)
private LightProperties[] lightProperties;
/**
* The new properties of the plug (if the device is a plug)
*/
@JsonProperty(ApiCode.PLUG)
private PlugProperties[] plugProperties;
/**
* The new properties of the Blind (if the device is a blind)
*/
@JsonProperty(ApiCode.BLIND)
private BlindProperties[] blindProperties;
/**
* Construct the DeviceRequest class
* @since 1.0.0
*/
public DeviceRequest(){
}
/**
* Get the new properties of the light (if the device is a light)
* @return The new properties of the light
* @since 1.0.0
*/
public LightProperties[] getLightProperties() {
return this.lightProperties;
}
/**
* Get the new properties of the plug (if the device is a plug)
* @return The new properties of the plug
* @since 1.0.0
*/
public PlugProperties[] getPlugProperties() {
return this.plugProperties;
}
/**
* Set the new properties of the light (if the device is a light)
* @param lightProperties The new properties of the light
* @since 1.0.0
*/
public void setLightProperties(LightProperties[] lightProperties) {
this.lightProperties = lightProperties;
}
/**
* Set the new properties of the plug (if the device is a plug)
* @param plugProperties The new properties of the plug
* @since 1.0.0
*/
public void setPlugProperties(PlugProperties[] plugProperties) {
this.plugProperties = plugProperties;
}
/**
* Set the new properties of the Blind (if the device is a blind)
* @param blindProperties The new properties of the blind
* @since 1.0.0
*/
public void setBlindProperties(BlindProperties[] blindProperties) {
this.blindProperties = blindProperties;
}
}