Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 73a1e55

Browse files
authored
Merge pull request #672 from Pengpengwanga/upgrade
Create data model for power setting
2 parents a4cacea + 00e5d6c commit 73a1e55

File tree

5 files changed

+173
-0
lines changed

5 files changed

+173
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Copyright 2021 VMware, Inc.
3+
* SPDX-License-Identifier: BSD-2-Clause
4+
*/
5+
package com.vmware.flowgate.openmanage.datamodel;
6+
7+
public enum PowerDisplayUnit {
8+
9+
Watt(1),
10+
BTUPerHr(2);
11+
private int value;
12+
13+
PowerDisplayUnit(int value) {
14+
this.value = value;
15+
}
16+
17+
public int getValue() {
18+
return value;
19+
}
20+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2021 VMware, Inc.
3+
* SPDX-License-Identifier: BSD-2-Clause
4+
*/
5+
package com.vmware.flowgate.openmanage.datamodel;
6+
7+
import java.util.List;
8+
9+
import com.fasterxml.jackson.annotation.JsonProperty;
10+
11+
public class PowerManageMetricsRequestBody {
12+
13+
@JsonProperty(value="PluginId")
14+
private String pluginId;
15+
@JsonProperty(value="EntityType")
16+
private int entityType;
17+
@JsonProperty(value="EntityId")
18+
private int entityId;
19+
@JsonProperty(value="MetricTypes")
20+
private List<Integer> metricTypes;
21+
@JsonProperty(value="Duration")
22+
private int duration;
23+
@JsonProperty(value="SortOrder")
24+
private int sortOrder;
25+
26+
public void setPluginId(String pluginId) {
27+
this.pluginId = pluginId;
28+
}
29+
public void setEntityType(int entityType) {
30+
this.entityType = entityType;
31+
}
32+
public void setEntityId(int entityId) {
33+
this.entityId = entityId;
34+
}
35+
public void setMetricTypes(List<Integer> metricTypes) {
36+
this.metricTypes = metricTypes;
37+
}
38+
public void setDuration(int duration) {
39+
this.duration = duration;
40+
}
41+
public void setSortOrder(int sortOrder) {
42+
this.sortOrder = sortOrder;
43+
}
44+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* Copyright 2021 VMware, Inc.
3+
* SPDX-License-Identifier: BSD-2-Clause
4+
*/
5+
package com.vmware.flowgate.openmanage.datamodel;
6+
7+
import com.fasterxml.jackson.annotation.JsonProperty;
8+
9+
/**
10+
* "@odata.type": "#PowerService.Settings",
11+
"Id": 1,
12+
"Name": "TEMPERATURE_DISPLAY_UNIT",
13+
"DefaultValue": 1,
14+
"Value": 1
15+
* @author pengpengw
16+
*
17+
*/
18+
public class PowerSetting {
19+
20+
@JsonProperty(value="@odata.type")
21+
private String odataType;
22+
@JsonProperty(value="Id")
23+
private int id;
24+
@JsonProperty(value="Name")
25+
private String name;
26+
@JsonProperty(value="DefaultValue")
27+
private int defaultValue;
28+
@JsonProperty(value="Value")
29+
private int value;
30+
public String getOdataType() {
31+
return odataType;
32+
}
33+
public void setOdataType(String odataType) {
34+
this.odataType = odataType;
35+
}
36+
public int getId() {
37+
return id;
38+
}
39+
public void setId(int id) {
40+
this.id = id;
41+
}
42+
public String getName() {
43+
return name;
44+
}
45+
public void setName(String name) {
46+
this.name = name;
47+
}
48+
public int getDefaultValue() {
49+
return defaultValue;
50+
}
51+
public void setDefaultValue(int defaultValue) {
52+
this.defaultValue = defaultValue;
53+
}
54+
public int getValue() {
55+
return value;
56+
}
57+
public void setValue(int value) {
58+
this.value = value;
59+
}
60+
61+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* Copyright 2021 VMware, Inc.
3+
* SPDX-License-Identifier: BSD-2-Clause
4+
*/
5+
package com.vmware.flowgate.openmanage.datamodel;
6+
7+
/**
8+
* The Id of PowerSetting
9+
* @author pengpengw
10+
*
11+
*/
12+
public enum PowerSettingType {
13+
14+
TemperatureUnit(1),
15+
PowerUnit(2),
16+
MetricGatheringInterval(3),
17+
BuiltinReportTimeInterval(5),
18+
BuiltinReportTimeGranularity(6),
19+
TopEnergyConsumersDuration(7),
20+
DeleteMetricData(8),
21+
ResetWSMANPowerMetricdata(9);
22+
23+
private int value;
24+
25+
PowerSettingType(int value) {
26+
this.value = value;
27+
}
28+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Copyright 2021 VMware, Inc.
3+
* SPDX-License-Identifier: BSD-2-Clause
4+
*/
5+
package com.vmware.flowgate.openmanage.datamodel;
6+
7+
public enum TemperatureDisplayUnit {
8+
9+
Celsius(1),
10+
Fahrenheit(2);
11+
private int value;
12+
13+
TemperatureDisplayUnit(int value) {
14+
this.value = value;
15+
}
16+
17+
public int getValue() {
18+
return value;
19+
}
20+
}

0 commit comments

Comments
 (0)