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=ImageInfoSpecificVmdk, data={create-type=str, cid=int, parent-cid=int, extents=[ImageInfo]}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=ImageInfoSpecificVmdk, data={create-type=str, cid=int, parent-cid=int, extents=[ImageInfo]}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class ImageInfoSpecificVmdk extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("create-type")
023        @Nonnull
024        public java.lang.String createType;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("cid")
027        @Nonnull
028        public long cid;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("parent-cid")
031        @Nonnull
032        public long parentCid;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("extents")
035        @Nonnull
036        public java.util.List<ImageInfo> extents;
037
038        @Nonnull
039        public ImageInfoSpecificVmdk withCreateType(java.lang.String value) {
040                this.createType = value;
041                return this;
042        }
043
044        @Nonnull
045        public ImageInfoSpecificVmdk withCid(long value) {
046                this.cid = value;
047                return this;
048        }
049
050        @Nonnull
051        public ImageInfoSpecificVmdk withParentCid(long value) {
052                this.parentCid = value;
053                return this;
054        }
055
056        @Nonnull
057        public ImageInfoSpecificVmdk withExtents(java.util.List<ImageInfo> value) {
058                this.extents = value;
059                return this;
060        }
061
062        public ImageInfoSpecificVmdk() {
063        }
064
065        public ImageInfoSpecificVmdk(java.lang.String createType, long cid, long parentCid, java.util.List<ImageInfo> extents) {
066                this.createType = createType;
067                this.cid = cid;
068                this.parentCid = parentCid;
069                this.extents = extents;
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("create-type");
077                names.add("cid");
078                names.add("parent-cid");
079                names.add("extents");
080                return names;
081        }
082
083        @Override
084        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
085                if ("create-type".equals(name))
086                        return createType;
087                if ("cid".equals(name))
088                        return cid;
089                if ("parent-cid".equals(name))
090                        return parentCid;
091                if ("extents".equals(name))
092                        return extents;
093                return super.getFieldByName(name);
094        }
095}