1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19option java_package = "com.android.timezone.location.data_pipeline.steps.proto";
20option java_multiple_files = false;
21
22package com.android.timezone.location.data_pipeline.steps.proto;
23
24// Types used for storing intermediate data in the reference time zone geolocation pipeline.
25
26// The proto equivalent to Types.TzS2Polygons.
27message TzS2Polygons {
28    // The time zone ID associated with the S2 polygons.
29    required string tzId = 1;
30    // The S2 polygons.
31    repeated S2Polygon polygons = 2;
32}
33
34// A proto representation of S2Polygon.
35message S2Polygon {
36    repeated S2Loop loops = 1;
37}
38
39// A proto representation of S2Loop.
40message S2Loop {
41    repeated S2Point vertices = 1;
42}
43
44// A proto representation of S2Point.
45message S2Point {
46    required double x = 1;
47    required double y = 2;
48    required double z = 3;
49}
50
51// The proto equivalent to Types.TzS2CellUnion.
52message TzS2CellUnion {
53    // The time zone ID associated with the S2 cells.
54    required string tzId = 1;
55    // The S2 cell IDs.
56    repeated uint64 cellIds = 2;
57}
58
59// The proto equivalent to Types.TzS2Range.
60message TzS2Range {
61    // The start s2 cell ID (inclusive).
62    required uint64 startCellId = 1;
63    // The end s2 cell ID (exclusive).
64    required uint64 endCellId = 2;
65    // The values associated with the range.
66    repeated string values = 3;
67}
68
69// The proto equivalent to Types.TzS2Ranges.
70message TzS2Ranges {
71    repeated TzS2Range ranges = 1;
72}
73