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=MigrationParameters, data={compress-level=int, compress-threads=int, decompress-threads=int, x-cpu-throttle-initial=int, x-cpu-throttle-increment=int}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=MigrationParameters, data={compress-level=int, compress-threads=int, decompress-threads=int, x-cpu-throttle-initial=int, x-cpu-throttle-increment=int}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class MigrationParameters extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("compress-level") 023 @Nonnull 024 public long compressLevel; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("compress-threads") 027 @Nonnull 028 public long compressThreads; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("decompress-threads") 031 @Nonnull 032 public long decompressThreads; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("x-cpu-throttle-initial") 035 @Nonnull 036 public long xCpuThrottleInitial; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("x-cpu-throttle-increment") 039 @Nonnull 040 public long xCpuThrottleIncrement; 041 042 @Nonnull 043 public MigrationParameters withCompressLevel(long value) { 044 this.compressLevel = value; 045 return this; 046 } 047 048 @Nonnull 049 public MigrationParameters withCompressThreads(long value) { 050 this.compressThreads = value; 051 return this; 052 } 053 054 @Nonnull 055 public MigrationParameters withDecompressThreads(long value) { 056 this.decompressThreads = value; 057 return this; 058 } 059 060 @Nonnull 061 public MigrationParameters withXCpuThrottleInitial(long value) { 062 this.xCpuThrottleInitial = value; 063 return this; 064 } 065 066 @Nonnull 067 public MigrationParameters withXCpuThrottleIncrement(long value) { 068 this.xCpuThrottleIncrement = value; 069 return this; 070 } 071 072 public MigrationParameters() { 073 } 074 075 public MigrationParameters(long compressLevel, long compressThreads, long decompressThreads, long xCpuThrottleInitial, long xCpuThrottleIncrement) { 076 this.compressLevel = compressLevel; 077 this.compressThreads = compressThreads; 078 this.decompressThreads = decompressThreads; 079 this.xCpuThrottleInitial = xCpuThrottleInitial; 080 this.xCpuThrottleIncrement = xCpuThrottleIncrement; 081 } 082 083 @JsonIgnore 084 @Override 085 public java.util.List<java.lang.String> getFieldNames() { 086 java.util.List<java.lang.String> names = super.getFieldNames(); 087 names.add("compress-level"); 088 names.add("compress-threads"); 089 names.add("decompress-threads"); 090 names.add("x-cpu-throttle-initial"); 091 names.add("x-cpu-throttle-increment"); 092 return names; 093 } 094 095 @Override 096 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 097 if ("compress-level".equals(name)) 098 return compressLevel; 099 if ("compress-threads".equals(name)) 100 return compressThreads; 101 if ("decompress-threads".equals(name)) 102 return decompressThreads; 103 if ("x-cpu-throttle-initial".equals(name)) 104 return xCpuThrottleInitial; 105 if ("x-cpu-throttle-increment".equals(name)) 106 return xCpuThrottleIncrement; 107 return super.getFieldByName(name); 108 } 109}