// Code generated by gobind. DO NOT EDIT.

// Java class io.nekohasekai.libbox.ErrorMessage 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 ErrorMessage implements Seq.Proxy {
	static { Libbox.touch(); }
	
	public final int refnum;
	
	@Override public final int incRefnum() {
	      Seq.incGoRef(refnum, this);
	      return refnum;
	}
	
	ErrorMessage(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
	
	public ErrorMessage() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
	
	private static native int __New();
	
	public final native String getMessage();
	public final native void setMessage(String v);
	
	public native byte[] encode();
	@Override public boolean equals(Object o) {
		if (o == null || !(o instanceof ErrorMessage)) {
		    return false;
		}
		ErrorMessage that = (ErrorMessage)o;
		String thisMessage = getMessage();
		String thatMessage = that.getMessage();
		if (thisMessage == null) {
			if (thatMessage != null) {
			    return false;
			}
		} else if (!thisMessage.equals(thatMessage)) {
		    return false;
		}
		return true;
	}
	
	@Override public int hashCode() {
	    return java.util.Arrays.hashCode(new Object[] {getMessage()});
	}
	
	@Override public String toString() {
		StringBuilder b = new StringBuilder();
		b.append("ErrorMessage").append("{");
		b.append("Message:").append(getMessage()).append(",");
		return b.append("}").toString();
	}
}

