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=Qcow2OverlapCheckFlags, data={*template=Qcow2OverlapCheckMode, *main-header=bool, *active-l1=bool, *active-l2=bool, *refcount-table=bool, *refcount-block=bool, *snapshot-table=bool, *inactive-l1=bool, *inactive-l2=bool}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=Qcow2OverlapCheckFlags, data={*template=Qcow2OverlapCheckMode, *main-header=bool, *active-l1=bool, *active-l2=bool, *refcount-table=bool, *refcount-block=bool, *snapshot-table=bool, *inactive-l1=bool, *inactive-l2=bool}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class Qcow2OverlapCheckFlags extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("template") 023 @CheckForNull 024 public Qcow2OverlapCheckMode template; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("main-header") 027 @CheckForNull 028 public java.lang.Boolean mainHeader; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("active-l1") 031 @CheckForNull 032 public java.lang.Boolean activeL1; 033 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 034 @JsonProperty("active-l2") 035 @CheckForNull 036 public java.lang.Boolean activeL2; 037 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 038 @JsonProperty("refcount-table") 039 @CheckForNull 040 public java.lang.Boolean refcountTable; 041 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 042 @JsonProperty("refcount-block") 043 @CheckForNull 044 public java.lang.Boolean refcountBlock; 045 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 046 @JsonProperty("snapshot-table") 047 @CheckForNull 048 public java.lang.Boolean snapshotTable; 049 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 050 @JsonProperty("inactive-l1") 051 @CheckForNull 052 public java.lang.Boolean inactiveL1; 053 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 054 @JsonProperty("inactive-l2") 055 @CheckForNull 056 public java.lang.Boolean inactiveL2; 057 058 @Nonnull 059 public Qcow2OverlapCheckFlags withTemplate(Qcow2OverlapCheckMode value) { 060 this.template = value; 061 return this; 062 } 063 064 @Nonnull 065 public Qcow2OverlapCheckFlags withMainHeader(java.lang.Boolean value) { 066 this.mainHeader = value; 067 return this; 068 } 069 070 @Nonnull 071 public Qcow2OverlapCheckFlags withActiveL1(java.lang.Boolean value) { 072 this.activeL1 = value; 073 return this; 074 } 075 076 @Nonnull 077 public Qcow2OverlapCheckFlags withActiveL2(java.lang.Boolean value) { 078 this.activeL2 = value; 079 return this; 080 } 081 082 @Nonnull 083 public Qcow2OverlapCheckFlags withRefcountTable(java.lang.Boolean value) { 084 this.refcountTable = value; 085 return this; 086 } 087 088 @Nonnull 089 public Qcow2OverlapCheckFlags withRefcountBlock(java.lang.Boolean value) { 090 this.refcountBlock = value; 091 return this; 092 } 093 094 @Nonnull 095 public Qcow2OverlapCheckFlags withSnapshotTable(java.lang.Boolean value) { 096 this.snapshotTable = value; 097 return this; 098 } 099 100 @Nonnull 101 public Qcow2OverlapCheckFlags withInactiveL1(java.lang.Boolean value) { 102 this.inactiveL1 = value; 103 return this; 104 } 105 106 @Nonnull 107 public Qcow2OverlapCheckFlags withInactiveL2(java.lang.Boolean value) { 108 this.inactiveL2 = value; 109 return this; 110 } 111 112 public Qcow2OverlapCheckFlags() { 113 } 114 115 public Qcow2OverlapCheckFlags(Qcow2OverlapCheckMode template, java.lang.Boolean mainHeader, java.lang.Boolean activeL1, java.lang.Boolean activeL2, java.lang.Boolean refcountTable, java.lang.Boolean refcountBlock, java.lang.Boolean snapshotTable, java.lang.Boolean inactiveL1, java.lang.Boolean inactiveL2) { 116 this.template = template; 117 this.mainHeader = mainHeader; 118 this.activeL1 = activeL1; 119 this.activeL2 = activeL2; 120 this.refcountTable = refcountTable; 121 this.refcountBlock = refcountBlock; 122 this.snapshotTable = snapshotTable; 123 this.inactiveL1 = inactiveL1; 124 this.inactiveL2 = inactiveL2; 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("template"); 132 names.add("main-header"); 133 names.add("active-l1"); 134 names.add("active-l2"); 135 names.add("refcount-table"); 136 names.add("refcount-block"); 137 names.add("snapshot-table"); 138 names.add("inactive-l1"); 139 names.add("inactive-l2"); 140 return names; 141 } 142 143 @Override 144 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 145 if ("template".equals(name)) 146 return template; 147 if ("main-header".equals(name)) 148 return mainHeader; 149 if ("active-l1".equals(name)) 150 return activeL1; 151 if ("active-l2".equals(name)) 152 return activeL2; 153 if ("refcount-table".equals(name)) 154 return refcountTable; 155 if ("refcount-block".equals(name)) 156 return refcountBlock; 157 if ("snapshot-table".equals(name)) 158 return snapshotTable; 159 if ("inactive-l1".equals(name)) 160 return inactiveL1; 161 if ("inactive-l2".equals(name)) 162 return inactiveL2; 163 return super.getFieldByName(name); 164 } 165}