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=NetdevVdeOptions, data={*sock=str, *port=uint16, *group=str, *mode=uint16}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=NetdevVdeOptions, data={*sock=str, *port=uint16, *group=str, *mode=uint16}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class NetdevVdeOptions extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("sock") 023 @CheckForNull 024 public java.lang.String sock; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("port") 027 @CheckForNull 028 public java.lang.Integer port; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("group") 031 @CheckForNull 032 public java.lang.String group; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("mode") 035 @CheckForNull 036 public java.lang.Integer mode; 037 038 @Nonnull 039 public NetdevVdeOptions withSock(java.lang.String value) { 040 this.sock = value; 041 return this; 042 } 043 044 @Nonnull 045 public NetdevVdeOptions withPort(java.lang.Integer value) { 046 this.port = value; 047 return this; 048 } 049 050 @Nonnull 051 public NetdevVdeOptions withGroup(java.lang.String value) { 052 this.group = value; 053 return this; 054 } 055 056 @Nonnull 057 public NetdevVdeOptions withMode(java.lang.Integer value) { 058 this.mode = value; 059 return this; 060 } 061 062 public NetdevVdeOptions() { 063 } 064 065 public NetdevVdeOptions(java.lang.String sock, java.lang.Integer port, java.lang.String group, java.lang.Integer mode) { 066 this.sock = sock; 067 this.port = port; 068 this.group = group; 069 this.mode = mode; 070 } 071 072 @JsonIgnore 073 @Override 074 public java.util.List<java.lang.String> getFieldNames() { 075 java.util.List<java.lang.String> names = super.getFieldNames(); 076 names.add("sock"); 077 names.add("port"); 078 names.add("group"); 079 names.add("mode"); 080 return names; 081 } 082 083 @Override 084 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 085 if ("sock".equals(name)) 086 return sock; 087 if ("port".equals(name)) 088 return port; 089 if ("group".equals(name)) 090 return group; 091 if ("mode".equals(name)) 092 return mode; 093 return super.getFieldByName(name); 094 } 095}