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=NetdevDumpOptions, data={*len=size, *file=str}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=NetdevDumpOptions, data={*len=size, *file=str}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class NetdevDumpOptions extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("len")
023        @CheckForNull
024        public java.lang.Long len;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("file")
027        @CheckForNull
028        public java.lang.String file;
029
030        @Nonnull
031        public NetdevDumpOptions withLen(java.lang.Long value) {
032                this.len = value;
033                return this;
034        }
035
036        @Nonnull
037        public NetdevDumpOptions withFile(java.lang.String value) {
038                this.file = value;
039                return this;
040        }
041
042        public NetdevDumpOptions() {
043        }
044
045        public NetdevDumpOptions(java.lang.Long len, java.lang.String file) {
046                this.len = len;
047                this.file = file;
048        }
049
050        @JsonIgnore
051        @Override
052        public java.util.List<java.lang.String> getFieldNames() {
053                java.util.List<java.lang.String> names = super.getFieldNames();
054                names.add("len");
055                names.add("file");
056                return names;
057        }
058
059        @Override
060        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
061                if ("len".equals(name))
062                        return len;
063                if ("file".equals(name))
064                        return file;
065                return super.getFieldByName(name);
066        }
067}