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=MigrationInfo, data={*status=MigrationStatus, *ram=MigrationStats, *disk=MigrationStats, *xbzrle-cache=XBZRLECacheStats, *total-time=int, *expected-downtime=int, *downtime=int, *setup-time=int, *x-cpu-throttle-percentage=int}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=MigrationInfo, data={*status=MigrationStatus, *ram=MigrationStats, *disk=MigrationStats, *xbzrle-cache=XBZRLECacheStats, *total-time=int, *expected-downtime=int, *downtime=int, *setup-time=int, *x-cpu-throttle-percentage=int}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class MigrationInfo extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("status")
023        @CheckForNull
024        public MigrationStatus status;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("ram")
027        @CheckForNull
028        public MigrationStats ram;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("disk")
031        @CheckForNull
032        public MigrationStats disk;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("xbzrle-cache")
035        @CheckForNull
036        public XBZRLECacheStats xbzrleCache;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("total-time")
039        @CheckForNull
040        public java.lang.Long totalTime;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("expected-downtime")
043        @CheckForNull
044        public java.lang.Long expectedDowntime;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("downtime")
047        @CheckForNull
048        public java.lang.Long downtime;
049        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
050        @JsonProperty("setup-time")
051        @CheckForNull
052        public java.lang.Long setupTime;
053        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
054        @JsonProperty("x-cpu-throttle-percentage")
055        @CheckForNull
056        public java.lang.Long xCpuThrottlePercentage;
057
058        @Nonnull
059        public MigrationInfo withStatus(MigrationStatus value) {
060                this.status = value;
061                return this;
062        }
063
064        @Nonnull
065        public MigrationInfo withRam(MigrationStats value) {
066                this.ram = value;
067                return this;
068        }
069
070        @Nonnull
071        public MigrationInfo withDisk(MigrationStats value) {
072                this.disk = value;
073                return this;
074        }
075
076        @Nonnull
077        public MigrationInfo withXbzrleCache(XBZRLECacheStats value) {
078                this.xbzrleCache = value;
079                return this;
080        }
081
082        @Nonnull
083        public MigrationInfo withTotalTime(java.lang.Long value) {
084                this.totalTime = value;
085                return this;
086        }
087
088        @Nonnull
089        public MigrationInfo withExpectedDowntime(java.lang.Long value) {
090                this.expectedDowntime = value;
091                return this;
092        }
093
094        @Nonnull
095        public MigrationInfo withDowntime(java.lang.Long value) {
096                this.downtime = value;
097                return this;
098        }
099
100        @Nonnull
101        public MigrationInfo withSetupTime(java.lang.Long value) {
102                this.setupTime = value;
103                return this;
104        }
105
106        @Nonnull
107        public MigrationInfo withXCpuThrottlePercentage(java.lang.Long value) {
108                this.xCpuThrottlePercentage = value;
109                return this;
110        }
111
112        public MigrationInfo() {
113        }
114
115        public MigrationInfo(MigrationStatus status, MigrationStats ram, MigrationStats disk, XBZRLECacheStats xbzrleCache, java.lang.Long totalTime, java.lang.Long expectedDowntime, java.lang.Long downtime, java.lang.Long setupTime, java.lang.Long xCpuThrottlePercentage) {
116                this.status = status;
117                this.ram = ram;
118                this.disk = disk;
119                this.xbzrleCache = xbzrleCache;
120                this.totalTime = totalTime;
121                this.expectedDowntime = expectedDowntime;
122                this.downtime = downtime;
123                this.setupTime = setupTime;
124                this.xCpuThrottlePercentage = xCpuThrottlePercentage;
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("status");
132                names.add("ram");
133                names.add("disk");
134                names.add("xbzrle-cache");
135                names.add("total-time");
136                names.add("expected-downtime");
137                names.add("downtime");
138                names.add("setup-time");
139                names.add("x-cpu-throttle-percentage");
140                return names;
141        }
142
143        @Override
144        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
145                if ("status".equals(name))
146                        return status;
147                if ("ram".equals(name))
148                        return ram;
149                if ("disk".equals(name))
150                        return disk;
151                if ("xbzrle-cache".equals(name))
152                        return xbzrleCache;
153                if ("total-time".equals(name))
154                        return totalTime;
155                if ("expected-downtime".equals(name))
156                        return expectedDowntime;
157                if ("downtime".equals(name))
158                        return downtime;
159                if ("setup-time".equals(name))
160                        return setupTime;
161                if ("x-cpu-throttle-percentage".equals(name))
162                        return xCpuThrottlePercentage;
163                return super.getFieldByName(name);
164        }
165}