net.dongliu.prettypb.rpc.protocol.WirePayload Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prettypb-rpc Show documentation
Show all versions of prettypb-rpc Show documentation
proto rpc libs, compatible with proto-rpc-pro
//Generated by pretty java compiler, DO NOT MODIFY!
package net.dongliu.prettypb.rpc.protocol;
import net.dongliu.prettypb.runtime.include.*;
import java.util.List;
import java.util.Map;
@ProtoBean(name = "WirePayload", protoPackage = "")
public class WirePayload implements Extendable {
@ProtoField(idx=1, type=ProtoType.Message, name="connectRequest")
private ConnectRequest connectRequest;
@ProtoField(idx=2, type=ProtoType.Message, name="connectResponse")
private ConnectResponse connectResponse;
@ProtoField(idx=3, type=ProtoType.Message, name="rpcRequest")
private RpcRequest rpcRequest;
@ProtoField(idx=4, type=ProtoType.Message, name="rpcResponse")
private RpcResponse rpcResponse;
@ProtoField(idx=5, type=ProtoType.Message, name="rpcError")
private RpcError rpcError;
@ProtoField(idx=6, type=ProtoType.Message, name="rpcCancel")
private RpcCancel rpcCancel;
@ProtoField(idx=7, type=ProtoType.Message, name="oobResponse")
private OobResponse oobResponse;
@ProtoField(idx=8, type=ProtoType.Message, name="oobMessage")
private OobMessage oobMessage;
@ProtoField(idx=100, type=ProtoType.Message, name="transparentMessage")
private OobMessage transparentMessage;
private boolean _connectRequest;
private boolean _connectResponse;
private boolean _rpcRequest;
private boolean _rpcResponse;
private boolean _rpcError;
private boolean _rpcCancel;
private boolean _oobResponse;
private boolean _oobMessage;
private boolean _transparentMessage;
public ConnectRequest getConnectRequest () {
return connectRequest;
}
public void setConnectRequest (ConnectRequest connectRequest) {
if (!this._connectRequest) this._connectRequest = true;
this.connectRequest = connectRequest;
}
public ConnectResponse getConnectResponse () {
return connectResponse;
}
public void setConnectResponse (ConnectResponse connectResponse) {
if (!this._connectResponse) this._connectResponse = true;
this.connectResponse = connectResponse;
}
public RpcRequest getRpcRequest () {
return rpcRequest;
}
public void setRpcRequest (RpcRequest rpcRequest) {
if (!this._rpcRequest) this._rpcRequest = true;
this.rpcRequest = rpcRequest;
}
public RpcResponse getRpcResponse () {
return rpcResponse;
}
public void setRpcResponse (RpcResponse rpcResponse) {
if (!this._rpcResponse) this._rpcResponse = true;
this.rpcResponse = rpcResponse;
}
public RpcError getRpcError () {
return rpcError;
}
public void setRpcError (RpcError rpcError) {
if (!this._rpcError) this._rpcError = true;
this.rpcError = rpcError;
}
public RpcCancel getRpcCancel () {
return rpcCancel;
}
public void setRpcCancel (RpcCancel rpcCancel) {
if (!this._rpcCancel) this._rpcCancel = true;
this.rpcCancel = rpcCancel;
}
public OobResponse getOobResponse () {
return oobResponse;
}
public void setOobResponse (OobResponse oobResponse) {
if (!this._oobResponse) this._oobResponse = true;
this.oobResponse = oobResponse;
}
public OobMessage getOobMessage () {
return oobMessage;
}
public void setOobMessage (OobMessage oobMessage) {
if (!this._oobMessage) this._oobMessage = true;
this.oobMessage = oobMessage;
}
public OobMessage getTransparentMessage () {
return transparentMessage;
}
public void setTransparentMessage (OobMessage transparentMessage) {
if (!this._transparentMessage) this._transparentMessage = true;
this.transparentMessage = transparentMessage;
}
public boolean hasConnectRequest () {
return _connectRequest && connectRequest != null;
}
public boolean hasConnectResponse () {
return _connectResponse && connectResponse != null;
}
public boolean hasRpcRequest () {
return _rpcRequest && rpcRequest != null;
}
public boolean hasRpcResponse () {
return _rpcResponse && rpcResponse != null;
}
public boolean hasRpcError () {
return _rpcError && rpcError != null;
}
public boolean hasRpcCancel () {
return _rpcCancel && rpcCancel != null;
}
public boolean hasOobResponse () {
return _oobResponse && oobResponse != null;
}
public boolean hasOobMessage () {
return _oobMessage && oobMessage != null;
}
public boolean hasTransparentMessage () {
return _transparentMessage && transparentMessage != null;
}
private static ExtensionRange _ext0 = new ExtensionRange(1000, 536870912);
private Extendable _extendable = new ExtendableImpl(_ext0);
public List getExtensionRangeList() {
return _extendable.getExtensionRangeList();
}
public boolean tagInExtensions(int tag) {
return _extendable.tagInExtensions(tag);
}
public boolean hasExtension(ExtensionField tag) {
return _extendable.hasExtension(tag);
}
public T getExtension(ExtensionField tag) {
return (T) _extendable.getExtension(tag);
}
public Map getAllExtensions() {
return _extendable.getAllExtensions();
}
public void setExtension(ExtensionField tag, T value) {
_extendable.setExtension(tag, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("WirePayload{\n");
if (_connectRequest)
sb.append("connectRequest: ").append(connectRequest).append("\n");
if (_connectResponse)
sb.append("connectResponse: ").append(connectResponse).append("\n");
if (_rpcRequest)
sb.append("rpcRequest: ").append(rpcRequest).append("\n");
if (_rpcResponse)
sb.append("rpcResponse: ").append(rpcResponse).append("\n");
if (_rpcError)
sb.append("rpcError: ").append(rpcError).append("\n");
if (_rpcCancel)
sb.append("rpcCancel: ").append(rpcCancel).append("\n");
if (_oobResponse)
sb.append("oobResponse: ").append(oobResponse).append("\n");
if (_oobMessage)
sb.append("oobMessage: ").append(oobMessage).append("\n");
if (_transparentMessage)
sb.append("transparentMessage: ").append(transparentMessage).append("\n");
sb.append("}");
return sb.toString();
}
}