// Code generated by gobind. DO NOT EDIT.

// Java class io.nekohasekai.libbox.ProfilePreview is a proxy for talking to a Go program.
//
//   autogenerated by gobind -lang=java -javapkg=io.nekohasekai github.com/sagernet/sing-box/experimental/libbox
package io.nekohasekai.libbox;

import go.Seq;

public final class ProfilePreview implements Seq.Proxy {
	static { Libbox.touch(); }
	
	public final int refnum;
	
	@Override public final int incRefnum() {
	      Seq.incGoRef(refnum, this);
	      return refnum;
	}
	
	ProfilePreview(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
	
	public ProfilePreview() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
	
	private static native int __New();
	
	public final native long getProfileID();
	public final native void setProfileID(long v);
	
	public final native String getName();
	public final native void setName(String v);
	
	public final native int getType();
	public final native void setType(int v);
	
	@Override public boolean equals(Object o) {
		if (o == null || !(o instanceof ProfilePreview)) {
		    return false;
		}
		ProfilePreview that = (ProfilePreview)o;
		long thisProfileID = getProfileID();
		long thatProfileID = that.getProfileID();
		if (thisProfileID != thatProfileID) {
		    return false;
		}
		String thisName = getName();
		String thatName = that.getName();
		if (thisName == null) {
			if (thatName != null) {
			    return false;
			}
		} else if (!thisName.equals(thatName)) {
		    return false;
		}
		int thisType = getType();
		int thatType = that.getType();
		if (thisType != thatType) {
		    return false;
		}
		return true;
	}
	
	@Override public int hashCode() {
	    return java.util.Arrays.hashCode(new Object[] {getProfileID(), getName(), getType()});
	}
	
	@Override public String toString() {
		StringBuilder b = new StringBuilder();
		b.append("ProfilePreview").append("{");
		b.append("ProfileID:").append(getProfileID()).append(",");
		b.append("Name:").append(getName()).append(",");
		b.append("Type:").append(getType()).append(",");
		return b.append("}").toString();
	}
}

