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=NetdevVhostUserOptions, data={chardev=str, *vhostforce=bool, *queues=int}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=NetdevVhostUserOptions, data={chardev=str, *vhostforce=bool, *queues=int}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class NetdevVhostUserOptions extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("chardev") 023 @Nonnull 024 public java.lang.String chardev; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("vhostforce") 027 @CheckForNull 028 public java.lang.Boolean vhostforce; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("queues") 031 @CheckForNull 032 public java.lang.Long queues; 033 034 @Nonnull 035 public NetdevVhostUserOptions withChardev(java.lang.String value) { 036 this.chardev = value; 037 return this; 038 } 039 040 @Nonnull 041 public NetdevVhostUserOptions withVhostforce(java.lang.Boolean value) { 042 this.vhostforce = value; 043 return this; 044 } 045 046 @Nonnull 047 public NetdevVhostUserOptions withQueues(java.lang.Long value) { 048 this.queues = value; 049 return this; 050 } 051 052 public NetdevVhostUserOptions() { 053 } 054 055 public NetdevVhostUserOptions(java.lang.String chardev, java.lang.Boolean vhostforce, java.lang.Long queues) { 056 this.chardev = chardev; 057 this.vhostforce = vhostforce; 058 this.queues = queues; 059 } 060 061 @JsonIgnore 062 @Override 063 public java.util.List<java.lang.String> getFieldNames() { 064 java.util.List<java.lang.String> names = super.getFieldNames(); 065 names.add("chardev"); 066 names.add("vhostforce"); 067 names.add("queues"); 068 return names; 069 } 070 071 @Override 072 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 073 if ("chardev".equals(name)) 074 return chardev; 075 if ("vhostforce".equals(name)) 076 return vhostforce; 077 if ("queues".equals(name)) 078 return queues; 079 return super.getFieldByName(name); 080 } 081}