aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/TestBed/bcl.proto
blob: bf4ff090da426af5df6242375e6cf999b339299e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package bcl;

option csharp_namespace = "Google.ProtocolBuffers.Bcl";
option csharp_file_classname = "BclProtoFile";

option optimize_for = SPEED;

message TimeSpan {
  optional sint64 value = 1; // the size of the timespan (in units of the selected scale)
  optional TimeSpanScale scale = 2 [default = DAYS]; // the scale of the timespan
  enum TimeSpanScale {
    DAYS = 0;
    HOURS = 1;
    MINUTES = 2;
    SECONDS = 3;
    MILLISECONDS = 4;

    MINMAX = 15; // dubious
  }
}

message DateTime {
  optional sint64 value = 1; // the offset (in units of the selected scale) from 1970/01/01
  optional TimeSpanScale scale = 2 [default = DAYS]; // the scale of the timespan
  enum TimeSpanScale {
    DAYS = 0;
    HOURS = 1;
    MINUTES = 2;
    SECONDS = 3;
    MILLISECONDS = 4;

    MINMAX = 15; // dubious
  }
}

message Guid {
  optional fixed64 lo = 1; // the first 8 bytes of the guid
  optional fixed64 hi = 2; // the second 8 bytes of the guid
}

message Decimal {
  optional uint64 lo = 1; // the first 64 bits of the underlying value
  optional uint32 hi = 2; // the last 32 bis of the underlying value
  optional uint32 signScale = 3; // the number of decimal digits, and the sign
}