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=SpiceInfo, data={enabled=bool, migrated=bool, *host=str, *port=int, *tls-port=int, *auth=str, *compiled-version=str, mouse-mode=SpiceQueryMouseMode, *channels=[SpiceChannel]}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=SpiceInfo, data={enabled=bool, migrated=bool, *host=str, *port=int, *tls-port=int, *auth=str, *compiled-version=str, mouse-mode=SpiceQueryMouseMode, *channels=[SpiceChannel]}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class SpiceInfo 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("migrated")
027        @Nonnull
028        public boolean migrated;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("host")
031        @CheckForNull
032        public java.lang.String host;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("port")
035        @CheckForNull
036        public java.lang.Long port;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("tls-port")
039        @CheckForNull
040        public java.lang.Long tlsPort;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("auth")
043        @CheckForNull
044        public java.lang.String auth;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("compiled-version")
047        @CheckForNull
048        public java.lang.String compiledVersion;
049        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
050        @JsonProperty("mouse-mode")
051        @Nonnull
052        public SpiceQueryMouseMode mouseMode;
053        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
054        @JsonProperty("channels")
055        @CheckForNull
056        public java.util.List<SpiceChannel> channels;
057
058        @Nonnull
059        public SpiceInfo withEnabled(boolean value) {
060                this.enabled = value;
061                return this;
062        }
063
064        @Nonnull
065        public SpiceInfo withMigrated(boolean value) {
066                this.migrated = value;
067                return this;
068        }
069
070        @Nonnull
071        public SpiceInfo withHost(java.lang.String value) {
072                this.host = value;
073                return this;
074        }
075
076        @Nonnull
077        public SpiceInfo withPort(java.lang.Long value) {
078                this.port = value;
079                return this;
080        }
081
082        @Nonnull
083        public SpiceInfo withTlsPort(java.lang.Long value) {
084                this.tlsPort = value;
085                return this;
086        }
087
088        @Nonnull
089        public SpiceInfo withAuth(java.lang.String value) {
090                this.auth = value;
091                return this;
092        }
093
094        @Nonnull
095        public SpiceInfo withCompiledVersion(java.lang.String value) {
096                this.compiledVersion = value;
097                return this;
098        }
099
100        @Nonnull
101        public SpiceInfo withMouseMode(SpiceQueryMouseMode value) {
102                this.mouseMode = value;
103                return this;
104        }
105
106        @Nonnull
107        public SpiceInfo withChannels(java.util.List<SpiceChannel> value) {
108                this.channels = value;
109                return this;
110        }
111
112        public SpiceInfo() {
113        }
114
115        public SpiceInfo(boolean enabled, boolean migrated, java.lang.String host, java.lang.Long port, java.lang.Long tlsPort, java.lang.String auth, java.lang.String compiledVersion, SpiceQueryMouseMode mouseMode, java.util.List<SpiceChannel> channels) {
116                this.enabled = enabled;
117                this.migrated = migrated;
118                this.host = host;
119                this.port = port;
120                this.tlsPort = tlsPort;
121                this.auth = auth;
122                this.compiledVersion = compiledVersion;
123                this.mouseMode = mouseMode;
124                this.channels = channels;
125        }
126
127        @JsonIgnore
128        @Override
129        public java.util.List<java.lang.String> getFieldNames() {
130                java.util.List<java.lang.String> names = super.getFieldNames();
131                names.add("enabled");
132                names.add("migrated");
133                names.add("host");
134                names.add("port");
135                names.add("tls-port");
136                names.add("auth");
137                names.add("compiled-version");
138                names.add("mouse-mode");
139                names.add("channels");
140                return names;
141        }
142
143        @Override
144        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
145                if ("enabled".equals(name))
146                        return enabled;
147                if ("migrated".equals(name))
148                        return migrated;
149                if ("host".equals(name))
150                        return host;
151                if ("port".equals(name))
152                        return port;
153                if ("tls-port".equals(name))
154                        return tlsPort;
155                if ("auth".equals(name))
156                        return auth;
157                if ("compiled-version".equals(name))
158                        return compiledVersion;
159                if ("mouse-mode".equals(name))
160                        return mouseMode;
161                if ("channels".equals(name))
162                        return channels;
163                return super.getFieldByName(name);
164        }
165}