package apicalldetails_cache;

option java_package = "be.iminds.ilabt.jfed.log.cache";
option java_outer_classname = "ApiCallDetailsProtos";

message PBApiCallDetails {

    required int32 id = 1;
    optional string authorityName = 2;
    optional string authorityUrn = 3;
    optional string baseServerUrl = 4;
    optional string callServerUrl = 5;
    optional PBProxyInfo proxyInfo = 6;
    optional string connectionSslAuthUserUrn = 7;
    optional string connectionSslAuthUserCertificates = 8;
    optional string connectionId = 9;

    optional string connectionBasicHttpAuthUsername = 10;

    optional string connectionAuthenticationMethod = 11;
    optional string connectionProtocol = 12;
    optional string connectionType = 13;

    optional string httpRequestLine = 20;
    optional string httpRequestHeaders = 21;
    optional string httpRequest = 22;
    optional string httpStatusLine = 23;
    optional string httpResponseHeaders = 24;
    optional string httpReply = 25;

    optional string xmlRpcRequestJsonString = 30;
    optional string xmlRpcReplyJsonString = 31;

    optional string apiName = 40;
    optional string javaMethodName = 41;
    optional string geniMethodName = 42;
    optional string methodParameters = 43;

    optional string xmlRpcGeniValue = 45;
    optional string xmlRpcGeniOutput = 46;
    optional string xmlRpcGeniCode = 47;

    //These are in reply, but stored separately to help to and from XML (which can't reconstruct reply)
    optional int32 geniResponseCode = 50;
    optional string geniResponseCodeDescription = 51;
    optional bool geniCodeIsSuccess = 52;
    optional bool geniCodeIsBusy = 53;
    optional string geniResponseOutput = 54;


    optional int64 startTime = 60;
    optional int64 stopTime = 61;

    optional string rawValue = 65;
    optional string protogeniSpewLogUrl = 69;

    optional string exceptionString = 70;


}

message PBProxyInfo {
    extensions 100 to max;

    enum Type  {
    Base = 1;
    SSH = 2;
    }

    required Type type = 1;
    required string hostname  =2;
    required int32 port =3;
}

message PBSshProxyInfo {
    extend PBProxyInfo {
        optional string username = 100;
        optional string hostkey = 101;
    }
}