package com.nativelibs4java.mono.bridj;
import com.nativelibs4java.mono.bridj.MonoLibrary.MonoMarshalNative;
import com.nativelibs4java.mono.bridj.MonoLibrary.MonoMarshalVariant;
import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ValuedEnum;
import org.bridj.ann.Field;
import org.bridj.ann.Library;
import org.bridj.ann.Union;
/**
 * <i>native declaration : /Library/Frameworks/Mono.framework/Headers/mono-2.0/mono/metadata/metadata.h</i><br>
 * This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
 * a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
 * For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> or <a href="http://bridj.googlecode.com/">BridJ</a> .
 */
@Library("mono") 
public class MonoMarshalSpec extends StructObject {
	public MonoMarshalSpec() {
		super();
	}
	public MonoMarshalSpec(Pointer pointer) {
		super(pointer);
	}
	/// C type : MonoMarshalNative
	@Field(0) 
	public ValuedEnum<MonoMarshalNative > native$() {
		return this.io.getEnumField(this, 0);
	}
	/// C type : MonoMarshalNative
	@Field(0) 
	public MonoMarshalSpec native$(ValuedEnum<MonoMarshalNative > native$) {
		this.io.setEnumField(this, 0, native$);
		return this;
	}
	/// C type : data_union
	@Field(1) 
	public MonoMarshalSpec.data_union data() {
		return this.io.getNativeObjectField(this, 1);
	}
	/// <i>native declaration : /Library/Frameworks/Mono.framework/Headers/mono-2.0/mono/metadata/metadata.h:182</i>
	@Union 
	public static class data_union extends StructObject {
		public data_union() {
			super();
		}
		public data_union(Pointer pointer) {
			super(pointer);
		}
		/// C type : array_data_struct
		@Field(0) 
		public MonoMarshalSpec.data_union.array_data_struct array_data() {
			return this.io.getNativeObjectField(this, 0);
		}
		/// C type : custom_data_struct
		@Field(1) 
		public MonoMarshalSpec.data_union.custom_data_struct custom_data() {
			return this.io.getNativeObjectField(this, 1);
		}
		/// C type : safearray_data_struct
		@Field(2) 
		public MonoMarshalSpec.data_union.safearray_data_struct safearray_data() {
			return this.io.getNativeObjectField(this, 2);
		}
		/// <i>native declaration : /Library/Frameworks/Mono.framework/Headers/mono-2.0/mono/metadata/metadata.h:183</i>
		public static class array_data_struct extends StructObject {
			public array_data_struct() {
				super();
			}
			public array_data_struct(Pointer pointer) {
				super(pointer);
			}
			/// C type : MonoMarshalNative
			@Field(0) 
			public ValuedEnum<MonoMarshalNative > elem_type() {
				return this.io.getEnumField(this, 0);
			}
			/// C type : MonoMarshalNative
			@Field(0) 
			public array_data_struct elem_type(ValuedEnum<MonoMarshalNative > elem_type) {
				this.io.setEnumField(this, 0, elem_type);
				return this;
			}
			/// -1 if not set
			@Field(1) 
			public int num_elem() {
				return this.io.getIntField(this, 1);
			}
			/// -1 if not set
			@Field(1) 
			public array_data_struct num_elem(int num_elem) {
				this.io.setIntField(this, 1, num_elem);
				return this;
			}
			/// -1 if not set
			@Field(2) 
			public short param_num() {
				return this.io.getShortField(this, 2);
			}
			/// -1 if not set
			@Field(2) 
			public array_data_struct param_num(short param_num) {
				this.io.setShortField(this, 2, param_num);
				return this;
			}
			/// -1 if not set
			@Field(3) 
			public short elem_mult() {
				return this.io.getShortField(this, 3);
			}
			/// -1 if not set
			@Field(3) 
			public array_data_struct elem_mult(short elem_mult) {
				this.io.setShortField(this, 3, elem_mult);
				return this;
			}
		};
		/// <i>native declaration : /Library/Frameworks/Mono.framework/Headers/mono-2.0/mono/metadata/metadata.h:189</i>
		public static class custom_data_struct extends StructObject {
			public custom_data_struct() {
				super();
			}
			public custom_data_struct(Pointer pointer) {
				super(pointer);
			}
			/// C type : char*
			@Field(0) 
			public Pointer<Byte > custom_name() {
				return this.io.getPointerField(this, 0);
			}
			/// C type : char*
			@Field(0) 
			public custom_data_struct custom_name(Pointer<Byte > custom_name) {
				this.io.setPointerField(this, 0, custom_name);
				return this;
			}
			/// C type : char*
			@Field(1) 
			public Pointer<Byte > cookie() {
				return this.io.getPointerField(this, 1);
			}
			/// C type : char*
			@Field(1) 
			public custom_data_struct cookie(Pointer<Byte > cookie) {
				this.io.setPointerField(this, 1, cookie);
				return this;
			}
		};
		/// <i>native declaration : /Library/Frameworks/Mono.framework/Headers/mono-2.0/mono/metadata/metadata.h:193</i>
		public static class safearray_data_struct extends StructObject {
			public safearray_data_struct() {
				super();
			}
			public safearray_data_struct(Pointer pointer) {
				super(pointer);
			}
			/// C type : MonoMarshalVariant
			@Field(0) 
			public ValuedEnum<MonoMarshalVariant > elem_type() {
				return this.io.getEnumField(this, 0);
			}
			/// C type : MonoMarshalVariant
			@Field(0) 
			public safearray_data_struct elem_type(ValuedEnum<MonoMarshalVariant > elem_type) {
				this.io.setEnumField(this, 0, elem_type);
				return this;
			}
			@Field(1) 
			public int num_elem() {
				return this.io.getIntField(this, 1);
			}
			@Field(1) 
			public safearray_data_struct num_elem(int num_elem) {
				this.io.setIntField(this, 1, num_elem);
				return this;
			}
		};
	};
}
