001package org.anarres.qemu.qapi.api; 002 003import com.fasterxml.jackson.annotation.JsonIgnore; 004import com.fasterxml.jackson.annotation.JsonInclude; 005import com.fasterxml.jackson.annotation.JsonProperty; 006import com.fasterxml.jackson.annotation.JsonUnwrapped; 007import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 008import javax.annotation.CheckForNull; 009import javax.annotation.Nonnull; 010import org.anarres.qemu.qapi.common.*; 011 012/** 013 * Autogenerated class. 014 * 015 * <pre>QApiTypeDescriptor{name=BlockDeviceStats, data={rd_bytes=int, wr_bytes=int, rd_operations=int, wr_operations=int, flush_operations=int, flush_total_time_ns=int, wr_total_time_ns=int, rd_total_time_ns=int, wr_highest_offset=int, rd_merged=int, wr_merged=int, *idle_time_ns=int, failed_rd_operations=int, failed_wr_operations=int, failed_flush_operations=int, invalid_rd_operations=int, invalid_wr_operations=int, invalid_flush_operations=int, account_invalid=bool, account_failed=bool, timed_stats=[BlockDeviceTimedStats]}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=BlockDeviceStats, data={rd_bytes=int, wr_bytes=int, rd_operations=int, wr_operations=int, flush_operations=int, flush_total_time_ns=int, wr_total_time_ns=int, rd_total_time_ns=int, wr_highest_offset=int, rd_merged=int, wr_merged=int, *idle_time_ns=int, failed_rd_operations=int, failed_wr_operations=int, failed_flush_operations=int, invalid_rd_operations=int, invalid_wr_operations=int, invalid_flush_operations=int, account_invalid=bool, account_failed=bool, timed_stats=[BlockDeviceTimedStats]}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class BlockDeviceStats extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("rd_bytes") 023 @Nonnull 024 public long rdBytes; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("wr_bytes") 027 @Nonnull 028 public long wrBytes; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("rd_operations") 031 @Nonnull 032 public long rdOperations; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("wr_operations") 035 @Nonnull 036 public long wrOperations; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("flush_operations") 039 @Nonnull 040 public long flushOperations; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("flush_total_time_ns") 043 @Nonnull 044 public long flushTotalTimeNs; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("wr_total_time_ns") 047 @Nonnull 048 public long wrTotalTimeNs; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("rd_total_time_ns") 051 @Nonnull 052 public long rdTotalTimeNs; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("wr_highest_offset") 055 @Nonnull 056 public long wrHighestOffset; 057 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 058 @JsonProperty("rd_merged") 059 @Nonnull 060 public long rdMerged; 061 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 062 @JsonProperty("wr_merged") 063 @Nonnull 064 public long wrMerged; 065 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 066 @JsonProperty("idle_time_ns") 067 @CheckForNull 068 public java.lang.Long idleTimeNs; 069 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 070 @JsonProperty("failed_rd_operations") 071 @Nonnull 072 public long failedRdOperations; 073 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 074 @JsonProperty("failed_wr_operations") 075 @Nonnull 076 public long failedWrOperations; 077 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 078 @JsonProperty("failed_flush_operations") 079 @Nonnull 080 public long failedFlushOperations; 081 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 082 @JsonProperty("invalid_rd_operations") 083 @Nonnull 084 public long invalidRdOperations; 085 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 086 @JsonProperty("invalid_wr_operations") 087 @Nonnull 088 public long invalidWrOperations; 089 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 090 @JsonProperty("invalid_flush_operations") 091 @Nonnull 092 public long invalidFlushOperations; 093 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 094 @JsonProperty("account_invalid") 095 @Nonnull 096 public boolean accountInvalid; 097 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 098 @JsonProperty("account_failed") 099 @Nonnull 100 public boolean accountFailed; 101 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 102 @JsonProperty("timed_stats") 103 @Nonnull 104 public java.util.List<BlockDeviceTimedStats> timedStats; 105 106 @Nonnull 107 public BlockDeviceStats withRdBytes(long value) { 108 this.rdBytes = value; 109 return this; 110 } 111 112 @Nonnull 113 public BlockDeviceStats withWrBytes(long value) { 114 this.wrBytes = value; 115 return this; 116 } 117 118 @Nonnull 119 public BlockDeviceStats withRdOperations(long value) { 120 this.rdOperations = value; 121 return this; 122 } 123 124 @Nonnull 125 public BlockDeviceStats withWrOperations(long value) { 126 this.wrOperations = value; 127 return this; 128 } 129 130 @Nonnull 131 public BlockDeviceStats withFlushOperations(long value) { 132 this.flushOperations = value; 133 return this; 134 } 135 136 @Nonnull 137 public BlockDeviceStats withFlushTotalTimeNs(long value) { 138 this.flushTotalTimeNs = value; 139 return this; 140 } 141 142 @Nonnull 143 public BlockDeviceStats withWrTotalTimeNs(long value) { 144 this.wrTotalTimeNs = value; 145 return this; 146 } 147 148 @Nonnull 149 public BlockDeviceStats withRdTotalTimeNs(long value) { 150 this.rdTotalTimeNs = value; 151 return this; 152 } 153 154 @Nonnull 155 public BlockDeviceStats withWrHighestOffset(long value) { 156 this.wrHighestOffset = value; 157 return this; 158 } 159 160 @Nonnull 161 public BlockDeviceStats withRdMerged(long value) { 162 this.rdMerged = value; 163 return this; 164 } 165 166 @Nonnull 167 public BlockDeviceStats withWrMerged(long value) { 168 this.wrMerged = value; 169 return this; 170 } 171 172 @Nonnull 173 public BlockDeviceStats withIdleTimeNs(java.lang.Long value) { 174 this.idleTimeNs = value; 175 return this; 176 } 177 178 @Nonnull 179 public BlockDeviceStats withFailedRdOperations(long value) { 180 this.failedRdOperations = value; 181 return this; 182 } 183 184 @Nonnull 185 public BlockDeviceStats withFailedWrOperations(long value) { 186 this.failedWrOperations = value; 187 return this; 188 } 189 190 @Nonnull 191 public BlockDeviceStats withFailedFlushOperations(long value) { 192 this.failedFlushOperations = value; 193 return this; 194 } 195 196 @Nonnull 197 public BlockDeviceStats withInvalidRdOperations(long value) { 198 this.invalidRdOperations = value; 199 return this; 200 } 201 202 @Nonnull 203 public BlockDeviceStats withInvalidWrOperations(long value) { 204 this.invalidWrOperations = value; 205 return this; 206 } 207 208 @Nonnull 209 public BlockDeviceStats withInvalidFlushOperations(long value) { 210 this.invalidFlushOperations = value; 211 return this; 212 } 213 214 @Nonnull 215 public BlockDeviceStats withAccountInvalid(boolean value) { 216 this.accountInvalid = value; 217 return this; 218 } 219 220 @Nonnull 221 public BlockDeviceStats withAccountFailed(boolean value) { 222 this.accountFailed = value; 223 return this; 224 } 225 226 @Nonnull 227 public BlockDeviceStats withTimedStats(java.util.List<BlockDeviceTimedStats> value) { 228 this.timedStats = value; 229 return this; 230 } 231 232 public BlockDeviceStats() { 233 } 234 235 public BlockDeviceStats(long rdBytes, long wrBytes, long rdOperations, long wrOperations, long flushOperations, long flushTotalTimeNs, long wrTotalTimeNs, long rdTotalTimeNs, long wrHighestOffset, long rdMerged, long wrMerged, java.lang.Long idleTimeNs, long failedRdOperations, long failedWrOperations, long failedFlushOperations, long invalidRdOperations, long invalidWrOperations, long invalidFlushOperations, boolean accountInvalid, boolean accountFailed, java.util.List<BlockDeviceTimedStats> timedStats) { 236 this.rdBytes = rdBytes; 237 this.wrBytes = wrBytes; 238 this.rdOperations = rdOperations; 239 this.wrOperations = wrOperations; 240 this.flushOperations = flushOperations; 241 this.flushTotalTimeNs = flushTotalTimeNs; 242 this.wrTotalTimeNs = wrTotalTimeNs; 243 this.rdTotalTimeNs = rdTotalTimeNs; 244 this.wrHighestOffset = wrHighestOffset; 245 this.rdMerged = rdMerged; 246 this.wrMerged = wrMerged; 247 this.idleTimeNs = idleTimeNs; 248 this.failedRdOperations = failedRdOperations; 249 this.failedWrOperations = failedWrOperations; 250 this.failedFlushOperations = failedFlushOperations; 251 this.invalidRdOperations = invalidRdOperations; 252 this.invalidWrOperations = invalidWrOperations; 253 this.invalidFlushOperations = invalidFlushOperations; 254 this.accountInvalid = accountInvalid; 255 this.accountFailed = accountFailed; 256 this.timedStats = timedStats; 257 } 258 259 @JsonIgnore 260 @Override 261 public java.util.List<java.lang.String> getFieldNames() { 262 java.util.List<java.lang.String> names = super.getFieldNames(); 263 names.add("rd_bytes"); 264 names.add("wr_bytes"); 265 names.add("rd_operations"); 266 names.add("wr_operations"); 267 names.add("flush_operations"); 268 names.add("flush_total_time_ns"); 269 names.add("wr_total_time_ns"); 270 names.add("rd_total_time_ns"); 271 names.add("wr_highest_offset"); 272 names.add("rd_merged"); 273 names.add("wr_merged"); 274 names.add("idle_time_ns"); 275 names.add("failed_rd_operations"); 276 names.add("failed_wr_operations"); 277 names.add("failed_flush_operations"); 278 names.add("invalid_rd_operations"); 279 names.add("invalid_wr_operations"); 280 names.add("invalid_flush_operations"); 281 names.add("account_invalid"); 282 names.add("account_failed"); 283 names.add("timed_stats"); 284 return names; 285 } 286 287 @Override 288 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 289 if ("rd_bytes".equals(name)) 290 return rdBytes; 291 if ("wr_bytes".equals(name)) 292 return wrBytes; 293 if ("rd_operations".equals(name)) 294 return rdOperations; 295 if ("wr_operations".equals(name)) 296 return wrOperations; 297 if ("flush_operations".equals(name)) 298 return flushOperations; 299 if ("flush_total_time_ns".equals(name)) 300 return flushTotalTimeNs; 301 if ("wr_total_time_ns".equals(name)) 302 return wrTotalTimeNs; 303 if ("rd_total_time_ns".equals(name)) 304 return rdTotalTimeNs; 305 if ("wr_highest_offset".equals(name)) 306 return wrHighestOffset; 307 if ("rd_merged".equals(name)) 308 return rdMerged; 309 if ("wr_merged".equals(name)) 310 return wrMerged; 311 if ("idle_time_ns".equals(name)) 312 return idleTimeNs; 313 if ("failed_rd_operations".equals(name)) 314 return failedRdOperations; 315 if ("failed_wr_operations".equals(name)) 316 return failedWrOperations; 317 if ("failed_flush_operations".equals(name)) 318 return failedFlushOperations; 319 if ("invalid_rd_operations".equals(name)) 320 return invalidRdOperations; 321 if ("invalid_wr_operations".equals(name)) 322 return invalidWrOperations; 323 if ("invalid_flush_operations".equals(name)) 324 return invalidFlushOperations; 325 if ("account_invalid".equals(name)) 326 return accountInvalid; 327 if ("account_failed".equals(name)) 328 return accountFailed; 329 if ("timed_stats".equals(name)) 330 return timedStats; 331 return super.getFieldByName(name); 332 } 333}