tzf_rs/gen/
tzf.v1.rs

1// @generated
2// This file is @generated by prost-build.
3/// Basic point data define.
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6pub struct Point {
7    #[prost(float, tag="1")]
8    pub lng: f32,
9    #[prost(float, tag="2")]
10    pub lat: f32,
11}
12/// Define a polygon, mostly based on GeoJSON's Polygon define.
13///
14/// Excerpt from RFC-9476 section 'Polygon'
15///
16///    -  A linear ring is a closed LineString with four or more positions.
17///    -  The first and last positions are equivalent, and they MUST contain
18///      identical values; their representation SHOULD also be identical.
19///    -  A linear ring is the boundary of a surface or the boundary of a
20///      hole in a surface.
21///    -  A linear ring MUST follow the right-hand rule with respect to the
22///      area it bounds, i.e., exterior rings are counterclockwise, and
23///      holes are clockwise.
24///
25///    Note: the \[GJ2008\] specification did not discuss linear ring winding
26///    order.  For backwards compatibility, parsers SHOULD NOT reject
27///    Polygons that do not follow the right-hand rule.
28///
29///    Though a linear ring is not explicitly represented as a GeoJSON
30///    geometry type, it leads to a canonical formulation of the Polygon
31///    geometry type definition as follows:
32///
33///    -  For type "Polygon", the "coordinates" member MUST be an array of
34///      linear ring coordinate arrays.
35///    -  For Polygons with more than one of these rings, the first MUST be
36///      the exterior ring, and any others MUST be interior rings.  The
37///      exterior ring bounds the surface, and the interior rings (if
38///      present) bound holes within the surface.
39///
40/// \[GJ2008\]: <https://geojson.org/geojson-spec>
41///
42#[allow(clippy::derive_partial_eq_without_eq)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct Polygon {
45    /// define the "exterior ring"
46    #[prost(message, repeated, tag="1")]
47    pub points: ::prost::alloc::vec::Vec<Point>,
48    /// define the "interior rings" as holes
49    #[prost(message, repeated, tag="2")]
50    pub holes: ::prost::alloc::vec::Vec<Polygon>,
51}
52/// Timezone is a timezone's all data.
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct Timezone {
56    #[prost(message, repeated, tag="1")]
57    pub polygons: ::prost::alloc::vec::Vec<Polygon>,
58    #[prost(string, tag="2")]
59    pub name: ::prost::alloc::string::String,
60}
61#[allow(clippy::derive_partial_eq_without_eq)]
62#[derive(Clone, PartialEq, ::prost::Message)]
63pub struct Timezones {
64    #[prost(message, repeated, tag="1")]
65    pub timezones: ::prost::alloc::vec::Vec<Timezone>,
66    /// Reduced data will toggle neighbor search as plan b
67    #[prost(bool, tag="2")]
68    pub reduced: bool,
69    #[prost(string, tag="3")]
70    pub version: ::prost::alloc::string::String,
71}
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct CompressedPolygon {
75    #[prost(bytes="vec", tag="1")]
76    pub points: ::prost::alloc::vec::Vec<u8>,
77    #[prost(message, repeated, tag="2")]
78    pub holes: ::prost::alloc::vec::Vec<CompressedPolygon>,
79}
80/// CompressedTimezonesItem designed for binary file as small as possible.
81#[allow(clippy::derive_partial_eq_without_eq)]
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct CompressedTimezone {
84    #[prost(message, repeated, tag="1")]
85    pub data: ::prost::alloc::vec::Vec<CompressedPolygon>,
86    #[prost(string, tag="2")]
87    pub name: ::prost::alloc::string::String,
88}
89#[allow(clippy::derive_partial_eq_without_eq)]
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct CompressedTimezones {
92    #[prost(enumeration="CompressMethod", tag="1")]
93    pub method: i32,
94    #[prost(message, repeated, tag="2")]
95    pub timezones: ::prost::alloc::vec::Vec<CompressedTimezone>,
96    #[prost(string, tag="3")]
97    pub version: ::prost::alloc::string::String,
98}
99/// PreindexTimezone tile item.
100///
101/// The X/Y/Z are OSM style like map tile index values.
102#[allow(clippy::derive_partial_eq_without_eq)]
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct PreindexTimezone {
105    #[prost(string, tag="1")]
106    pub name: ::prost::alloc::string::String,
107    #[prost(int32, tag="2")]
108    pub x: i32,
109    #[prost(int32, tag="3")]
110    pub y: i32,
111    #[prost(int32, tag="4")]
112    pub z: i32,
113}
114/// PreindexTimezones is all preindex timezone's dumps.
115#[allow(clippy::derive_partial_eq_without_eq)]
116#[derive(Clone, PartialEq, ::prost::Message)]
117pub struct PreindexTimezones {
118    /// which zoom value the tiles generated
119    #[prost(int32, tag="1")]
120    pub idx_zoom: i32,
121    /// which zoom value the tiles merge up with.
122    #[prost(int32, tag="2")]
123    pub agg_zoom: i32,
124    #[prost(message, repeated, tag="3")]
125    pub keys: ::prost::alloc::vec::Vec<PreindexTimezone>,
126    #[prost(string, tag="4")]
127    pub version: ::prost::alloc::string::String,
128}
129#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
130#[repr(i32)]
131pub enum CompressMethod {
132    Unspecified = 0,
133    /// <https://developers.google.com/maps/documentation/utilities/polylinealgorithm>
134    Polyline = 1,
135}
136impl CompressMethod {
137    /// String value of the enum field names used in the ProtoBuf definition.
138    ///
139    /// The values are not transformed in any way and thus are considered stable
140    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
141    pub fn as_str_name(&self) -> &'static str {
142        match self {
143            CompressMethod::Unspecified => "COMPRESS_METHOD_UNSPECIFIED",
144            CompressMethod::Polyline => "COMPRESS_METHOD_POLYLINE",
145        }
146    }
147    /// Creates an enum from field names used in the ProtoBuf definition.
148    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
149        match value {
150            "COMPRESS_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
151            "COMPRESS_METHOD_POLYLINE" => Some(Self::Polyline),
152            _ => None,
153        }
154    }
155}
156// @@protoc_insertion_point(module)