package StructuralClass;

import TX_OtherClass.JceStruct;
import TX_OtherClass.c;
import TX_OtherClass.d;

public final class TempletItem extends JceStruct {
    static byte[] cache_data;
    static DebugInfo cache_debugInfo = new DebugInfo();
    static int cache_itemType = 0;
    public byte[] data = null;
    public DebugInfo debugInfo = null;
    public int itemType = 0;
    
    public TempletItem() {
        super();
        this.itemType = 0;
        this.data = null;
        this.debugInfo = null;
    }

    public TempletItem(int i, byte[] bArr, DebugInfo debugInfo) {
        this.itemType = i;
        this.data = bArr;
        this.debugInfo = debugInfo;
    }

    public final void writeTo(d dVar) {
        dVar.a(this.itemType, 0);
        if (this.data != null) {
            dVar.a(this.data, 1);
        }
        if (this.debugInfo != null) {
            dVar.a(this.debugInfo, 2);
        }
    }

    static {
        byte[] bArr = new byte[1];
        cache_data = bArr;
        bArr[0] = (byte) 0;
    }

    public final void readFrom(c cVar) {
        this.itemType = cVar.a(this.itemType, 0, true);
        this.data = cVar.c(1, false);
        this.debugInfo = (DebugInfo) cVar.a(cache_debugInfo, 2, false);
    }
}
