|
1 | | -// //Licensed to the Apache Software Foundation (ASF) under one |
2 | | -// //or more contributor license agreements. See the NOTICE file |
3 | | -// //distributed with this work for additional information |
4 | | -// //regarding copyright ownership. The ASF licenses this file |
5 | | -// //to you under the Apache License, Version 2.0 (the |
6 | | -// //"License"); you may not use this file except in compliance |
7 | | -// //with the License. You may obtain a copy of the License at |
8 | | -// // |
9 | | -// //http://www.apache.org/licenses/LICENSE-2.0 |
10 | | -// // |
11 | | -// //Unless required by applicable law or agreed to in writing, |
12 | | -// //software distributed under the License is distributed on an |
13 | | -// //"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | -// //KIND, either express or implied. See the License for the |
15 | | -// //specific language governing permissions and limitations |
16 | | -// //under the License. |
17 | | - |
18 | | -// package org.apache.cloudstack.api.response; |
19 | | - |
20 | | -// import com.cloud.host.Host; |
21 | | -// import com.cloud.serializer.Param; |
22 | | -// import com.google.gson.annotations.SerializedName; |
23 | | -// import java.util.List; |
24 | | -// import java.util.Map; |
25 | | -// import org.apache.cloudstack.api.ApiConstants; |
26 | | -// import org.apache.cloudstack.api.BaseResponse; |
27 | | -// import org.apache.cloudstack.api.EntityReference; |
28 | | - |
29 | | - |
30 | | -// @EntityReference(value = Host.class) |
31 | | -// public class ListHostUsbDevicesResponse extends BaseResponse { |
32 | | - |
33 | | -// @SerializedName(ApiConstants.HOSTDEVICES_NAME) |
34 | | -// @Param(description = "Allocated IP address") |
35 | | -// private List<String> hostDevicesName; |
36 | | - |
37 | | -// @SerializedName(ApiConstants.HOSTDEVICES_TEXT) |
38 | | -// @Param(description = "the ID of the pod the IP address belongs to") |
39 | | -// private List<String> hostDevicesText; |
40 | | - |
41 | | -// @SerializedName("vmallocations") |
42 | | -// @Param(description = "Map of device to VM allocations") |
43 | | -// private Map<String, String> vmAllocations; |
44 | | - |
45 | | -// public ListHostUsbDevicesResponse(List<String> hostDevicesName, List<String> hostDevicesText) { |
46 | | -// this.hostDevicesName = hostDevicesName; |
47 | | -// this.hostDevicesText = hostDevicesText; |
48 | | -// } |
49 | | - |
50 | | -// public ListHostUsbDevicesResponse() { |
51 | | -// super(); |
52 | | -// this.setObjectName("listhostusbdevices"); |
53 | | -// } |
54 | | - |
55 | | -// public List<String> getHostDevicesNames() { |
56 | | -// return hostDevicesName; |
57 | | -// } |
58 | | - |
59 | | -// public List<String> getHostDevicesTexts() { |
60 | | -// return hostDevicesText; |
61 | | -// } |
62 | | - |
63 | | -// public void setHostDevicesNames(List<String> hostDevicesName) { |
64 | | -// this.hostDevicesName = hostDevicesName; |
65 | | -// } |
66 | | - |
67 | | -// public void setHostDevicesTexts(List<String> hostDevicesText) { |
68 | | -// this.hostDevicesText = hostDevicesText; |
69 | | -// } |
70 | | - |
71 | | -// public void setVmAllocations(Map<String, String> vmAllocations) { |
72 | | -// this.vmAllocations = vmAllocations; |
73 | | -// } |
74 | | - |
75 | | -// public Map<String, String> getVmAllocations() { |
76 | | -// return this.vmAllocations; |
77 | | -// } |
78 | | - |
79 | | -// } |
| 1 | +//Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +//or more contributor license agreements. See the NOTICE file |
| 3 | +//distributed with this work for additional information |
| 4 | +//regarding copyright ownership. The ASF licenses this file |
| 5 | +//to you under the Apache License, Version 2.0 (the |
| 6 | +//"License"); you may not use this file except in compliance |
| 7 | +//with the License. You may obtain a copy of the License at |
| 8 | +// |
| 9 | +//http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +// |
| 11 | +//Unless required by applicable law or agreed to in writing, |
| 12 | +//software distributed under the License is distributed on an |
| 13 | +//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +//KIND, either express or implied. See the License for the |
| 15 | +//specific language governing permissions and limitations |
| 16 | +//under the License. |
| 17 | + |
| 18 | +package org.apache.cloudstack.api.response; |
| 19 | + |
| 20 | +import com.cloud.host.Host; |
| 21 | +import com.cloud.serializer.Param; |
| 22 | +import com.google.gson.annotations.SerializedName; |
| 23 | +import java.util.List; |
| 24 | +import java.util.Map; |
| 25 | +import org.apache.cloudstack.api.ApiConstants; |
| 26 | +import org.apache.cloudstack.api.BaseResponse; |
| 27 | +import org.apache.cloudstack.api.EntityReference; |
| 28 | + |
| 29 | + |
| 30 | +@EntityReference(value = Host.class) |
| 31 | +public class ListHostUsbDevicesResponse extends BaseResponse { |
| 32 | + |
| 33 | + @SerializedName(ApiConstants.HOSTDEVICES_NAME) |
| 34 | + @Param(description = "Allocated IP address") |
| 35 | + private List<String> hostDevicesName; |
| 36 | + |
| 37 | + @SerializedName(ApiConstants.HOSTDEVICES_TEXT) |
| 38 | + @Param(description = "the ID of the pod the IP address belongs to") |
| 39 | + private List<String> hostDevicesText; |
| 40 | + |
| 41 | + @SerializedName("vmallocations") |
| 42 | + @Param(description = "Map of device to VM allocations") |
| 43 | + private Map<String, String> vmAllocations; |
| 44 | + |
| 45 | + public ListHostUsbDevicesResponse(List<String> hostDevicesName, List<String> hostDevicesText) { |
| 46 | + this.hostDevicesName = hostDevicesName; |
| 47 | + this.hostDevicesText = hostDevicesText; |
| 48 | + } |
| 49 | + |
| 50 | + public ListHostUsbDevicesResponse() { |
| 51 | + super(); |
| 52 | + this.setObjectName("listhostusbdevices"); |
| 53 | + } |
| 54 | + |
| 55 | + public List<String> getHostDevicesNames() { |
| 56 | + return hostDevicesName; |
| 57 | + } |
| 58 | + |
| 59 | + public List<String> getHostDevicesTexts() { |
| 60 | + return hostDevicesText; |
| 61 | + } |
| 62 | + |
| 63 | + public void setHostDevicesNames(List<String> hostDevicesName) { |
| 64 | + this.hostDevicesName = hostDevicesName; |
| 65 | + } |
| 66 | + |
| 67 | + public void setHostDevicesTexts(List<String> hostDevicesText) { |
| 68 | + this.hostDevicesText = hostDevicesText; |
| 69 | + } |
| 70 | + |
| 71 | + public void setVmAllocations(Map<String, String> vmAllocations) { |
| 72 | + this.vmAllocations = vmAllocations; |
| 73 | + } |
| 74 | + |
| 75 | + public Map<String, String> getVmAllocations() { |
| 76 | + return this.vmAllocations; |
| 77 | + } |
| 78 | + |
| 79 | +} |
0 commit comments