-
Notifications
You must be signed in to change notification settings - Fork 1
/
feed_geofencing_zones.go
58 lines (54 loc) · 2.23 KB
/
feed_geofencing_zones.go
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
package gbfs
type (
// FeedGeofencingZones ...
FeedGeofencingZones struct {
FeedCommon
Data *FeedGeofencingZonesData `json:"data"`
}
// FeedGeofencingZonesData ...
FeedGeofencingZonesData struct {
GeofencingZones *FeedGeofencingZonesGeoJSONFeatureCollection `json:"geofencing_zones"`
}
// FeedGeofencingZonesGeoJSONFeatureCollection ...
FeedGeofencingZonesGeoJSONFeatureCollection struct {
GeoJSONFeatureCollection
Features []*FeedGeofencingZonesGeoJSONFeature `json:"features"`
}
// FeedGeofencingZonesGeoJSONFeature ...
FeedGeofencingZonesGeoJSONFeature struct {
GeoJSONFeature
Properties *FeedGeofencingZonesGeoJSONFeatureProperties `json:"properties"`
}
// FeedGeofencingZonesGeoJSONFeatureProperties ...
FeedGeofencingZonesGeoJSONFeatureProperties struct {
Name *string `json:"name,omitempty"`
Start *Timestamp `json:"start,omitempty"`
End *Timestamp `json:"end,omitempty"`
Rules []*FeedGeofencingZonesGeoJSONFeaturePropertiesRule `json:"rules,omitempty"`
}
// FeedGeofencingZonesGeoJSONFeaturePropertiesRule ...
FeedGeofencingZonesGeoJSONFeaturePropertiesRule struct {
VehicleTypeIDs []*ID `json:"vehicle_type_ids,omitempty"`
RideAllowed *Boolean `json:"ride_allowed"`
RideThroughAllowed *Boolean `json:"ride_through_allowed"`
MaximumSpeedKph *int64 `json:"maximum_speed_kph,omitempty"`
}
)
// Name ...
func (f *FeedGeofencingZones) Name() string {
return FeedNameGeofencingZones
}
// NewFeedGeofencingZonesGeoJSONFeature ...
func NewFeedGeofencingZonesGeoJSONFeature(geometry *GeoJSONGeometry, properties *FeedGeofencingZonesGeoJSONFeatureProperties) *FeedGeofencingZonesGeoJSONFeature {
return &FeedGeofencingZonesGeoJSONFeature{
GeoJSONFeature: *NewGeoJSONFeature(geometry, nil),
Properties: properties,
}
}
// NewFeedGeofencingZonesGeoJSONFeatureCollection ...
func NewFeedGeofencingZonesGeoJSONFeatureCollection(features []*FeedGeofencingZonesGeoJSONFeature) *FeedGeofencingZonesGeoJSONFeatureCollection {
return &FeedGeofencingZonesGeoJSONFeatureCollection{
GeoJSONFeatureCollection: *NewGeoJSONFeatureCollection(nil),
Features: features,
}
}