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=BlockdevCacheOptions, data={*writeback=bool, *direct=bool, *no-flush=bool}, innerTypes=null}</pre> 016 */ 017// QApiTypeDescriptor{name=BlockdevCacheOptions, data={*writeback=bool, *direct=bool, *no-flush=bool}, innerTypes=null} 018@JsonInclude(JsonInclude.Include.NON_EMPTY) 019public class BlockdevCacheOptions extends QApiType { 020 021 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 022 @JsonProperty("writeback") 023 @CheckForNull 024 public java.lang.Boolean writeback; 025 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 026 @JsonProperty("direct") 027 @CheckForNull 028 public java.lang.Boolean direct; 029 @SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR") 030 @JsonProperty("no-flush") 031 @CheckForNull 032 public java.lang.Boolean noFlush; 033 034 @Nonnull 035 public BlockdevCacheOptions withWriteback(java.lang.Boolean value) { 036 this.writeback = value; 037 return this; 038 } 039 040 @Nonnull 041 public BlockdevCacheOptions withDirect(java.lang.Boolean value) { 042 this.direct = value; 043 return this; 044 } 045 046 @Nonnull 047 public BlockdevCacheOptions withNoFlush(java.lang.Boolean value) { 048 this.noFlush = value; 049 return this; 050 } 051 052 public BlockdevCacheOptions() { 053 } 054 055 public BlockdevCacheOptions(java.lang.Boolean writeback, java.lang.Boolean direct, java.lang.Boolean noFlush) { 056 this.writeback = writeback; 057 this.direct = direct; 058 this.noFlush = noFlush; 059 } 060 061 @JsonIgnore 062 @Override 063 public java.util.List<java.lang.String> getFieldNames() { 064 java.util.List<java.lang.String> names = super.getFieldNames(); 065 names.add("writeback"); 066 names.add("direct"); 067 names.add("no-flush"); 068 return names; 069 } 070 071 @Override 072 public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException { 073 if ("writeback".equals(name)) 074 return writeback; 075 if ("direct".equals(name)) 076 return direct; 077 if ("no-flush".equals(name)) 078 return noFlush; 079 return super.getFieldByName(name); 080 } 081}