package virtdb.interface.pb;

enum Kind {
    STRING    = 2;
    INT32     = 3;
    INT64     = 4;
    UINT32    = 5;
    UINT64    = 6;
    DOUBLE    = 7;
    FLOAT     = 8;
    BOOL      = 9;
    BYTES     = 10;
    DATE      = 11;
    TIME      = 12;
    DATETIME  = 13;
    NUMERIC   = 14;
    INET4     = 15;
    INET6     = 16;
    MAC       = 17;
    GEODATA   = 18;
}

message ValueType {
    required Kind      Type          = 1;
    repeated string    StringValue   = 2;
    repeated int32     Int32Value    = 3 [packed=true];
    repeated int64     Int64Value    = 4 [packed=true];
    repeated uint32    UInt32Value   = 5 [packed=true];
    repeated uint64    UInt64Value   = 6 [packed=true];
    repeated double    DoubleValue   = 7 [packed=true];
    repeated float     FloatValue    = 8 [packed=true];
    repeated bool      BoolValue     = 9 [packed=true];
    repeated bytes     BytesValue    = 10;
    repeated bool      IsNull        = 11 [packed=true];
}

message KeyValue {
    required string    Key           = 1;
    repeated KeyValue  Children      = 2;
    optional ValueType Value         = 3;
}

