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=MigrationStats, data={transferred=int, remaining=int, total=int, duplicate=int, skipped=int, normal=int, normal-bytes=int, dirty-pages-rate=int, mbps=number, dirty-sync-count=int}, innerTypes=null}</pre>
016 */
017// QApiTypeDescriptor{name=MigrationStats, data={transferred=int, remaining=int, total=int, duplicate=int, skipped=int, normal=int, normal-bytes=int, dirty-pages-rate=int, mbps=number, dirty-sync-count=int}, innerTypes=null}
018@JsonInclude(JsonInclude.Include.NON_EMPTY)
019public class MigrationStats extends QApiType {
020
021        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
022        @JsonProperty("transferred")
023        @Nonnull
024        public long transferred;
025        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
026        @JsonProperty("remaining")
027        @Nonnull
028        public long remaining;
029        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
030        @JsonProperty("total")
031        @Nonnull
032        public long total;
033        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
034        @JsonProperty("duplicate")
035        @Nonnull
036        public long duplicate;
037        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
038        @JsonProperty("skipped")
039        @Nonnull
040        public long skipped;
041        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
042        @JsonProperty("normal")
043        @Nonnull
044        public long normal;
045        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
046        @JsonProperty("normal-bytes")
047        @Nonnull
048        public long normalBytes;
049        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
050        @JsonProperty("dirty-pages-rate")
051        @Nonnull
052        public long dirtyPagesRate;
053        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
054        @JsonProperty("mbps")
055        @Nonnull
056        public double mbps;
057        @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
058        @JsonProperty("dirty-sync-count")
059        @Nonnull
060        public long dirtySyncCount;
061
062        @Nonnull
063        public MigrationStats withTransferred(long value) {
064                this.transferred = value;
065                return this;
066        }
067
068        @Nonnull
069        public MigrationStats withRemaining(long value) {
070                this.remaining = value;
071                return this;
072        }
073
074        @Nonnull
075        public MigrationStats withTotal(long value) {
076                this.total = value;
077                return this;
078        }
079
080        @Nonnull
081        public MigrationStats withDuplicate(long value) {
082                this.duplicate = value;
083                return this;
084        }
085
086        @Nonnull
087        public MigrationStats withSkipped(long value) {
088                this.skipped = value;
089                return this;
090        }
091
092        @Nonnull
093        public MigrationStats withNormal(long value) {
094                this.normal = value;
095                return this;
096        }
097
098        @Nonnull
099        public MigrationStats withNormalBytes(long value) {
100                this.normalBytes = value;
101                return this;
102        }
103
104        @Nonnull
105        public MigrationStats withDirtyPagesRate(long value) {
106                this.dirtyPagesRate = value;
107                return this;
108        }
109
110        @Nonnull
111        public MigrationStats withMbps(double value) {
112                this.mbps = value;
113                return this;
114        }
115
116        @Nonnull
117        public MigrationStats withDirtySyncCount(long value) {
118                this.dirtySyncCount = value;
119                return this;
120        }
121
122        public MigrationStats() {
123        }
124
125        public MigrationStats(long transferred, long remaining, long total, long duplicate, long skipped, long normal, long normalBytes, long dirtyPagesRate, double mbps, long dirtySyncCount) {
126                this.transferred = transferred;
127                this.remaining = remaining;
128                this.total = total;
129                this.duplicate = duplicate;
130                this.skipped = skipped;
131                this.normal = normal;
132                this.normalBytes = normalBytes;
133                this.dirtyPagesRate = dirtyPagesRate;
134                this.mbps = mbps;
135                this.dirtySyncCount = dirtySyncCount;
136        }
137
138        @JsonIgnore
139        @Override
140        public java.util.List<java.lang.String> getFieldNames() {
141                java.util.List<java.lang.String> names = super.getFieldNames();
142                names.add("transferred");
143                names.add("remaining");
144                names.add("total");
145                names.add("duplicate");
146                names.add("skipped");
147                names.add("normal");
148                names.add("normal-bytes");
149                names.add("dirty-pages-rate");
150                names.add("mbps");
151                names.add("dirty-sync-count");
152                return names;
153        }
154
155        @Override
156        public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
157                if ("transferred".equals(name))
158                        return transferred;
159                if ("remaining".equals(name))
160                        return remaining;
161                if ("total".equals(name))
162                        return total;
163                if ("duplicate".equals(name))
164                        return duplicate;
165                if ("skipped".equals(name))
166                        return skipped;
167                if ("normal".equals(name))
168                        return normal;
169                if ("normal-bytes".equals(name))
170                        return normalBytes;
171                if ("dirty-pages-rate".equals(name))
172                        return dirtyPagesRate;
173                if ("mbps".equals(name))
174                        return mbps;
175                if ("dirty-sync-count".equals(name))
176                        return dirtySyncCount;
177                return super.getFieldByName(name);
178        }
179}