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=NetdevUserOptions, data={*hostname=str, *restrict=bool, *ip=str, *net=str, *host=str, *tftp=str, *bootfile=str, *dhcpstart=str, *dns=str, *dnssearch=[String], *smb=str, *smbserver=str, *hostfwd=[String], *guestfwd=[String]}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=NetdevUserOptions, data={*hostname=str, *restrict=bool, *ip=str, *net=str, *host=str, *tftp=str, *bootfile=str, *dhcpstart=str, *dns=str, *dnssearch=[String], *smb=str, *smbserver=str, *hostfwd=[String], *guestfwd=[String]}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class NetdevUserOptions extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("hostname") 023 @CheckForNull 024 public java.lang.String hostname; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("restrict") 027 @CheckForNull 028 public java.lang.Boolean restrict; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("ip") 031 @CheckForNull 032 public java.lang.String ip; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("net") 035 @CheckForNull 036 public java.lang.String net; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("host") 039 @CheckForNull 040 public java.lang.String host; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("tftp") 043 @CheckForNull 044 public java.lang.String tftp; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("bootfile") 047 @CheckForNull 048 public java.lang.String bootfile; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("dhcpstart") 051 @CheckForNull 052 public java.lang.String dhcpstart; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("dns") 055 @CheckForNull 056 public java.lang.String dns; 057 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 058 @JsonProperty("dnssearch") 059 @CheckForNull 060 public java.util.List<String> dnssearch; 061 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 062 @JsonProperty("smb") 063 @CheckForNull 064 public java.lang.String smb; 065 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 066 @JsonProperty("smbserver") 067 @CheckForNull 068 public java.lang.String smbserver; 069 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 070 @JsonProperty("hostfwd") 071 @CheckForNull 072 public java.util.List<String> hostfwd; 073 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 074 @JsonProperty("guestfwd") 075 @CheckForNull 076 public java.util.List<String> guestfwd; 077 078 @Nonnull 079 public NetdevUserOptions withHostname(java.lang.String value) { 080 this.hostname = value; 081 return this; 082 } 083 084 @Nonnull 085 public NetdevUserOptions withRestrict(java.lang.Boolean value) { 086 this.restrict = value; 087 return this; 088 } 089 090 @Nonnull 091 public NetdevUserOptions withIp(java.lang.String value) { 092 this.ip = value; 093 return this; 094 } 095 096 @Nonnull 097 public NetdevUserOptions withNet(java.lang.String value) { 098 this.net = value; 099 return this; 100 } 101 102 @Nonnull 103 public NetdevUserOptions withHost(java.lang.String value) { 104 this.host = value; 105 return this; 106 } 107 108 @Nonnull 109 public NetdevUserOptions withTftp(java.lang.String value) { 110 this.tftp = value; 111 return this; 112 } 113 114 @Nonnull 115 public NetdevUserOptions withBootfile(java.lang.String value) { 116 this.bootfile = value; 117 return this; 118 } 119 120 @Nonnull 121 public NetdevUserOptions withDhcpstart(java.lang.String value) { 122 this.dhcpstart = value; 123 return this; 124 } 125 126 @Nonnull 127 public NetdevUserOptions withDns(java.lang.String value) { 128 this.dns = value; 129 return this; 130 } 131 132 @Nonnull 133 public NetdevUserOptions withDnssearch(java.util.List<String> value) { 134 this.dnssearch = value; 135 return this; 136 } 137 138 @Nonnull 139 public NetdevUserOptions withSmb(java.lang.String value) { 140 this.smb = value; 141 return this; 142 } 143 144 @Nonnull 145 public NetdevUserOptions withSmbserver(java.lang.String value) { 146 this.smbserver = value; 147 return this; 148 } 149 150 @Nonnull 151 public NetdevUserOptions withHostfwd(java.util.List<String> value) { 152 this.hostfwd = value; 153 return this; 154 } 155 156 @Nonnull 157 public NetdevUserOptions withGuestfwd(java.util.List<String> value) { 158 this.guestfwd = value; 159 return this; 160 } 161 162 public NetdevUserOptions() { 163 } 164 165 public NetdevUserOptions(java.lang.String hostname, java.lang.Boolean restrict, java.lang.String ip, java.lang.String net, java.lang.String host, java.lang.String tftp, java.lang.String bootfile, java.lang.String dhcpstart, java.lang.String dns, java.util.List<String> dnssearch, java.lang.String smb, java.lang.String smbserver, java.util.List<String> hostfwd, java.util.List<String> guestfwd) { 166 this.hostname = hostname; 167 this.restrict = restrict; 168 this.ip = ip; 169 this.net = net; 170 this.host = host; 171 this.tftp = tftp; 172 this.bootfile = bootfile; 173 this.dhcpstart = dhcpstart; 174 this.dns = dns; 175 this.dnssearch = dnssearch; 176 this.smb = smb; 177 this.smbserver = smbserver; 178 this.hostfwd = hostfwd; 179 this.guestfwd = guestfwd; 180 } 181 182 @JsonIgnore 183 @Override 184 public java.util.List<java.lang.String> getFieldNames() { 185 java.util.List<java.lang.String> names = super.getFieldNames(); 186 names.add("hostname"); 187 names.add("restrict"); 188 names.add("ip"); 189 names.add("net"); 190 names.add("host"); 191 names.add("tftp"); 192 names.add("bootfile"); 193 names.add("dhcpstart"); 194 names.add("dns"); 195 names.add("dnssearch"); 196 names.add("smb"); 197 names.add("smbserver"); 198 names.add("hostfwd"); 199 names.add("guestfwd"); 200 return names; 201 } 202 203 @Override 204 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 205 if ("hostname".equals(name)) 206 return hostname; 207 if ("restrict".equals(name)) 208 return restrict; 209 if ("ip".equals(name)) 210 return ip; 211 if ("net".equals(name)) 212 return net; 213 if ("host".equals(name)) 214 return host; 215 if ("tftp".equals(name)) 216 return tftp; 217 if ("bootfile".equals(name)) 218 return bootfile; 219 if ("dhcpstart".equals(name)) 220 return dhcpstart; 221 if ("dns".equals(name)) 222 return dns; 223 if ("dnssearch".equals(name)) 224 return dnssearch; 225 if ("smb".equals(name)) 226 return smb; 227 if ("smbserver".equals(name)) 228 return smbserver; 229 if ("hostfwd".equals(name)) 230 return hostfwd; 231 if ("guestfwd".equals(name)) 232 return guestfwd; 233 return super.getFieldByName(name); 234 } 235}