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=BlockStats, data={*device=str, *node-name=str, stats=BlockDeviceStats, *parent=BlockStats, *backing=BlockStats}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=BlockStats, data={*device=str, *node-name=str, stats=BlockDeviceStats, *parent=BlockStats, *backing=BlockStats}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class BlockStats extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("device") 023 @CheckForNull 024 public java.lang.String device; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("node-name") 027 @CheckForNull 028 public java.lang.String nodeName; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("stats") 031 @Nonnull 032 public BlockDeviceStats stats; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("parent") 035 @CheckForNull 036 public BlockStats parent; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("backing") 039 @CheckForNull 040 public BlockStats backing; 041 042 @Nonnull 043 public BlockStats withDevice(java.lang.String value) { 044 this.device = value; 045 return this; 046 } 047 048 @Nonnull 049 public BlockStats withNodeName(java.lang.String value) { 050 this.nodeName = value; 051 return this; 052 } 053 054 @Nonnull 055 public BlockStats withStats(BlockDeviceStats value) { 056 this.stats = value; 057 return this; 058 } 059 060 @Nonnull 061 public BlockStats withParent(BlockStats value) { 062 this.parent = value; 063 return this; 064 } 065 066 @Nonnull 067 public BlockStats withBacking(BlockStats value) { 068 this.backing = value; 069 return this; 070 } 071 072 public BlockStats() { 073 } 074 075 public BlockStats(java.lang.String device, java.lang.String nodeName, BlockDeviceStats stats, BlockStats parent, BlockStats backing) { 076 this.device = device; 077 this.nodeName = nodeName; 078 this.stats = stats; 079 this.parent = parent; 080 this.backing = backing; 081 } 082 083 @JsonIgnore 084 @Override 085 public java.util.List<java.lang.String> getFieldNames() { 086 java.util.List<java.lang.String> names = super.getFieldNames(); 087 names.add("device"); 088 names.add("node-name"); 089 names.add("stats"); 090 names.add("parent"); 091 names.add("backing"); 092 return names; 093 } 094 095 @Override 096 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 097 if ("device".equals(name)) 098 return device; 099 if ("node-name".equals(name)) 100 return nodeName; 101 if ("stats".equals(name)) 102 return stats; 103 if ("parent".equals(name)) 104 return parent; 105 if ("backing".equals(name)) 106 return backing; 107 return super.getFieldByName(name); 108 } 109}