// Code generated by gobind. DO NOT EDIT.

// Java class io.nekohasekai.libbox.SystemProxyStatus 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 SystemProxyStatus implements Seq.Proxy {
	static { Libbox.touch(); }
	
	public final int refnum;
	
	@Override public final int incRefnum() {
	      Seq.incGoRef(refnum, this);
	      return refnum;
	}
	
	SystemProxyStatus(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
	
	public SystemProxyStatus() { this.refnum = __New(); Seq.trackGoRef(refnum, this); }
	
	private static native int __New();
	
	public final native boolean getAvailable();
	public final native void setAvailable(boolean v);
	
	public final native boolean getEnabled();
	public final native void setEnabled(boolean v);
	
	@Override public boolean equals(Object o) {
		if (o == null || !(o instanceof SystemProxyStatus)) {
		    return false;
		}
		SystemProxyStatus that = (SystemProxyStatus)o;
		boolean thisAvailable = getAvailable();
		boolean thatAvailable = that.getAvailable();
		if (thisAvailable != thatAvailable) {
		    return false;
		}
		boolean thisEnabled = getEnabled();
		boolean thatEnabled = that.getEnabled();
		if (thisEnabled != thatEnabled) {
		    return false;
		}
		return true;
	}
	
	@Override public int hashCode() {
	    return java.util.Arrays.hashCode(new Object[] {getAvailable(), getEnabled()});
	}
	
	@Override public String toString() {
		StringBuilder b = new StringBuilder();
		b.append("SystemProxyStatus").append("{");
		b.append("Available:").append(getAvailable()).append(",");
		b.append("Enabled:").append(getEnabled()).append(",");
		return b.append("}").toString();
	}
}

