Repository navigation
Expand file tree
/
Copy pathAccountResponse.java
More file actions
executable file
·290 lines (212 loc) · 10.5 KB
/
Copy pathAccountResponse.java
File metadata and controls
executable file
·290 lines (212 loc) · 10.5 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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 com.cloud.api.response;
import java.util.List;
import java.util.Map;
import com.cloud.api.ApiConstants;
import com.cloud.serializer.Param;
import com.cloud.utils.IdentityProxy;
import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused")
public class AccountResponse extends BaseResponse {
@SerializedName(ApiConstants.ID) @Param(description="the id of the account")
private IdentityProxy id = new IdentityProxy("account");
@SerializedName(ApiConstants.NAME) @Param(description="the name of the account")
private String name;
@SerializedName(ApiConstants.ACCOUNT_TYPE) @Param(description="account type (admin, domain-admin, user)")
private Short accountType;
@SerializedName(ApiConstants.DOMAIN_ID) @Param(description="id of the Domain the account belongs too")
private IdentityProxy domainId = new IdentityProxy("domain");
@SerializedName(ApiConstants.DOMAIN) @Param(description="name of the Domain the account belongs too")
private String domainName;
@SerializedName(ApiConstants.DEFAULT_ZONE_ID) @Param(description="the default zone of the account")
private IdentityProxy defaultZoneId = new IdentityProxy("data_center");
@SerializedName(ApiConstants.RECEIVED_BYTES) @Param(description="the total number of network traffic bytes received")
private Long bytesReceived;
@SerializedName(ApiConstants.SENT_BYTES) @Param(description="the total number of network traffic bytes sent")
private Long bytesSent;
@SerializedName(ApiConstants.VM_LIMIT) @Param(description="the total number of virtual machines that can be deployed by this account")
private String vmLimit;
@SerializedName(ApiConstants.VM_TOTAL) @Param(description="the total number of virtual machines deployed by this account")
private Long vmTotal;
@SerializedName(ApiConstants.VM_AVAILABLE) @Param(description="the total number of virtual machines available for this account to acquire")
private String vmAvailable;
@SerializedName(ApiConstants.IP_LIMIT) @Param(description="the total number of public ip addresses this account can acquire")
private String ipLimit;
@SerializedName(ApiConstants.IP_TOTAL) @Param(description="the total number of public ip addresses allocated for this account")
private Long ipTotal;
@SerializedName(ApiConstants.IP_AVAILABLE) @Param(description="the total number of public ip addresses available for this account to acquire")
private String ipAvailable;
@SerializedName("volumelimit") @Param(description="the total volume which can be used by this account")
private String volumeLimit;
@SerializedName("volumetotal") @Param(description="the total volume being used by this account")
private Long volumeTotal;
@SerializedName("volumeavailable") @Param(description="the total volume available for this account")
private String volumeAvailable;
@SerializedName("snapshotlimit") @Param(description="the total number of snapshots which can be stored by this account")
private String snapshotLimit;
@SerializedName("snapshottotal") @Param(description="the total number of snapshots stored by this account")
private Long snapshotTotal;
@SerializedName("snapshotavailable") @Param(description="the total number of snapshots available for this account")
private String snapshotAvailable;
@SerializedName("templatelimit") @Param(description="the total number of templates which can be created by this account")
private String templateLimit;
@SerializedName("templatetotal") @Param(description="the total number of templates which have been created by this account")
private Long templateTotal;
@SerializedName("templateavailable") @Param(description="the total number of templates available to be created by this account")
private String templateAvailable;
@SerializedName("vmstopped") @Param(description="the total number of virtual machines stopped for this account")
private Integer vmStopped;
@SerializedName("vmrunning") @Param(description="the total number of virtual machines running for this account")
private Integer vmRunning;
@SerializedName("projectlimit") @Param(description="the total number of projects the account can own", since="3.0.1")
private String projectLimit;
@SerializedName("projecttotal") @Param(description="the total number of projects being administrated by this account", since="3.0.1")
private Long projectTotal;
@SerializedName("projectavailable") @Param(description="the total number of projects available for administration by this account", since="3.0.1")
private String projectAvailable;
@SerializedName("networklimit") @Param(description="the total number of networks the account can own", since="3.0.1")
private String networkLimit;
@SerializedName("networktotal") @Param(description="the total number of networks owned by account", since="3.0.1")
private Long networkTotal;
@SerializedName("networkavailable") @Param(description="the total number of networks available to be created for this account", since="3.0.1")
private String networkAvailable;
@SerializedName("vpclimit") @Param(description="the total number of vpcs the account can own", since="3.0.5")
private String vpcLimit;
@SerializedName("vpctotal") @Param(description="the total number of vpcs owned by account", since="3.0.5")
private Long vpcTotal;
@SerializedName("vpcavailable") @Param(description="the total number of vpcs available to be created for this account", since="3.0.5")
private String vpcAvailable;
@SerializedName(ApiConstants.STATE) @Param(description="the state of the account")
private String state;
@SerializedName(ApiConstants.IS_CLEANUP_REQUIRED) @Param(description="true if the account requires cleanup")
private Boolean cleanupRequired;
@SerializedName("user") @Param(description="the list of users associated with account", responseObject = UserResponse.class)
private List<UserResponse> users;
@SerializedName(ApiConstants.NETWORK_DOMAIN) @Param(description="the network domain")
private String networkDomain;
@SerializedName(ApiConstants.ACCOUNT_DETAILS) @Param(description="details for the account")
private Map<String, String> details;
public void setId(Long id) {
this.id.setValue(id);
}
public void setName(String name) {
this.name = name;
}
public void setAccountType(Short accountType) {
this.accountType = accountType;
}
public void setDomainId(Long domainId) {
this.domainId.setValue(domainId);
}
public void setDomainName(String domainName) {
this.domainName = domainName;
}
public void setBytesReceived(Long bytesReceived) {
this.bytesReceived = bytesReceived;
}
public void setBytesSent(Long bytesSent) {
this.bytesSent = bytesSent;
}
public void setVmLimit(String vmLimit) {
this.vmLimit = vmLimit;
}
public void setVmTotal(Long vmTotal) {
this.vmTotal = vmTotal;
}
public void setVmAvailable(String vmAvailable) {
this.vmAvailable = vmAvailable;
}
public void setIpLimit(String ipLimit) {
this.ipLimit = ipLimit;
}
public void setIpTotal(Long ipTotal) {
this.ipTotal = ipTotal;
}
public void setIpAvailable(String ipAvailable) {
this.ipAvailable = ipAvailable;
}
public void setVolumeLimit(String volumeLimit) {
this.volumeLimit = volumeLimit;
}
public void setVolumeTotal(Long volumeTotal) {
this.volumeTotal = volumeTotal;
}
public void setVolumeAvailable(String volumeAvailable) {
this.volumeAvailable = volumeAvailable;
}
public void setSnapshotLimit(String snapshotLimit) {
this.snapshotLimit = snapshotLimit;
}
public void setSnapshotTotal(Long snapshotTotal) {
this.snapshotTotal = snapshotTotal;
}
public void setSnapshotAvailable(String snapshotAvailable) {
this.snapshotAvailable = snapshotAvailable;
}
public void setTemplateLimit(String templateLimit) {
this.templateLimit = templateLimit;
}
public void setTemplateTotal(Long templateTotal) {
this.templateTotal = templateTotal;
}
public void setTemplateAvailable(String templateAvailable) {
this.templateAvailable = templateAvailable;
}
public void setVmStopped(Integer vmStopped) {
this.vmStopped = vmStopped;
}
public void setVmRunning(Integer vmRunning) {
this.vmRunning = vmRunning;
}
public void setState(String state) {
this.state = state;
}
public void setCleanupRequired(Boolean cleanupRequired) {
this.cleanupRequired = cleanupRequired;
}
public void setUsers(List<UserResponse> users) {
this.users = users;
}
public void setNetworkDomain(String networkDomain) {
this.networkDomain = networkDomain;
}
public void setDetails(Map<String, String> details) {
this.details = details;
}
public void setProjectLimit(String projectLimit) {
this.projectLimit = projectLimit;
}
public void setProjectTotal(Long projectTotal) {
this.projectTotal = projectTotal;
}
public void setProjectAvailable(String projectAvailable) {
this.projectAvailable = projectAvailable;
}
public void setNetworkLimit(String networkLimit) {
this.networkLimit = networkLimit;
}
public void setNetworkTotal(Long networkTotal) {
this.networkTotal = networkTotal;
}
public void setNetworkAvailable(String networkAvailable) {
this.networkAvailable = networkAvailable;
}
public void setDefaultZone(Long defaultZoneId) {
this.defaultZoneId.setValue(defaultZoneId);
}
}