Skip to content

Commit ec0b033

Browse files
committed
Updating AgentRequestVM
Removing unwanted attributes
1 parent 177ca09 commit ec0b033

File tree

1 file changed

+4
-102
lines changed

1 file changed

+4
-102
lines changed

backend/src/main/java/com/park/utmstack/web/rest/vm/AgentRequestVM.java

Lines changed: 4 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,16 @@
44

55
import javax.validation.constraints.Min;
66
import javax.validation.constraints.NotEmpty;
7-
import javax.validation.constraints.NotNull;
87

8+
/*
9+
* Use this class when you need to update agent's attributes.
10+
* To add new attributes to update, add it to the class. Actually only ip is permitted.
11+
* */
912
public class AgentRequestVM {
1013
@NotEmpty
1114
private String ip;
1215
@NotEmpty
1316
private String hostname;
14-
private String os;
15-
private String platform;
16-
private String version;
17-
@NotEmpty
18-
private String mac;
19-
private String osMajorVersion;
20-
private String osMinorVersion;
21-
private String aliases;
22-
private String addresses;
23-
@NotEmpty
24-
private String agentKey;
25-
@Min(1)
26-
private int id;
2717

2818

2919
public AgentRequestVM() {}
@@ -32,14 +22,6 @@ public AgentRequest getAgentRequest() {
3222
return AgentRequest.newBuilder()
3323
.setIp(this.ip)
3424
.setHostname(this.hostname)
35-
.setOs(this.os)
36-
.setPlatform(this.platform)
37-
.setVersion(this.version)
38-
.setMac(this.mac)
39-
.setOsMajorVersion(this.osMajorVersion)
40-
.setOsMinorVersion(this.osMinorVersion)
41-
.setAliases(this.aliases)
42-
.setAddresses(this.addresses)
4325
.build();
4426
}
4527

@@ -58,84 +40,4 @@ public String getHostname() {
5840
public void setHostname(String hostname) {
5941
this.hostname = hostname;
6042
}
61-
62-
public String getOs() {
63-
return os;
64-
}
65-
66-
public void setOs(String os) {
67-
this.os = os;
68-
}
69-
70-
public String getPlatform() {
71-
return platform;
72-
}
73-
74-
public void setPlatform(String platform) {
75-
this.platform = platform;
76-
}
77-
78-
public String getVersion() {
79-
return version;
80-
}
81-
82-
public void setVersion(String version) {
83-
this.version = version;
84-
}
85-
86-
public String getMac() {
87-
return mac;
88-
}
89-
90-
public void setMac(String mac) {
91-
this.mac = mac;
92-
}
93-
94-
public String getOsMajorVersion() {
95-
return osMajorVersion;
96-
}
97-
98-
public void setOsMajorVersion(String osMajorVersion) {
99-
this.osMajorVersion = osMajorVersion;
100-
}
101-
102-
public String getOsMinorVersion() {
103-
return osMinorVersion;
104-
}
105-
106-
public void setOsMinorVersion(String osMinorVersion) {
107-
this.osMinorVersion = osMinorVersion;
108-
}
109-
110-
public String getAliases() {
111-
return aliases;
112-
}
113-
114-
public void setAliases(String aliases) {
115-
this.aliases = aliases;
116-
}
117-
118-
public String getAddresses() {
119-
return addresses;
120-
}
121-
122-
public void setAddresses(String addresses) {
123-
this.addresses = addresses;
124-
}
125-
126-
public String getAgentKey() {
127-
return agentKey;
128-
}
129-
130-
public void setAgentKey(String agentKey) {
131-
this.agentKey = agentKey;
132-
}
133-
134-
public int getId() {
135-
return id;
136-
}
137-
138-
public void setId(int id) {
139-
this.id = id;
140-
}
14143
}

0 commit comments

Comments
 (0)