-
Notifications
You must be signed in to change notification settings - Fork 17
/
routeguide.route_guide.d.ts
64 lines (56 loc) · 2.25 KB
/
routeguide.route_guide.d.ts
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Code generated by protoc-gen-tstypes. DO NOT EDIT.
declare namespace routeguide {
// Points are represented as latitude-longitude pairs in the E7 representation
// (degrees multiplied by 10**7 and rounded to the nearest integer).
// Latitudes should be in the range +/- 90 degrees and longitude should be in
// the range +/- 180 degrees (inclusive).
export interface Point {
latitude?: number;
longitude?: number;
}
// A latitude-longitude rectangle, represented as two diagonally opposite
// points "lo" and "hi".
export interface Rectangle {
// One corner of the rectangle.
lo?: Point;
// The other corner of the rectangle.
hi?: Point;
}
// A feature names something at a given point.
//
// If a feature could not be named, the name is empty.
export interface Feature {
// The name of the feature.
name?: string;
// The point where the feature is detected.
location?: Point;
}
// A RouteNote is a message sent while at a given point.
export interface RouteNote {
// The location from which the message is sent.
location?: Point;
// The message to be sent.
message?: string;
}
// A RouteSummary is received in response to a RecordRoute rpc.
//
// It contains the number of individual points received, the number of
// detected features, and the total distance covered as the cumulative sum of
// the distance between each point.
export interface RouteSummary {
// The number of points received.
point_count?: number;
// The number of known features passed while traversing the route.
feature_count?: number;
// The distance covered in metres.
distance?: number;
// The duration of the traversal in seconds.
elapsed_time?: number;
}
export interface RouteGuideService {
GetFeature: (r:Point) => Feature;
ListFeatures: (r:Rectangle, cb:(a:{value: Feature, done: boolean}) => void) => void;
RecordRoute: (r:() => {value: Point, done: boolean}) => RouteSummary;
RouteChat: (r:() => {value: RouteNote, done: boolean}, cb:(a:{value: RouteNote, done: boolean}) => void) => void;
}
}