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=NetdevTapOptions, data={*ifname=str, *fd=str, *fds=str, *script=str, *downscript=str, *helper=str, *sndbuf=size, *vnet_hdr=bool, *vhost=bool, *vhostfd=str, *vhostfds=str, *vhostforce=bool, *queues=uint32}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=NetdevTapOptions, data={*ifname=str, *fd=str, *fds=str, *script=str, *downscript=str, *helper=str, *sndbuf=size, *vnet_hdr=bool, *vhost=bool, *vhostfd=str, *vhostfds=str, *vhostforce=bool, *queues=uint32}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class NetdevTapOptions extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("ifname") 023 @CheckForNull 024 public java.lang.String ifname; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("fd") 027 @CheckForNull 028 public java.lang.String fd; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("fds") 031 @CheckForNull 032 public java.lang.String fds; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("script") 035 @CheckForNull 036 public java.lang.String script; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("downscript") 039 @CheckForNull 040 public java.lang.String downscript; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("helper") 043 @CheckForNull 044 public java.lang.String helper; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("sndbuf") 047 @CheckForNull 048 public java.lang.Long sndbuf; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("vnet_hdr") 051 @CheckForNull 052 public java.lang.Boolean vnetHdr; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("vhost") 055 @CheckForNull 056 public java.lang.Boolean vhost; 057 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 058 @JsonProperty("vhostfd") 059 @CheckForNull 060 public java.lang.String vhostfd; 061 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 062 @JsonProperty("vhostfds") 063 @CheckForNull 064 public java.lang.String vhostfds; 065 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 066 @JsonProperty("vhostforce") 067 @CheckForNull 068 public java.lang.Boolean vhostforce; 069 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 070 @JsonProperty("queues") 071 @CheckForNull 072 public java.lang.Long queues; 073 074 @Nonnull 075 public NetdevTapOptions withIfname(java.lang.String value) { 076 this.ifname = value; 077 return this; 078 } 079 080 @Nonnull 081 public NetdevTapOptions withFd(java.lang.String value) { 082 this.fd = value; 083 return this; 084 } 085 086 @Nonnull 087 public NetdevTapOptions withFds(java.lang.String value) { 088 this.fds = value; 089 return this; 090 } 091 092 @Nonnull 093 public NetdevTapOptions withScript(java.lang.String value) { 094 this.script = value; 095 return this; 096 } 097 098 @Nonnull 099 public NetdevTapOptions withDownscript(java.lang.String value) { 100 this.downscript = value; 101 return this; 102 } 103 104 @Nonnull 105 public NetdevTapOptions withHelper(java.lang.String value) { 106 this.helper = value; 107 return this; 108 } 109 110 @Nonnull 111 public NetdevTapOptions withSndbuf(java.lang.Long value) { 112 this.sndbuf = value; 113 return this; 114 } 115 116 @Nonnull 117 public NetdevTapOptions withVnetHdr(java.lang.Boolean value) { 118 this.vnetHdr = value; 119 return this; 120 } 121 122 @Nonnull 123 public NetdevTapOptions withVhost(java.lang.Boolean value) { 124 this.vhost = value; 125 return this; 126 } 127 128 @Nonnull 129 public NetdevTapOptions withVhostfd(java.lang.String value) { 130 this.vhostfd = value; 131 return this; 132 } 133 134 @Nonnull 135 public NetdevTapOptions withVhostfds(java.lang.String value) { 136 this.vhostfds = value; 137 return this; 138 } 139 140 @Nonnull 141 public NetdevTapOptions withVhostforce(java.lang.Boolean value) { 142 this.vhostforce = value; 143 return this; 144 } 145 146 @Nonnull 147 public NetdevTapOptions withQueues(java.lang.Long value) { 148 this.queues = value; 149 return this; 150 } 151 152 public NetdevTapOptions() { 153 } 154 155 public NetdevTapOptions(java.lang.String ifname, java.lang.String fd, java.lang.String fds, java.lang.String script, java.lang.String downscript, java.lang.String helper, java.lang.Long sndbuf, java.lang.Boolean vnetHdr, java.lang.Boolean vhost, java.lang.String vhostfd, java.lang.String vhostfds, java.lang.Boolean vhostforce, java.lang.Long queues) { 156 this.ifname = ifname; 157 this.fd = fd; 158 this.fds = fds; 159 this.script = script; 160 this.downscript = downscript; 161 this.helper = helper; 162 this.sndbuf = sndbuf; 163 this.vnetHdr = vnetHdr; 164 this.vhost = vhost; 165 this.vhostfd = vhostfd; 166 this.vhostfds = vhostfds; 167 this.vhostforce = vhostforce; 168 this.queues = queues; 169 } 170 171 @JsonIgnore 172 @Override 173 public java.util.List<java.lang.String> getFieldNames() { 174 java.util.List<java.lang.String> names = super.getFieldNames(); 175 names.add("ifname"); 176 names.add("fd"); 177 names.add("fds"); 178 names.add("script"); 179 names.add("downscript"); 180 names.add("helper"); 181 names.add("sndbuf"); 182 names.add("vnet_hdr"); 183 names.add("vhost"); 184 names.add("vhostfd"); 185 names.add("vhostfds"); 186 names.add("vhostforce"); 187 names.add("queues"); 188 return names; 189 } 190 191 @Override 192 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 193 if ("ifname".equals(name)) 194 return ifname; 195 if ("fd".equals(name)) 196 return fd; 197 if ("fds".equals(name)) 198 return fds; 199 if ("script".equals(name)) 200 return script; 201 if ("downscript".equals(name)) 202 return downscript; 203 if ("helper".equals(name)) 204 return helper; 205 if ("sndbuf".equals(name)) 206 return sndbuf; 207 if ("vnet_hdr".equals(name)) 208 return vnetHdr; 209 if ("vhost".equals(name)) 210 return vhost; 211 if ("vhostfd".equals(name)) 212 return vhostfd; 213 if ("vhostfds".equals(name)) 214 return vhostfds; 215 if ("vhostforce".equals(name)) 216 return vhostforce; 217 if ("queues".equals(name)) 218 return queues; 219 return super.getFieldByName(name); 220 } 221}