Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
tdelmas authored May 6, 2024
1 parent f221010 commit ed589e7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 26 deletions.
20 changes: 10 additions & 10 deletions src/3.0-RC2/files/geofencing_zones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ file_struct!(GeofencingZonesFile, GeofencingZonesData);

use crate::v3_0_rc2::types::*;

#[cfg(doc)]
use crate::v3_0_rc2::files::station_information;
#[cfg(doc)]
use crate::v3_0_rc2::files::geofencing_zones;
#[cfg(doc)]
use crate::v3_0_rc2::files::station_information;

#[cfg_attr(feature = "napi", napi(object))]
#[cfg_attr(feature = "pyo3", pyclass(get_all, set_all))]
Expand Down Expand Up @@ -71,29 +71,29 @@ pub struct Properties {
#[serde_with::skip_serializing_none]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Geofencing Rule Precedence
///
///
/// Geofencing Rule objects are specified within arrays for the rules and [global_rules](GeofencingZonesData::global_rules) fields of [geofencing_zones] to allow for different restrictions for different vehicle types.
/// When multiple rules in the same array apply to a particular vehicle type, per the semantics of the vehicle_type_ids field, then the earlier rule (in order of the JSON file) takes precedence for that vehicle type.
///
///
/// When multiple overlapping polygons define rules that apply to a particular vehicle type,
/// then the rules from the earlier polygon (in order of the JSON file) takes precedence for that vehicle type in the overlapping area.
/// Polygons with inactive time ranges should be excluded from consideration when considering precedence.
///
///
/// When a polygon and the [global_rules](GeofencingZonesData::global_rules) field define rules that apply to a particular vehicle type, then the rules from the polygon take precedence for that vehicle type in the area of the polygon.
pub struct Rule {
/// Array of IDs of vehicle types for which any restrictions SHOULD be applied.
/// If vehicle type IDs are not specified, then restrictions apply to all vehicle types.
pub vehicle_type_ids: Option<Vec<VehicleTypeID>>,
/// Is the ride allowed to start in this zone?
/// Is the ride allowed to start in this zone?
pub ride_start_allowed: bool,
/// Is the ride allowed to end in this zone?
/// Is the ride allowed to end in this zone?
pub ride_end_allowed: bool,
/// Is the ride allowed to travel through this zone?
/// Is the ride allowed to travel through this zone?
pub ride_through_allowed: bool,
/// What is the maximum speed allowed, in kilometers per hour?
///
///
/// If there is no maximum speed to observe, this can be omitted.
pub maximum_speed_kph: Option<i32>,
/// Can vehicles only be parked at stations defined in [station_information] within this geofence zone?
/// Can vehicles only be parked at stations defined in [station_information] within this geofence zone?
pub station_parking: Option<bool>,
}
2 changes: 1 addition & 1 deletion src/3.0-RC2/files/station_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub struct VehicleTypesCapacity {
/// Vehicles types that may park at the virtual station.
pub vehicle_type_ids: Vec<VehicleTypeID>,
/// If the virtual station is defined by [station_area](Station::station_area), this is the number that can park within the station area.
///
///
/// If [lat](Station::lat)/[lon](Station::lon) is defined, this is the number that can park at those coordinates.
pub count: u32,
}
Expand Down
8 changes: 4 additions & 4 deletions src/3.0-RC2/files/station_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ pub struct Station {
/// Number of disabled dock points at the station.
pub num_docks_disabled: Option<u32>,
/// Is the station currently on the street?
///
///
/// In seasonal systems where equipment is removed during winter, boolean SHOULD be set to `false` during the off season.
/// May also be set to `false` to indicate planned (future) stations which have not yet been installed.
pub is_installed: bool,
/// Is the station currently renting vehicles?
///
///
/// If the station is temporarily taken out of service and not allowing rentals, this field MUST be set to `false`.
///
/// If a station becomes inaccessible to users due to road construction or other factors this field SHOULD be set to `false`.
/// Field SHOULD be set to `false` during hours or days when the system is not offering vehicles for rent.
pub is_renting: bool,
/// Is the station accepting vehicle returns?
///
/// Is the station accepting vehicle returns?
///
/// If the station is temporarily taken out of service and not allowing vehicle returns, this field MUST be set to `false`.
/// If a station becomes inaccessible to users due to road construction or other factors, this field SHOULD be set to `false`.
pub is_returning: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/3.0-RC2/files/system_alerts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct SystemAlert {
pub r#type: String,
/// Indicating when the alert is in effect (for example, when the system or station is actually closed, or when a station is scheduled to be moved).
pub times: Vec<AlertTime>,
/// If this is an alert that affects one or more stations, include their ID(s). Otherwise omit this field.
/// If this is an alert that affects one or more stations, include their ID(s). Otherwise omit this field.
/// If both [station_ids][SystemAlert::station_ids] and [region_ids][SystemAlert::region_ids] are omitted, this alert affects the entire system.
pub station_ids: Option<Vec<StationID>>,
/// If this system has regions, and if this alert only affects certain regions, include their ID(s).
Expand Down
5 changes: 3 additions & 2 deletions src/3.0-RC2/files/system_information.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ pub struct SystemInformationData {
pub termination_date: Option<Date>,
/// This OPTIONAL field SHOULD contain a single voice telephone number for the specified system’s customer service department.
pub phone_number: Option<PhoneNumber>,
pub email: Option<Email>,
/// This OPTIONAL field SHOULD contain a single contact email address actively monitored by the operator’s customer service department.
/// This email address SHOULD be a direct contact point where riders can reach a customer service representative.
pub feed_contact_email: Option<Email>,
pub email: Option<Email>,
/// This field MUST contain a single contact email for feed consumers to report issues with the feed.
/// This email address SHOULD point to a stable email address, that does not correspond to an individual but rather the team or company that manages GBFS feeds.
pub feed_contact_email: Option<Email>,
// REQUIRED if the producer publishes datasets for more than one system geography, for example Berlin and Paris. A fully qualified URL pointing to the manifest.json file for the publisher.
pub manifest_url: Option<ManifestFileUrl>,
/// The time zone where the system is located.
pub timezone: Option<Timezone>,
Expand Down
8 changes: 4 additions & 4 deletions src/3.0-RC2/files/system_pricing_plans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ pub struct SystemPricingPlan {
pub url: Option<URL>,
/// Name of this pricing plan.
pub name: Option<Vec<LocalizedString>>,
/// Currency used to pay the fare.
/// Currency used to pay the fare.
pub currency: Currency,
/// Fare price, in the unit specified by currency.
///
///
/// In case of non-rate price, this field is the total price.
/// In case of rate price, this field is the base price that is charged only once per trip (typically the price for unlocking) in addition to per_km_pricing and/or per_min_pricing.
pub price: Option<NonNegativeFloat>,
Expand Down Expand Up @@ -69,11 +69,11 @@ pub struct PricingRate {
/// Can be a negative number, which indicates that the traveler will receive a discount.
pub rate: f64,
/// Interval at which the rate of this segment is either reapplied indefinitely, or if defined, up until (but not including) `end` unit.
///
///
/// An interval of 0 indicates the rate is only charged once.
pub interval: NonNegativeFloat,
/// The unit at which the rate will no longer apply (exclusive) for example, if end is `20` the rate no longer applies at `20.00`.
///
///
/// If this field is empty, the price issued for this segment is charged until the trip ends, in addition to the cost of any subsequent segments.
pub end: Option<i32>,
}
8 changes: 4 additions & 4 deletions src/3.0-RC2/files/vehicle_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ pub struct Vehicle {
pub lat: Option<Latitude>,
/// Longitude of the vehicle in decimal degrees.
pub lon: Option<Longitude>,
/// Is the vehicle currently reserved?
/// Is the vehicle currently reserved?
pub is_reserved: bool,
/// Is the vehicle currently disabled?
/// Is the vehicle currently disabled?
pub is_disabled: bool,
/// Rental URIs for Android, iOS, and web
pub rental_uris: Option<RentalUris>,
Expand All @@ -52,7 +52,7 @@ pub struct Vehicle {
/// The [Station](crate::v3_0_rc2::files::station_information::Station) where this vehicle must be returned to.
pub home_station_id: Option<StationID>,
/// The [PricingPlan](crate::v3_0_rc2::files::system_pricing_plans::SystemPricingPlan) this vehicle is eligible for.
///
///
/// If this field is defined it supersedes [default_pricing_plan_id](crate::v3_0_rc2::files::system_information::SystemInformation::default_pricing_plan_id).
pub pricing_plan_id: Option<PricingPlanID>,
/// List of vehicle equipment provided by the operator in addition to the accessories already provided in the vehicle (field vehicle_accessories of vehicle_types.json) but subject to more frequent updates.
Expand All @@ -72,6 +72,6 @@ pub struct RentalUris {
pub android: Option<URI>,
/// URI that can be used on iOS to launch the rental app for this vehicle.
pub ios: Option<URI>,
/// URL that can be used by a web browser to show more information about renting a vehicle at this vehicle.
/// URL that can be used by a web browser to show more information about renting a vehicle at this vehicle.
pub web: Option<URL>,
}

0 comments on commit ed589e7

Please sign in to comment.