package org.anarres.qemu.qapi.api;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import org.anarres.qemu.qapi.common.*;

/**
 * Autogenerated class.
 *
 * <pre>QApiStructDescriptor{name=CpuModelExpansionInfo, data={model=CpuModelInfo}, innerTypes=null, fields=null, base=null}</pre>
 */
// QApiStructDescriptor{name=CpuModelExpansionInfo, data={model=CpuModelInfo}, innerTypes=null, fields=null, base=null}
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class CpuModelExpansionInfo extends QApiType {

	@SuppressFBWarnings("NP_NONNULL_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR")
	@JsonProperty("model")
	@Nonnull
	public CpuModelInfo model;

	@Nonnull
	public CpuModelExpansionInfo withModel(CpuModelInfo value) {
		this.model = value;
		return this;
	}

	public CpuModelExpansionInfo() {
	}

	public CpuModelExpansionInfo(CpuModelInfo model) {
		this.model = model;
	}

	@JsonIgnore
	@Override
	public java.util.List<java.lang.String> getFieldNames() {
		java.util.List<java.lang.String> names = super.getFieldNames();
		names.add("model");
		return names;
	}

	@Override
	public Object getFieldByName(@Nonnull java.lang.String name) throws NoSuchFieldException {
		if ("model".equals(name))
			return model;
		return super.getFieldByName(name);
	}
}
