All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.dongliu.prettypb.rpc.protocol.ConnectRequest Maven / Gradle / Ivy

There is a newer version: 0.3.5
Show newest version
//Generated by pretty java compiler, DO NOT MODIFY!
package net.dongliu.prettypb.rpc.protocol;
import net.dongliu.prettypb.runtime.include.*;

@ProtoBean(name = "ConnectRequest", protoPackage = "")
public class ConnectRequest {
    
    @ProtoField(idx=1, type=ProtoType.Int32, name="correlationId", required=true)
    private int correlationId;
    
    @ProtoField(idx=2, type=ProtoType.String, name="clientHostName", required=true)
    private String clientHostName;
    
    @ProtoField(idx=3, type=ProtoType.Int32, name="clientPort", required=true)
    private int clientPort;
    
    @ProtoField(idx=4, type=ProtoType.String, name="clientPID", required=true)
    private String clientPID;
    
    @ProtoField(idx=5, type=ProtoType.Bool, name="compress")
    private boolean compress;
    
    private boolean _correlationId;
    private boolean _clientHostName;
    private boolean _clientPort;
    private boolean _clientPID;
    private boolean _compress;
    
    public int getCorrelationId () {
        return correlationId;
    }
    
    public void setCorrelationId (int correlationId) {
        if (!this._correlationId) this._correlationId = true;
        this.correlationId = correlationId;
    }
    
    public String getClientHostName () {
        return clientHostName;
    }
    
    public void setClientHostName (String clientHostName) {
        if (!this._clientHostName) this._clientHostName = true;
        this.clientHostName = clientHostName;
    }
    
    public int getClientPort () {
        return clientPort;
    }
    
    public void setClientPort (int clientPort) {
        if (!this._clientPort) this._clientPort = true;
        this.clientPort = clientPort;
    }
    
    public String getClientPID () {
        return clientPID;
    }
    
    public void setClientPID (String clientPID) {
        if (!this._clientPID) this._clientPID = true;
        this.clientPID = clientPID;
    }
    
    public boolean isCompress () {
        return compress;
    }
    
    public void setCompress (boolean compress) {
        if (!this._compress) this._compress = true;
        this.compress = compress;
    }
    
    public boolean hasCorrelationId () {
        return _correlationId;
    }
    
    public boolean hasClientHostName () {
        return _clientHostName && clientHostName != null;
    }
    
    public boolean hasClientPort () {
        return _clientPort;
    }
    
    public boolean hasClientPID () {
        return _clientPID && clientPID != null;
    }
    
    public boolean hasCompress () {
        return _compress;
    }
    
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("ConnectRequest{\n");
        if (_correlationId)
            sb.append("correlationId: ").append(correlationId).append("\n");
        if (_clientHostName)
            sb.append("clientHostName: ").append(clientHostName).append("\n");
        if (_clientPort)
            sb.append("clientPort: ").append(clientPort).append("\n");
        if (_clientPID)
            sb.append("clientPID: ").append(clientPID).append("\n");
        if (_compress)
            sb.append("compress: ").append(compress).append("\n");
        sb.append("}");
        return sb.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy