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=VncInfo, data={enabled=bool, *host=str, *family=NetworkAddressFamily, *service=str, *auth=str, *clients=[VncClientInfo]}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=VncInfo, data={enabled=bool, *host=str, *family=NetworkAddressFamily, *service=str, *auth=str, *clients=[VncClientInfo]}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class VncInfo extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("enabled") 023 @Nonnull 024 public boolean enabled; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("host") 027 @CheckForNull 028 public java.lang.String host; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("family") 031 @CheckForNull 032 public NetworkAddressFamily family; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("service") 035 @CheckForNull 036 public java.lang.String service; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("auth") 039 @CheckForNull 040 public java.lang.String auth; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("clients") 043 @CheckForNull 044 public java.util.List<VncClientInfo> clients; 045 046 @Nonnull 047 public VncInfo withEnabled(boolean value) { 048 this.enabled = value; 049 return this; 050 } 051 052 @Nonnull 053 public VncInfo withHost(java.lang.String value) { 054 this.host = value; 055 return this; 056 } 057 058 @Nonnull 059 public VncInfo withFamily(NetworkAddressFamily value) { 060 this.family = value; 061 return this; 062 } 063 064 @Nonnull 065 public VncInfo withService(java.lang.String value) { 066 this.service = value; 067 return this; 068 } 069 070 @Nonnull 071 public VncInfo withAuth(java.lang.String value) { 072 this.auth = value; 073 return this; 074 } 075 076 @Nonnull 077 public VncInfo withClients(java.util.List<VncClientInfo> value) { 078 this.clients = value; 079 return this; 080 } 081 082 public VncInfo() { 083 } 084 085 public VncInfo(boolean enabled, java.lang.String host, NetworkAddressFamily family, java.lang.String service, java.lang.String auth, java.util.List<VncClientInfo> clients) { 086 this.enabled = enabled; 087 this.host = host; 088 this.family = family; 089 this.service = service; 090 this.auth = auth; 091 this.clients = clients; 092 } 093 094 @JsonIgnore 095 @Override 096 public java.util.List<java.lang.String> getFieldNames() { 097 java.util.List<java.lang.String> names = super.getFieldNames(); 098 names.add("enabled"); 099 names.add("host"); 100 names.add("family"); 101 names.add("service"); 102 names.add("auth"); 103 names.add("clients"); 104 return names; 105 } 106 107 @Override 108 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 109 if ("enabled".equals(name)) 110 return enabled; 111 if ("host".equals(name)) 112 return host; 113 if ("family".equals(name)) 114 return family; 115 if ("service".equals(name)) 116 return service; 117 if ("auth".equals(name)) 118 return auth; 119 if ("clients".equals(name)) 120 return clients; 121 return super.getFieldByName(name); 122 } 123}