motis-openapi-sdk-5.0.0/.cargo_vcs_info.json0000644000000001570000000000100144040ustar { "git": { "sha1": "ea164ca973051314a15d8dbb06235ea8b9f439b0" }, "path_in_vcs": "motis-openapi-sdk" }motis-openapi-sdk-5.0.0/.gitignore000064400000000000000000000000371046102023000151610ustar 00000000000000/target/ **/*.rs.bk Cargo.lock motis-openapi-sdk-5.0.0/.openapi-generator/FILES000064400000000000000000000053171046102023000174610ustar 00000000000000.gitignore .travis.yml Cargo.toml README.md docs/Alert.md docs/AlertCause.md docs/AlertEffect.md docs/AlertSeverityLevel.md docs/Area.md docs/DebugApi.md docs/Direction.md docs/Duration.md docs/ElevationCosts.md docs/EncodedPolyline.md docs/Error.md docs/FareMedia.md docs/FareMediaType.md docs/FareProduct.md docs/FareTransfer.md docs/FareTransferRule.md docs/GeocodeApi.md docs/Initial200Response.md docs/Itinerary.md docs/Leg.md docs/LocationType.md docs/MapApi.md docs/Match.md docs/Mode.md docs/PedestrianProfile.md docs/PickupDropoffType.md docs/Place.md docs/Plan200Response.md docs/Reachable.md docs/ReachablePlace.md docs/Rental.md docs/RentalFormFactor.md docs/RentalPropulsionType.md docs/RentalProvider.md docs/RentalProviderGroup.md docs/RentalReturnConstraint.md docs/RentalStation.md docs/RentalVehicle.md docs/RentalVehicleType.md docs/RentalZone.md docs/RentalZoneRestrictions.md docs/Rentals200Response.md docs/RiderCategory.md docs/RoutingApi.md docs/StepInstruction.md docs/StopTime.md docs/Stoptimes200Response.md docs/TimeRange.md docs/TimetableApi.md docs/Transfer.md docs/Transfers200Response.md docs/TripInfo.md docs/TripSegment.md docs/VertexType.md git_push.sh src/apis/configuration.rs src/apis/debug_api.rs src/apis/geocode_api.rs src/apis/map_api.rs src/apis/mod.rs src/apis/routing_api.rs src/apis/timetable_api.rs src/lib.rs src/models/alert.rs src/models/alert_cause.rs src/models/alert_effect.rs src/models/alert_severity_level.rs src/models/area.rs src/models/direction.rs src/models/duration.rs src/models/elevation_costs.rs src/models/encoded_polyline.rs src/models/error.rs src/models/fare_media.rs src/models/fare_media_type.rs src/models/fare_product.rs src/models/fare_transfer.rs src/models/fare_transfer_rule.rs src/models/initial_200_response.rs src/models/itinerary.rs src/models/leg.rs src/models/location_type.rs src/models/mod.rs src/models/mode.rs src/models/model_match.rs src/models/pedestrian_profile.rs src/models/pickup_dropoff_type.rs src/models/place.rs src/models/plan_200_response.rs src/models/reachable.rs src/models/reachable_place.rs src/models/rental.rs src/models/rental_form_factor.rs src/models/rental_propulsion_type.rs src/models/rental_provider.rs src/models/rental_provider_group.rs src/models/rental_return_constraint.rs src/models/rental_station.rs src/models/rental_vehicle.rs src/models/rental_vehicle_type.rs src/models/rental_zone.rs src/models/rental_zone_restrictions.rs src/models/rentals_200_response.rs src/models/rider_category.rs src/models/step_instruction.rs src/models/stop_time.rs src/models/stoptimes_200_response.rs src/models/time_range.rs src/models/transfer.rs src/models/transfers_200_response.rs src/models/trip_info.rs src/models/trip_segment.rs src/models/vertex_type.rs motis-openapi-sdk-5.0.0/.openapi-generator/VERSION000064400000000000000000000000071046102023000177330ustar 000000000000007.15.0 motis-openapi-sdk-5.0.0/.openapi-generator-ignore000064400000000000000000000020201046102023000200640ustar 00000000000000# OpenAPI Generator Ignore # Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): #foo/*/qux # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux # You can recursively match patterns against a directory, file or extension with a double asterisk (**): #foo/**/qux # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux # You can also negate patterns with an exclamation (!). # For example, you can ignore all files in a docs folder with the file extension .md: #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md motis-openapi-sdk-5.0.0/.travis.yml000064400000000000000000000000171046102023000153000ustar 00000000000000language: rust motis-openapi-sdk-5.0.0/Cargo.lock0000644000000647570000000000100123770ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "atomic-waker" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "base64" version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bumpalo" version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "cfg-if" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "displaydoc" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] [[package]] name = "futures-channel" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", ] [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-task" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", "futures-task", "pin-project-lite", "pin-utils", ] [[package]] name = "http" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", "itoa", ] [[package]] name = "http-body" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", ] [[package]] name = "http-body-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", "http", "http-body", "pin-project-lite", ] [[package]] name = "httparse" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", "http", "http-body", "httparse", "itoa", "pin-project-lite", "pin-utils", "smallvec", "tokio", "want", ] [[package]] name = "hyper-util" version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "http", "http-body", "hyper", "libc", "pin-project-lite", "socket2", "tokio", "tower-service", "tracing", ] [[package]] name = "icu_collections" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] name = "icu_locale_core" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", "tinystr", "writeable", "zerovec", ] [[package]] name = "icu_normalizer" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", "zerovec", ] [[package]] name = "icu_normalizer_data" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e93fcd3157766c0c8da2f8cff6ce651a31f0810eaa1c51ec363ef790bbb5fb99" dependencies = [ "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02845b3647bb045f1100ecd6480ff52f34c35f82d9880e029d329c21d1054899" [[package]] name = "icu_provider" version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", "writeable", "yoke", "zerofrom", "zerotrie", "zerovec", ] [[package]] name = "idna" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", "utf8_iter", ] [[package]] name = "idna_adapter" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", ] [[package]] name = "ipnet" version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "js-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", ] [[package]] name = "libc" version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "litemap" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "log" version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "memchr" version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", ] [[package]] name = "mio" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" dependencies = [ "libc", "wasi", "windows-sys 0.61.2", ] [[package]] name = "motis-openapi-sdk" version = "5.0.0" dependencies = [ "reqwest", "serde", "serde_json", "serde_repr", "url", ] [[package]] name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "percent-encoding" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "potential_utf" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] [[package]] name = "proc-macro2" version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] name = "reqwest" version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64", "bytes", "futures-core", "futures-util", "http", "http-body", "http-body-util", "hyper", "hyper-util", "ipnet", "js-sys", "log", "mime", "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "windows-registry", ] [[package]] name = "rustversion" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "serde" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", ] [[package]] name = "serde_core" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" dependencies = [ "itoa", "memchr", "ryu", "serde", ] [[package]] name = "serde_repr" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_urlencoded" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", "itoa", "ryu", "serde", ] [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ "libc", "windows-sys 0.60.2", ] [[package]] name = "stable_deref_trait" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "syn" version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "sync_wrapper" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ "futures-core", ] [[package]] name = "synstructure" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "tinystr" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", ] [[package]] name = "tokio" version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ "libc", "mio", "pin-project-lite", "socket2", "windows-sys 0.61.2", ] [[package]] name = "tower" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", "sync_wrapper", "tokio", "tower-layer", "tower-service", ] [[package]] name = "tower-layer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", ] [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicase" version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "url" version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", ] [[package]] name = "utf8_iter" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "want" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ "try-lock", ] [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasm-bindgen" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-registry" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", "windows-targets 0.52.6", ] [[package]] name = "windows-result" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ "windows-targets 0.52.6", ] [[package]] name = "windows-strings" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ "windows-result", "windows-targets 0.52.6", ] [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ "windows-targets 0.53.5", ] [[package]] name = "windows-sys" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ "windows-link", ] [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows-targets" version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", "windows_i686_gnullvm 0.53.1", "windows_i686_msvc 0.53.1", "windows_x86_64_gnu 0.53.1", "windows_x86_64_gnullvm 0.53.1", "windows_x86_64_msvc 0.53.1", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "writeable" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "yoke" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ "stable_deref_trait", "yoke-derive", "zerofrom", ] [[package]] name = "yoke-derive" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerofrom" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", "syn", "synstructure", ] [[package]] name = "zerotrie" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", "zerofrom", ] [[package]] name = "zerovec" version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", "zerovec-derive", ] [[package]] name = "zerovec-derive" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", "syn", ] motis-openapi-sdk-5.0.0/Cargo.toml0000644000000022340000000000100124000ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "motis-openapi-sdk" version = "5.0.0" authors = ["Julian Schmidhuber "] build = false autolib = false autobins = false autoexamples = false autotests = false autobenches = false description = "Automatically generated code for the Motis OpenAPI description." readme = "README.md" license = "MIT" [lib] name = "motis_openapi_sdk" path = "src/lib.rs" [dependencies.reqwest] version = "^0.12" features = [ "json", "multipart", ] default-features = false [dependencies.serde] version = "^1.0" features = ["derive"] [dependencies.serde_json] version = "^1.0" [dependencies.serde_repr] version = "^0.1" [dependencies.url] version = "^2.5" motis-openapi-sdk-5.0.0/Cargo.toml.orig000064400000000000000000000007001046102023000160550ustar 00000000000000[package] name = "motis-openapi-sdk" version = "5.0.0" authors = ["Julian Schmidhuber "] description = "Automatically generated code for the Motis OpenAPI description." license = "MIT" edition = "2021" [dependencies] serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } motis-openapi-sdk-5.0.0/README.md000064400000000000000000000145111046102023000144520ustar 00000000000000# Rust API client for motis-openapi-sdk This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: v5 - Package version: v5 - Generator version: 7.15.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation Put the package under your project folder in a directory named `motis-openapi-sdk` and add the following to `Cargo.toml` under `[dependencies]`: ``` motis-openapi-sdk = { path = "./motis-openapi-sdk" } ``` ## Documentation for API Endpoints All URIs are relative to *https://api.transitous.org* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *DebugApi* | [**transfers**](docs/DebugApi.md#transfers) | **GET** /api/debug/transfers | Prints all transfers of a timetable location (track, bus stop, etc.) *GeocodeApi* | [**geocode**](docs/GeocodeApi.md#geocode) | **GET** /api/v1/geocode | Autocompletion & geocoding that resolves user input addresses including coordinates *GeocodeApi* | [**reverse_geocode**](docs/GeocodeApi.md#reverse_geocode) | **GET** /api/v1/reverse-geocode | Translate coordinates to the closest address(es)/places/stops. *MapApi* | [**initial**](docs/MapApi.md#initial) | **GET** /api/v1/map/initial | initial location to view the map at after loading based on where public transport should be visible *MapApi* | [**levels**](docs/MapApi.md#levels) | **GET** /api/v1/map/levels | Get all available levels for a map section *MapApi* | [**rentals**](docs/MapApi.md#rentals) | **GET** /api/v1/rentals | Get a list of rental providers or all rental stations and vehicles for a map section or provider *MapApi* | [**stops**](docs/MapApi.md#stops) | **GET** /api/v1/map/stops | Get all stops for a map section *MapApi* | [**trips**](docs/MapApi.md#trips) | **GET** /api/v5/map/trips | Given a area frame (box defined by top right and bottom left corner) and a time frame, it returns all trips and their respective shapes that operate in this area + time frame. Trips are filtered by zoom level. On low zoom levels, only long distance trains will be shown while on high zoom levels, also metros, buses and trams will be returned. *RoutingApi* | [**one_to_all**](docs/RoutingApi.md#one_to_all) | **GET** /api/v1/one-to-all | Computes all reachable locations from a given stop within a set duration. Each result entry will contain the fastest travel duration and the number of connections used. *RoutingApi* | [**one_to_many**](docs/RoutingApi.md#one_to_many) | **GET** /api/v1/one-to-many | Street routing from one to many places or many to one. The order in the response array corresponds to the order of coordinates of the \\`many\\` parameter in the query. *RoutingApi* | [**plan**](docs/RoutingApi.md#plan) | **GET** /api/v5/plan | Computes optimal connections from one place to another. *TimetableApi* | [**stoptimes**](docs/TimetableApi.md#stoptimes) | **GET** /api/v5/stoptimes | Get the next N departures or arrivals of a stop sorted by time *TimetableApi* | [**trip**](docs/TimetableApi.md#trip) | **GET** /api/v5/trip | Get a trip as itinerary ## Documentation For Models - [Alert](docs/Alert.md) - [AlertCause](docs/AlertCause.md) - [AlertEffect](docs/AlertEffect.md) - [AlertSeverityLevel](docs/AlertSeverityLevel.md) - [Area](docs/Area.md) - [Direction](docs/Direction.md) - [Duration](docs/Duration.md) - [ElevationCosts](docs/ElevationCosts.md) - [EncodedPolyline](docs/EncodedPolyline.md) - [Error](docs/Error.md) - [FareMedia](docs/FareMedia.md) - [FareMediaType](docs/FareMediaType.md) - [FareProduct](docs/FareProduct.md) - [FareTransfer](docs/FareTransfer.md) - [FareTransferRule](docs/FareTransferRule.md) - [Initial200Response](docs/Initial200Response.md) - [Itinerary](docs/Itinerary.md) - [Leg](docs/Leg.md) - [LocationType](docs/LocationType.md) - [Match](docs/Match.md) - [Mode](docs/Mode.md) - [PedestrianProfile](docs/PedestrianProfile.md) - [PickupDropoffType](docs/PickupDropoffType.md) - [Place](docs/Place.md) - [Plan200Response](docs/Plan200Response.md) - [Reachable](docs/Reachable.md) - [ReachablePlace](docs/ReachablePlace.md) - [Rental](docs/Rental.md) - [RentalFormFactor](docs/RentalFormFactor.md) - [RentalPropulsionType](docs/RentalPropulsionType.md) - [RentalProvider](docs/RentalProvider.md) - [RentalProviderGroup](docs/RentalProviderGroup.md) - [RentalReturnConstraint](docs/RentalReturnConstraint.md) - [RentalStation](docs/RentalStation.md) - [RentalVehicle](docs/RentalVehicle.md) - [RentalVehicleType](docs/RentalVehicleType.md) - [RentalZone](docs/RentalZone.md) - [RentalZoneRestrictions](docs/RentalZoneRestrictions.md) - [Rentals200Response](docs/Rentals200Response.md) - [RiderCategory](docs/RiderCategory.md) - [StepInstruction](docs/StepInstruction.md) - [StopTime](docs/StopTime.md) - [Stoptimes200Response](docs/Stoptimes200Response.md) - [TimeRange](docs/TimeRange.md) - [Transfer](docs/Transfer.md) - [Transfers200Response](docs/Transfers200Response.md) - [TripInfo](docs/TripInfo.md) - [TripSegment](docs/TripSegment.md) - [VertexType](docs/VertexType.md) To get access to the crate's generated documentation, use: ``` cargo doc --open ``` ## Author felix@triptix.tech motis-openapi-sdk-5.0.0/docs/AbsoluteDirection.md000064400000000000000000000006311046102023000200620ustar 00000000000000# AbsoluteDirection ## Enum Variants | Name | Value | |---- | -----| | North | NORTH | | Northeast | NORTHEAST | | East | EAST | | Southeast | SOUTHEAST | | South | SOUTH | | Southwest | SOUTHWEST | | West | WEST | | Northwest | NORTHWEST | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Alert.md000064400000000000000000000061061046102023000155150ustar 00000000000000# Alert ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **communication_period** | Option<[**Vec**](TimeRange.md)> | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. | [optional] **impact_period** | Option<[**Vec**](TimeRange.md)> | Time when the services are affected by the disruption mentioned in the alert. | [optional] **cause** | Option<[**models::AlertCause**](AlertCause.md)> | | [optional] **cause_detail** | Option<**String**> | Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. | [optional] **effect** | Option<[**models::AlertEffect**](AlertEffect.md)> | | [optional] **effect_detail** | Option<**String**> | Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. | [optional] **url** | Option<**String**> | The URL which provides additional information about the alert. | [optional] **header_text** | **String** | Header for the alert. This plain-text string will be highlighted, for example in boldface. | **description_text** | **String** | Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit \"expand\" request by the user). The information in the description should add to the information of the header. | **tts_header_text** | Option<**String**> | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as headerText but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | [optional] **tts_description_text** | Option<**String**> | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) | [optional] **severity_level** | Option<[**models::AlertSeverityLevel**](AlertSeverityLevel.md)> | Severity of the alert. | [optional] **image_url** | Option<**String**> | String containing an URL linking to an image. | [optional] **image_media_type** | Option<**String**> | IANA media type as to specify the type of image to be displayed. The type must start with \"image/\" | [optional] **image_alternative_text** | Option<**String**> | Text describing the appearance of the linked image in the image field (e.g., in case the image can't be displayed or the user can't see the image for accessibility reasons). See the HTML spec for alt image text. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/AlertCause.md000064400000000000000000000011231046102023000164700ustar 00000000000000# AlertCause ## Enum Variants | Name | Value | |---- | -----| | UnknownCause | UNKNOWN_CAUSE | | OtherCause | OTHER_CAUSE | | TechnicalProblem | TECHNICAL_PROBLEM | | Strike | STRIKE | | Demonstration | DEMONSTRATION | | Accident | ACCIDENT | | Holiday | HOLIDAY | | Weather | WEATHER | | Maintenance | MAINTENANCE | | Construction | CONSTRUCTION | | PoliceActivity | POLICE_ACTIVITY | | MedicalEmergency | MEDICAL_EMERGENCY | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/AlertEffect.md000064400000000000000000000011331046102023000166250ustar 00000000000000# AlertEffect ## Enum Variants | Name | Value | |---- | -----| | NoService | NO_SERVICE | | ReducedService | REDUCED_SERVICE | | SignificantDelays | SIGNIFICANT_DELAYS | | Detour | DETOUR | | AdditionalService | ADDITIONAL_SERVICE | | ModifiedService | MODIFIED_SERVICE | | OtherEffect | OTHER_EFFECT | | UnknownEffect | UNKNOWN_EFFECT | | StopMoved | STOP_MOVED | | NoEffect | NO_EFFECT | | AccessibilityIssue | ACCESSIBILITY_ISSUE | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/AlertSeverityLevel.md000064400000000000000000000005171046102023000202400ustar 00000000000000# AlertSeverityLevel ## Enum Variants | Name | Value | |---- | -----| | UnknownSeverity | UNKNOWN_SEVERITY | | Info | INFO | | Warning | WARNING | | Severe | SEVERE | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Area.md000064400000000000000000000015541046102023000153200ustar 00000000000000# Area ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | Name of the area | **admin_level** | **f64** | [OpenStreetMap `admin_level`](https://wiki.openstreetmap.org/wiki/Key:admin_level) of the area | **matched** | **bool** | Whether this area was matched by the input text | **unique** | Option<**bool**> | Set for the first area after the `default` area that distinguishes areas if the match is ambiguous regarding (`default` area + place name / street [+ house number]). | [optional] **default** | Option<**bool**> | Whether this area should be displayed as default area (area with admin level closest 7) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/DebugApi.md000064400000000000000000000017641046102023000161330ustar 00000000000000# \DebugApi All URIs are relative to *https://api.transitous.org* Method | HTTP request | Description ------------- | ------------- | ------------- [**transfers**](DebugApi.md#transfers) | **GET** /api/debug/transfers | Prints all transfers of a timetable location (track, bus stop, etc.) ## transfers > models::Transfers200Response transfers(id) Prints all transfers of a timetable location (track, bus stop, etc.) ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | location id | [required] | ### Return type [**models::Transfers200Response**](transfers_200_response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Direction.md000064400000000000000000000011531046102023000163630ustar 00000000000000# Direction ## Enum Variants | Name | Value | |---- | -----| | Depart | DEPART | | HardLeft | HARD_LEFT | | Left | LEFT | | SlightlyLeft | SLIGHTLY_LEFT | | Continue | CONTINUE | | SlightlyRight | SLIGHTLY_RIGHT | | Right | RIGHT | | HardRight | HARD_RIGHT | | CircleClockwise | CIRCLE_CLOCKWISE | | CircleCounterclockwise | CIRCLE_COUNTERCLOCKWISE | | Stairs | STAIRS | | Elevator | ELEVATOR | | UturnLeft | UTURN_LEFT | | UturnRight | UTURN_RIGHT | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Duration.md000064400000000000000000000006101046102023000162250ustar 00000000000000# Duration ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **duration** | Option<**f64**> | duration in seconds if a path was found, otherwise missing | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/ElevationCosts.md000064400000000000000000000004301046102023000174020ustar 00000000000000# ElevationCosts ## Enum Variants | Name | Value | |---- | -----| | None | NONE | | Low | LOW | | High | HIGH | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/EncodedPolyline.md000064400000000000000000000012061046102023000175170ustar 00000000000000# EncodedPolyline ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **points** | **String** | The encoded points of the polyline using the Google polyline encoding. | **precision** | **i32** | The precision of the returned polyline (7 for /v1, 6 for /v2) Be aware that with precision 7, coordinates with |longitude| > 107.37 are undefined/will overflow. | **length** | **i32** | The number of points in the string | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Error.md000064400000000000000000000005131046102023000155330ustar 00000000000000# Error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **error** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/FareMedia.md000064400000000000000000000007751046102023000162710ustar 00000000000000# FareMedia ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **fare_media_name** | Option<**String**> | Name of the fare media. Required for transit cards and mobile apps. | [optional] **fare_media_type** | [**models::FareMediaType**](FareMediaType.md) | The type of fare media. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/FareMediaType.md000064400000000000000000000005671046102023000171320ustar 00000000000000# FareMediaType ## Enum Variants | Name | Value | |---- | -----| | None | NONE | | PaperTicket | PAPER_TICKET | | TransitCard | TRANSIT_CARD | | ContactlessEmv | CONTACTLESS_EMV | | MobileApp | MOBILE_APP | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/FareProduct.md000064400000000000000000000014331046102023000166620ustar 00000000000000# FareProduct ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | The name of the fare product as displayed to riders. | **amount** | **f64** | The cost of the fare product. May be negative to represent transfer discounts. May be zero to represent a fare product that is free. | **currency** | **String** | ISO 4217 currency code. The currency of the cost of the fare product. | **rider_category** | Option<[**models::RiderCategory**](RiderCategory.md)> | | [optional] **media** | Option<[**models::FareMedia**](FareMedia.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/FareTransfer.md000064400000000000000000000021431046102023000170250ustar 00000000000000# FareTransfer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rule** | Option<[**models::FareTransferRule**](FareTransferRule.md)> | | [optional] **transfer_products** | Option<[**Vec**](FareProduct.md)> | | [optional] **effective_fare_leg_products** | [**Vec>>**](Vec.md) | Lists all valid fare products for the effective fare legs. This is an `array>` where the inner array lists all possible fare products that would cover this effective fare leg. Each \"effective fare leg\" can have multiple options for adult/child/weekly/monthly/day/one-way tickets etc. You can see the outer array as AND (you need one ticket for each effective fare leg (`A_AB_B`), the first effective fare leg (`A_AB`) or no fare leg at all but only the transfer product (`AB`) and the inner array as OR (you can choose which ticket to buy) | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/FareTransferRule.md000064400000000000000000000004311046102023000176530ustar 00000000000000# FareTransferRule ## Enum Variants | Name | Value | |---- | -----| | AAb | A_AB | | AAbB | A_AB_B | | Ab | AB | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Footpath.md000064400000000000000000000022001046102023000162210ustar 00000000000000# Footpath ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to** | [**models::Place**](Place.md) | | **default** | Option<**f64**> | optional; missing if the GTFS did not contain a footpath footpath duration in minutes according to GTFS (+heuristics) | [optional] **foot** | Option<**f64**> | optional; missing if no path was found (timetable / osr) footpath duration in minutes for the foot profile | [optional] **foot_routed** | Option<**f64**> | optional; missing if no path was found with foot routing footpath duration in minutes for the foot profile | [optional] **wheelchair** | Option<**f64**> | optional; missing if no path was found with the wheelchair profile footpath duration in minutes for the wheelchair profile | [optional] **wheelchair_uses_elevator** | Option<**bool**> | optional; missing if no path was found with the wheelchair profile true if the wheelchair path uses an elevator | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Footpaths200Response.md000064400000000000000000000007011046102023000203510ustar 00000000000000# Footpaths200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **place** | [**models::Place**](Place.md) | | **footpaths** | [**Vec**](Footpath.md) | all outgoing footpaths of this location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/GeocodeApi.md000064400000000000000000000053431046102023000164470ustar 00000000000000# \GeocodeApi All URIs are relative to *https://api.transitous.org* Method | HTTP request | Description ------------- | ------------- | ------------- [**geocode**](GeocodeApi.md#geocode) | **GET** /api/v1/geocode | Autocompletion & geocoding that resolves user input addresses including coordinates [**reverse_geocode**](GeocodeApi.md#reverse_geocode) | **GET** /api/v1/reverse-geocode | Translate coordinates to the closest address(es)/places/stops. ## geocode > Vec geocode(text, language, r#type, place, place_bias) Autocompletion & geocoding that resolves user input addresses including coordinates ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **text** | **String** | the (potentially partially typed) address to resolve | [required] | **language** | Option<[**Vec**](String.md)> | language tags as used in OpenStreetMap (usually ISO 639-1, or ISO 639-2 if there's no ISO 639-1) | | **r#type** | Option<[**LocationType**](.md)> | Optional. Default is all types. Only return results of the given types. For example, this can be used to allow only `ADDRESS` and `STOP` results. | | **place** | Option<**String**> | Optional. Used for biasing results towards the coordinate. Format: latitude,longitude in degrees | | **place_bias** | Option<**f64**> | Optional. Used for biasing results towards the coordinate. Higher number = higher bias. | |[default to 1] ### Return type [**Vec**](Match.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## reverse_geocode > Vec reverse_geocode(place, r#type) Translate coordinates to the closest address(es)/places/stops. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **place** | **String** | latitude, longitude in degrees | [required] | **r#type** | Option<[**LocationType**](.md)> | Optional. Default is all types. Only return results of the given type. For example, this can be used to allow only `ADDRESS` and `STOP` results. | | ### Return type [**Vec**](Match.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Initial200Response.md000064400000000000000000000006151046102023000177770ustar 00000000000000# Initial200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **lat** | **f64** | latitude | **lon** | **f64** | longitude | **zoom** | **f64** | zoom level | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Itinerary.md000064400000000000000000000012621046102023000164120ustar 00000000000000# Itinerary ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **duration** | **i32** | journey duration in seconds | **start_time** | **String** | journey departure time | **end_time** | **String** | journey arrival time | **transfers** | **i32** | The number of transfers this trip has. | **legs** | [**Vec**](Leg.md) | Journey legs | **fare_transfers** | Option<[**Vec**](FareTransfer.md)> | Fare information | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Leg.md000064400000000000000000000100401046102023000151450ustar 00000000000000# Leg ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mode** | [**models::Mode**](Mode.md) | Transport mode for this leg | **from** | [**models::Place**](Place.md) | | **to** | [**models::Place**](Place.md) | | **duration** | **i32** | Leg duration in seconds If leg is footpath: The footpath duration is derived from the default footpath duration using the query parameters `transferTimeFactor` and `additionalTransferTime` as follows: `leg.duration = defaultDuration * transferTimeFactor + additionalTransferTime.` In case the defaultDuration is needed, it can be calculated by `defaultDuration = (leg.duration - additionalTransferTime) / transferTimeFactor`. Note that the default values are `transferTimeFactor = 1` and `additionalTransferTime = 0` in case they are not explicitly provided in the query. | **start_time** | **String** | leg departure time | **end_time** | **String** | leg arrival time | **scheduled_start_time** | **String** | scheduled leg departure time | **scheduled_end_time** | **String** | scheduled leg arrival time | **real_time** | **bool** | Whether there is real-time data about this leg | **scheduled** | **bool** | Whether this leg was originally scheduled to run or is an additional service. Scheduled times will equal realtime times in this case. | **distance** | Option<**f64**> | For non-transit legs the distance traveled while traversing this leg in meters. | [optional] **interline_with_previous_leg** | Option<**bool**> | For transit legs, if the rider should stay on the vehicle as it changes route names. | [optional] **headsign** | Option<**String**> | For transit legs, the headsign of the bus or train being used. For non-transit legs, null | [optional] **trip_to** | Option<[**models::Place**](Place.md)> | final stop of this trip (can differ from headsign) | [optional] **route_color** | Option<**String**> | | [optional] **route_text_color** | Option<**String**> | | [optional] **route_type** | Option<**i32**> | | [optional] **agency_name** | Option<**String**> | | [optional] **agency_url** | Option<**String**> | | [optional] **agency_id** | Option<**String**> | | [optional] **trip_id** | Option<**String**> | | [optional] **route_short_name** | Option<**String**> | | [optional] **route_long_name** | Option<**String**> | | [optional] **trip_short_name** | Option<**String**> | | [optional] **display_name** | Option<**String**> | | [optional] **cancelled** | Option<**bool**> | Whether this trip is cancelled | [optional] **source** | Option<**String**> | Filename and line number where this trip is from | [optional] **intermediate_stops** | Option<[**Vec**](Place.md)> | For transit legs, intermediate stops between the Place where the leg originates and the Place where the leg ends. For non-transit legs, null. | [optional] **leg_geometry** | [**models::EncodedPolyline**](EncodedPolyline.md) | | **steps** | Option<[**Vec**](StepInstruction.md)> | A series of turn by turn instructions used for walking, biking and driving. | [optional] **rental** | Option<[**models::Rental**](Rental.md)> | | [optional] **fare_transfer_index** | Option<**i32**> | Index into `Itinerary.fareTransfers` array to identify which fare transfer this leg belongs to | [optional] **effective_fare_leg_index** | Option<**i32**> | Index into the `Itinerary.fareTransfers[fareTransferIndex].effectiveFareLegProducts` array to identify which effective fare leg this itinerary leg belongs to | [optional] **alerts** | Option<[**Vec**](Alert.md)> | Alerts for this stop. | [optional] **looped_calendar_since** | Option<**String**> | If set, this attribute indicates that this trip has been expanded beyond the feed end date (enabled by config flag `timetable.dataset.extend_calendar`) by looping active weekdays, e.g. from calendar.txt in GTFS. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/LevelEncodedPolyline.md000064400000000000000000000011531046102023000205100ustar 00000000000000# LevelEncodedPolyline ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from_level** | **f64** | level where this segment starts, based on OpenStreetMap data | **to_level** | **f64** | level where this segment starts, based on OpenStreetMap data | **osm_way** | Option<**i32**> | OpenStreetMap way index | [optional] **polyline** | [**models::EncodedPolyline**](EncodedPolyline.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/LocationType.md000064400000000000000000000004401046102023000170530ustar 00000000000000# LocationType ## Enum Variants | Name | Value | |---- | -----| | Address | ADDRESS | | Place | PLACE | | Stop | STOP | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/MapApi.md000064400000000000000000000163031046102023000156150ustar 00000000000000# \MapApi All URIs are relative to *https://api.transitous.org* Method | HTTP request | Description ------------- | ------------- | ------------- [**initial**](MapApi.md#initial) | **GET** /api/v1/map/initial | initial location to view the map at after loading based on where public transport should be visible [**levels**](MapApi.md#levels) | **GET** /api/v1/map/levels | Get all available levels for a map section [**rentals**](MapApi.md#rentals) | **GET** /api/v1/rentals | Get a list of rental providers or all rental stations and vehicles for a map section or provider [**stops**](MapApi.md#stops) | **GET** /api/v1/map/stops | Get all stops for a map section [**trips**](MapApi.md#trips) | **GET** /api/v5/map/trips | Given a area frame (box defined by top right and bottom left corner) and a time frame, it returns all trips and their respective shapes that operate in this area + time frame. Trips are filtered by zoom level. On low zoom levels, only long distance trains will be shown while on high zoom levels, also metros, buses and trams will be returned. ## initial > models::Initial200Response initial() initial location to view the map at after loading based on where public transport should be visible ### Parameters This endpoint does not need any parameter. ### Return type [**models::Initial200Response**](initial_200_response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## levels > Vec levels(min, max) Get all available levels for a map section ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **min** | **String** | latitude,longitude pair of the lower right coordinate | [required] | **max** | **String** | latitude,longitude pair of the upper left coordinate | [required] | ### Return type **Vec** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## rentals > models::Rentals200Response rentals(min, max, provider_groups, providers, with_providers, with_stations, with_vehicles, with_zones) Get a list of rental providers or all rental stations and vehicles for a map section or provider If neither the map section (`min` and `max`) nor a provider filter (either `providerGroups` or `providers`) is provided, returns a list of all available rental providers, but no station, vehicle or zone data. Provide the `withProviders=false` parameter to retrieve only provider groups if detailed feed information is not required. Either the map section (`min` and `max`) or the provider filter (either `providerGroups` or `providers`) must be provided to retrieve station, vehicle and zone data. If only the map section is provided, all data in the area is returned. If only the provider filter is provided, all data for the given providers is returned. If both parameters are provided, only data for the given providers in the map section is returned. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **min** | Option<**String**> | latitude,longitude pair of the lower right coordinate | | **max** | Option<**String**> | latitude,longitude pair of the upper left coordinate | | **provider_groups** | Option<[**Vec**](String.md)> | A list of rental provider groups to return. If both `providerGroups` and `providers` are empty/not specified, all providers in the map section are returned. | | **providers** | Option<[**Vec**](String.md)> | A list of rental providers to return. If both `providerGroups` and `providers` are empty/not specified, all providers in the map section are returned. | | **with_providers** | Option<**bool**> | Optional. Include providers in output. If false, only provider groups are returned. Also affects the providers list for each provider group. | |[default to true] **with_stations** | Option<**bool**> | Optional. Include stations in output (requires at least min+max or providers filter). | |[default to true] **with_vehicles** | Option<**bool**> | Optional. Include free-floating vehicles in output (requires at least min+max or providers filter). | |[default to true] **with_zones** | Option<**bool**> | Optional. Include geofencing zones in output (requires at least min+max or providers filter). | |[default to true] ### Return type [**models::Rentals200Response**](rentals_200_response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## stops > Vec stops(min, max) Get all stops for a map section ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **min** | **String** | latitude,longitude pair of the lower right coordinate | [required] | **max** | **String** | latitude,longitude pair of the upper left coordinate | [required] | ### Return type [**Vec**](Place.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## trips > Vec trips(zoom, min, max, start_time, end_time) Given a area frame (box defined by top right and bottom left corner) and a time frame, it returns all trips and their respective shapes that operate in this area + time frame. Trips are filtered by zoom level. On low zoom levels, only long distance trains will be shown while on high zoom levels, also metros, buses and trams will be returned. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **zoom** | **f64** | current zoom level | [required] | **min** | **String** | latitude,longitude pair of the lower right coordinate | [required] | **max** | **String** | latitude,longitude pair of the upper left coordinate | [required] | **start_time** | **String** | start of the time window | [required] | **end_time** | **String** | end if the time window | [required] | ### Return type [**Vec**](TripSegment.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Match.md000064400000000000000000000032501046102023000154770ustar 00000000000000# Match ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | [**models::LocationType**](LocationType.md) | | **category** | Option<**String**> | Experimental. Type categories might be adjusted. For OSM stop locations: the amenity type based on https://wiki.openstreetmap.org/wiki/OpenStreetMap_Carto/Symbols | [optional] **tokens** | [**Vec>**](Vec.md) | list of non-overlapping tokens that were matched | **name** | **String** | name of the location (transit stop / PoI / address) | **id** | **String** | unique ID of the location | **lat** | **f64** | latitude | **lon** | **f64** | longitude | **level** | Option<**f64**> | level according to OpenStreetMap (at the moment only for public transport) | [optional] **street** | Option<**String**> | street name | [optional] **house_number** | Option<**String**> | house number | [optional] **country** | Option<**String**> | ISO3166-1 country code from OpenStreetMap | [optional] **zip** | Option<**String**> | zip code | [optional] **tz** | Option<**String**> | timezone name (e.g. \"Europe/Berlin\") | [optional] **areas** | [**Vec**](Area.md) | list of areas | **score** | **f64** | score according to the internal scoring system (the scoring algorithm might change in the future) | **modes** | Option<[**Vec**](Mode.md)> | available transport modes for stops | [optional] **importance** | Option<**f64**> | importance of a stop, normalized from [0, 1] | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Mode.md000064400000000000000000000015761046102023000153400ustar 00000000000000# Mode ## Enum Variants | Name | Value | |---- | -----| | Walk | WALK | | Bike | BIKE | | Rental | RENTAL | | Car | CAR | | CarParking | CAR_PARKING | | CarDropoff | CAR_DROPOFF | | Odm | ODM | | RideSharing | RIDE_SHARING | | Flex | FLEX | | Transit | TRANSIT | | Tram | TRAM | | Subway | SUBWAY | | Ferry | FERRY | | Airplane | AIRPLANE | | Suburban | SUBURBAN | | Bus | BUS | | Coach | COACH | | Rail | RAIL | | HighspeedRail | HIGHSPEED_RAIL | | LongDistance | LONG_DISTANCE | | NightRail | NIGHT_RAIL | | RegionalFastRail | REGIONAL_FAST_RAIL | | RegionalRail | REGIONAL_RAIL | | CableCar | CABLE_CAR | | Funicular | FUNICULAR | | AerialLift | AERIAL_LIFT | | Other | OTHER | | ArealLift | AREAL_LIFT | | Metro | METRO | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/PedestrianProfile.md000064400000000000000000000004311046102023000200600ustar 00000000000000# PedestrianProfile ## Enum Variants | Name | Value | |---- | -----| | Foot | FOOT | | Wheelchair | WHEELCHAIR | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/PickupDropoffType.md000064400000000000000000000004361046102023000200630ustar 00000000000000# PickupDropoffType ## Enum Variants | Name | Value | |---- | -----| | Normal | NORMAL | | NotAllowed | NOT_ALLOWED | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Place.md000064400000000000000000000051131046102023000154670ustar 00000000000000# Place ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | name of the transit stop / PoI / address | **stop_id** | Option<**String**> | The ID of the stop. This is often something that users don't care about. | [optional] **importance** | Option<**f64**> | The importance of the stop between 0-1. | [optional] **lat** | **f64** | latitude | **lon** | **f64** | longitude | **level** | **f64** | level according to OpenStreetMap | **tz** | Option<**String**> | timezone name (e.g. \"Europe/Berlin\") | [optional] **arrival** | Option<**String**> | arrival time | [optional] **departure** | Option<**String**> | departure time | [optional] **scheduled_arrival** | Option<**String**> | scheduled arrival time | [optional] **scheduled_departure** | Option<**String**> | scheduled departure time | [optional] **scheduled_track** | Option<**String**> | scheduled track from the static schedule timetable dataset | [optional] **track** | Option<**String**> | The current track/platform information, updated with real-time updates if available. Can be missing if neither real-time updates nor the schedule timetable contains track information. | [optional] **description** | Option<**String**> | description of the location that provides more detailed information | [optional] **vertex_type** | Option<[**models::VertexType**](VertexType.md)> | | [optional] **pickup_type** | Option<[**models::PickupDropoffType**](PickupDropoffType.md)> | Type of pickup. It could be disallowed due to schedule, skipped stops or cancellations. | [optional] **dropoff_type** | Option<[**models::PickupDropoffType**](PickupDropoffType.md)> | Type of dropoff. It could be disallowed due to schedule, skipped stops or cancellations. | [optional] **cancelled** | Option<**bool**> | Whether this stop is cancelled due to the realtime situation. | [optional] **alerts** | Option<[**Vec**](Alert.md)> | Alerts for this stop. | [optional] **flex** | Option<**String**> | for `FLEX` transports, the flex location area or location group name | [optional] **flex_id** | Option<**String**> | for `FLEX` transports, the flex location area ID or location group ID | [optional] **flex_start_pickup_drop_off_window** | Option<**String**> | Time that on-demand service becomes available | [optional] **flex_end_pickup_drop_off_window** | Option<**String**> | Time that on-demand service ends | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Plan200Response.md000064400000000000000000000031471046102023000173030ustar 00000000000000# Plan200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **request_parameters** | **std::collections::HashMap** | the routing query | **debug_output** | **std::collections::HashMap** | debug statistics | **from** | [**models::Place**](Place.md) | | **to** | [**models::Place**](Place.md) | | **direct** | [**Vec**](Itinerary.md) | Direct trips by `WALK`, `BIKE`, `CAR`, etc. without time-dependency. The starting time (`arriveBy=false`) / arrival time (`arriveBy=true`) is always the queried `time` parameter (set to \\\"now\\\" if not set). But all `direct` connections are meant to be independent of absolute times. | **itineraries** | [**Vec**](Itinerary.md) | list of itineraries | **previous_page_cursor** | **String** | Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of itineraries departing BEFORE the first itinerary in the result for a depart after search. When using the default sort order the previous set of itineraries is inserted before the current result. | **next_page_cursor** | **String** | Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of itineraries departing AFTER the last itinerary in this result. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Reachable.md000064400000000000000000000010061046102023000163060ustar 00000000000000# Reachable ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **one** | Option<[**models::Place**](Place.md)> | One location used in One-to-All search | [optional] **all** | Option<[**Vec**](ReachablePlace.md)> | List of locations reachable by One-to-All | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/ReachablePlace.md000064400000000000000000000014051046102023000172560ustar 00000000000000# ReachablePlace ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **place** | Option<[**models::Place**](Place.md)> | Place reached by One-to-All | [optional] **duration** | Option<**i32**> | Total travel duration | [optional] **k** | Option<**i32**> | k is the smallest number, for which a journey with the shortest duration and at most k-1 transfers exist. You can think of k as the number of connections used. In more detail: k=0: No connection, e.g. for the one location k=1: Direct connection k=2: Connection with 1 transfer | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RelativeDirection.md000064400000000000000000000011371046102023000200610ustar 00000000000000# RelativeDirection ## Enum Variants | Name | Value | |---- | -----| | Depart | DEPART | | HardLeft | HARD_LEFT | | Left | LEFT | | SlightlyLeft | SLIGHTLY_LEFT | | Continue | CONTINUE | | SlightlyRight | SLIGHTLY_RIGHT | | Right | RIGHT | | HardRight | HARD_RIGHT | | CircleClockwise | CIRCLE_CLOCKWISE | | CircleCounterclockwise | CIRCLE_COUNTERCLOCKWISE | | Elevator | ELEVATOR | | UturnLeft | UTURN_LEFT | | UturnRight | UTURN_RIGHT | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Rental.md000064400000000000000000000034161046102023000156740ustar 00000000000000# Rental ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **provider_id** | **String** | Rental provider ID | **provider_group_id** | **String** | Rental provider group ID | **system_id** | **String** | Vehicle share system ID | **system_name** | Option<**String**> | Vehicle share system name | [optional] **url** | Option<**String**> | URL of the vehicle share system | [optional] **color** | Option<**String**> | Color associated with this provider, in hexadecimal RGB format (e.g. \"#FF0000\" for red). Can be empty. | [optional] **station_name** | Option<**String**> | Name of the station | [optional] **from_station_name** | Option<**String**> | Name of the station where the vehicle is picked up (empty for free floating vehicles) | [optional] **to_station_name** | Option<**String**> | Name of the station where the vehicle is returned (empty for free floating vehicles) | [optional] **rental_uri_android** | Option<**String**> | Rental URI for Android (deep link to the specific station or vehicle) | [optional] **rental_uri_ios** | Option<**String**> | Rental URI for iOS (deep link to the specific station or vehicle) | [optional] **rental_uri_web** | Option<**String**> | Rental URI for web (deep link to the specific station or vehicle) | [optional] **form_factor** | Option<[**models::RentalFormFactor**](RentalFormFactor.md)> | | [optional] **propulsion_type** | Option<[**models::RentalPropulsionType**](RentalPropulsionType.md)> | | [optional] **return_constraint** | Option<[**models::RentalReturnConstraint**](RentalReturnConstraint.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalFormFactor.md000064400000000000000000000006371046102023000176610ustar 00000000000000# RentalFormFactor ## Enum Variants | Name | Value | |---- | -----| | Bicycle | BICYCLE | | CargoBicycle | CARGO_BICYCLE | | Car | CAR | | Moped | MOPED | | ScooterStanding | SCOOTER_STANDING | | ScooterSeated | SCOOTER_SEATED | | Other | OTHER | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalPropulsionType.md000064400000000000000000000007441046102023000206320ustar 00000000000000# RentalPropulsionType ## Enum Variants | Name | Value | |---- | -----| | Human | HUMAN | | ElectricAssist | ELECTRIC_ASSIST | | Electric | ELECTRIC | | Combustion | COMBUSTION | | CombustionDiesel | COMBUSTION_DIESEL | | Hybrid | HYBRID | | PlugInHybrid | PLUG_IN_HYBRID | | HydrogenFuelCell | HYDROGEN_FUEL_CELL | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalProvider.md000064400000000000000000000027121046102023000174050ustar 00000000000000# RentalProvider ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | Unique identifier of the rental provider | **name** | **String** | Name of the provider to be displayed to customers | **group_id** | **String** | Id of the rental provider group this provider belongs to | **operator** | Option<**String**> | Name of the system operator | [optional] **url** | Option<**String**> | URL of the vehicle share system | [optional] **purchase_url** | Option<**String**> | URL where a customer can purchase a membership | [optional] **color** | Option<**String**> | Color associated with this provider, in hexadecimal RGB format (e.g. \"#FF0000\" for red). Can be empty. | [optional] **bbox** | **Vec** | Bounding box of the area covered by this rental provider, [west, south, east, north] as [lon, lat, lon, lat] | **vehicle_types** | [**Vec**](RentalVehicleType.md) | | **form_factors** | [**Vec**](RentalFormFactor.md) | List of form factors offered by this provider | **default_restrictions** | [**models::RentalZoneRestrictions**](RentalZoneRestrictions.md) | | **global_geofencing_rules** | [**Vec**](RentalZoneRestrictions.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalProviderGroup.md000064400000000000000000000015031046102023000204170ustar 00000000000000# RentalProviderGroup ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | Unique identifier of the rental provider group | **name** | **String** | Name of the provider group to be displayed to customers | **color** | Option<**String**> | Color associated with this provider group, in hexadecimal RGB format (e.g. \"#FF0000\" for red). Can be empty. | [optional] **providers** | **Vec** | List of rental provider IDs that belong to this group | **form_factors** | [**Vec**](RentalFormFactor.md) | List of form factors offered by this provider group | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalReturnConstraint.md000064400000000000000000000005101046102023000211310ustar 00000000000000# RentalReturnConstraint ## Enum Variants | Name | Value | |---- | -----| | None | NONE | | AnyStation | ANY_STATION | | RoundtripStation | ROUNDTRIP_STATION | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalStation.md000064400000000000000000000046171046102023000172420ustar 00000000000000# RentalStation ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | Unique identifier of the rental station | **provider_id** | **String** | Unique identifier of the rental provider | **provider_group_id** | **String** | Unique identifier of the rental provider group | **name** | **String** | Public name of the station | **lat** | **f64** | latitude | **lon** | **f64** | longitude | **address** | Option<**String**> | Address where the station is located | [optional] **cross_street** | Option<**String**> | Cross street or landmark where the station is located | [optional] **rental_uri_android** | Option<**String**> | Rental URI for Android (deep link to the specific station) | [optional] **rental_uri_ios** | Option<**String**> | Rental URI for iOS (deep link to the specific station) | [optional] **rental_uri_web** | Option<**String**> | Rental URI for web (deep link to the specific station) | [optional] **is_renting** | **bool** | true if vehicles can be rented from this station, false if it is temporarily out of service | **is_returning** | **bool** | true if vehicles can be returned to this station, false if it is temporarily out of service | **num_vehicles_available** | **i32** | Number of vehicles available for rental at this station | **form_factors** | [**Vec**](RentalFormFactor.md) | List of form factors available for rental and/or return at this station | **vehicle_types_available** | **std::collections::HashMap** | List of vehicle types currently available at this station (vehicle type ID -> count) | **vehicle_docks_available** | **std::collections::HashMap** | List of vehicle docks currently available at this station (vehicle type ID -> count) | **station_area** | Option<[**Vec>**](Vec.md)> | A multi-polygon contains a number of polygons, each containing a number of rings, which are encoded as polylines (with precision 6). For each polygon, the first ring is the outer ring, all subsequent rings are inner rings (holes). | [optional] **bbox** | **Vec** | Bounding box of the area covered by this station, [west, south, east, north] as [lon, lat, lon, lat] | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalVehicle.md000064400000000000000000000032031046102023000171660ustar 00000000000000# RentalVehicle ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | Unique identifier of the rental vehicle | **provider_id** | **String** | Unique identifier of the rental provider | **provider_group_id** | **String** | Unique identifier of the rental provider group | **type_id** | **String** | Vehicle type ID (unique within the provider) | **lat** | **f64** | latitude | **lon** | **f64** | longitude | **form_factor** | [**models::RentalFormFactor**](RentalFormFactor.md) | | **propulsion_type** | [**models::RentalPropulsionType**](RentalPropulsionType.md) | | **return_constraint** | [**models::RentalReturnConstraint**](RentalReturnConstraint.md) | | **station_id** | Option<**String**> | Station ID if the vehicle is currently at a station | [optional] **home_station_id** | Option<**String**> | Station ID where the vehicle must be returned, if applicable | [optional] **is_reserved** | **bool** | true if the vehicle is currently reserved by a customer, false otherwise | **is_disabled** | **bool** | true if the vehicle is out of service, false otherwise | **rental_uri_android** | Option<**String**> | Rental URI for Android (deep link to the specific vehicle) | [optional] **rental_uri_ios** | Option<**String**> | Rental URI for iOS (deep link to the specific vehicle) | [optional] **rental_uri_web** | Option<**String**> | Rental URI for web (deep link to the specific vehicle) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalVehicleType.md000064400000000000000000000015541046102023000200370ustar 00000000000000# RentalVehicleType ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | Unique identifier of the vehicle type (unique within the provider) | **name** | Option<**String**> | Public name of the vehicle type (can be empty) | [optional] **form_factor** | [**models::RentalFormFactor**](RentalFormFactor.md) | | **propulsion_type** | [**models::RentalPropulsionType**](RentalPropulsionType.md) | | **return_constraint** | [**models::RentalReturnConstraint**](RentalReturnConstraint.md) | | **return_constraint_guessed** | **bool** | Whether the return constraint was guessed instead of being specified by the rental provider | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalZone.md000064400000000000000000000021461046102023000165270ustar 00000000000000# RentalZone ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **provider_id** | **String** | Unique identifier of the rental provider | **provider_group_id** | **String** | Unique identifier of the rental provider group | **name** | Option<**String**> | Public name of the geofencing zone | [optional] **z** | **i32** | Zone precedence / z-index (higher number = higher precedence) | **bbox** | **Vec** | Bounding box of the area covered by this zone, [west, south, east, north] as [lon, lat, lon, lat] | **area** | [**Vec>**](Vec.md) | A multi-polygon contains a number of polygons, each containing a number of rings, which are encoded as polylines (with precision 6). For each polygon, the first ring is the outer ring, all subsequent rings are inner rings (holes). | **rules** | [**Vec**](RentalZoneRestrictions.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RentalZoneRestrictions.md000064400000000000000000000016151046102023000211400ustar 00000000000000# RentalZoneRestrictions ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **vehicle_type_idxs** | **Vec** | List of vehicle types (as indices into the provider's vehicle types array) to which these restrictions apply. If empty, the restrictions apply to all vehicle types of the provider. | **ride_start_allowed** | **bool** | whether the ride is allowed to start in this zone | **ride_end_allowed** | **bool** | whether the ride is allowed to end in this zone | **ride_through_allowed** | **bool** | whether the ride is allowed to pass through this zone | **station_parking** | Option<**bool**> | whether vehicles can only be parked at stations in this zone | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Rentals200Response.md000064400000000000000000000012361046102023000200160ustar 00000000000000# Rentals200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **provider_groups** | [**Vec**](RentalProviderGroup.md) | | **providers** | [**Vec**](RentalProvider.md) | | **stations** | [**Vec**](RentalStation.md) | | **vehicles** | [**Vec**](RentalVehicle.md) | | **zones** | [**Vec**](RentalZone.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RiderCategory.md000064400000000000000000000012671046102023000172140ustar 00000000000000# RiderCategory ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rider_category_name** | **String** | Rider category name as displayed to the rider. | **is_default_fare_category** | **bool** | Specifies if this category should be considered the default (i.e. the main category displayed to riders). | **eligibility_url** | Option<**String**> | URL to a web page providing detailed information about the rider category and/or its eligibility criteria. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/RoutingApi.md000064400000000000000000000757531046102023000165450ustar 00000000000000# \RoutingApi All URIs are relative to *https://api.transitous.org* Method | HTTP request | Description ------------- | ------------- | ------------- [**one_to_all**](RoutingApi.md#one_to_all) | **GET** /api/v1/one-to-all | Computes all reachable locations from a given stop within a set duration. Each result entry will contain the fastest travel duration and the number of connections used. [**one_to_many**](RoutingApi.md#one_to_many) | **GET** /api/v1/one-to-many | Street routing from one to many places or many to one. The order in the response array corresponds to the order of coordinates of the \\`many\\` parameter in the query. [**plan**](RoutingApi.md#plan) | **GET** /api/v5/plan | Computes optimal connections from one place to another. ## one_to_all > models::Reachable one_to_all(one, max_travel_time, time, arrive_by, max_transfers, min_transfer_time, additional_transfer_time, transfer_time_factor, max_matching_distance, use_routed_transfers, pedestrian_profile, pedestrian_speed, cycling_speed, elevation_costs, transit_modes, pre_transit_modes, post_transit_modes, require_bike_transport, require_car_transport, max_pre_transit_time, max_post_transit_time) Computes all reachable locations from a given stop within a set duration. Each result entry will contain the fastest travel duration and the number of connections used. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **one** | **String** | \\`latitude,longitude[,level]\\` tuple with - latitude and longitude in degrees - (optional) level: the OSM level (default: 0) OR stop id | [required] | **max_travel_time** | **i32** | The maximum travel time in minutes. Defaults to 90. The limit may be increased by the server administrator using `onetoall_max_travel_minutes` option in `config.yml`. See documentation for details. | [required] | **time** | Option<**String**> | Optional. Defaults to the current time. Departure time ($arriveBy=false) / arrival date ($arriveBy=true), | | **arrive_by** | Option<**bool**> | true = all to one, false = one to all | |[default to false] **max_transfers** | Option<**i32**> | The maximum number of allowed transfers (i.e. interchanges between transit legs, pre- and postTransit do not count as transfers). `maxTransfers=0` searches for direct transit connections without any transfers. If you want to search only for non-transit connections (`FOOT`, `CAR`, etc.), send an empty `transitModes` parameter instead. If not provided, the routing uses the server-side default value which is hardcoded and very high to cover all use cases. *Warning*: Use with care. Setting this too low can lead to optimal (e.g. the fastest) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance. In plan endpoints before v3, the behavior is off by one, i.e. `maxTransfers=0` only returns non-transit connections. | | **min_transfer_time** | Option<**i32**> | Optional. Default is 0 minutes. Minimum transfer time for each transfer in minutes. | |[default to 0] **additional_transfer_time** | Option<**i32**> | Optional. Default is 0 minutes. Additional transfer time reserved for each transfer in minutes. | |[default to 0] **transfer_time_factor** | Option<**f64**> | Optional. Default is 1.0 Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported. | |[default to 1.0] **max_matching_distance** | Option<**f64**> | Optional. Default is 25 meters. Maximum matching distance in meters to match geo coordinates to the street network. | |[default to 25] **use_routed_transfers** | Option<**bool**> | Optional. Default is `false`. Whether to use transfers routed on OpenStreetMap data. | |[default to false] **pedestrian_profile** | Option<[**PedestrianProfile**](.md)> | Optional. Default is `FOOT`. Accessibility profile to use for pedestrian routing in transfers between transit connections and the first and last mile respectively. | |[default to FOOT] **pedestrian_speed** | Option<**f64**> | Optional Average speed for pedestrian routing. | | **cycling_speed** | Option<**f64**> | Optional Average speed for bike routing. | | **elevation_costs** | Option<[**ElevationCosts**](.md)> | Optional. Default is `NONE`. Set an elevation cost profile, to penalize routes with incline. - `NONE`: No additional costs for elevations. This is the default behavior - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required. - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required. As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue. The profile is used for routing on both the first and last mile. Elevation cost profiles are currently used by following street modes: - `BIKE` | |[default to NONE] **transit_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `TRANSIT` which allows all transit modes (no restriction). Allowed modes for the transit part. If empty, no transit connections will be computed. For example, this can be used to allow only `SUBURBAN,SUBWAY,TRAM`. | |[default to [TRANSIT]] **pre_transit_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `WALK`. The behavior depends on whether `arriveBy` is set: - `arriveBy=true`: Currently not used - `arriveBy=false`: Only applies if the `one` place is a coordinate (not a transit stop). A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. | |[default to [WALK]] **post_transit_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `WALK`. The behavior depends on whether `arriveBy` is set: - `arriveBy=true`: Only applies if the `one` place is a coordinate (not a transit stop). - `arriveBy=false`: Currently not used A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. | |[default to [WALK]] **require_bike_transport** | Option<**bool**> | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow bike carriage. | |[default to false] **require_car_transport** | Option<**bool**> | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow car carriage. | |[default to false] **max_pre_transit_time** | Option<**i32**> | Optional. Default is 15min which is `900`. - `arriveBy=true`: Currently not used - `arriveBy=false`: Maximum time in seconds for the street leg at `one` location. Is limited by server config variable `street_routing_max_prepost_transit_seconds`. | |[default to 900] **max_post_transit_time** | Option<**i32**> | Optional. Default is 15min which is `900`. - `arriveBy=true`: Maximum time in seconds for the street leg at `one` location. - `arriveBy=false`: Currently not used Is limited by server config variable `street_routing_max_prepost_transit_seconds`. | |[default to 900] ### Return type [**models::Reachable**](Reachable.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## one_to_many > Vec one_to_many(one, many, mode, max, max_matching_distance, arrive_by, elevation_costs) Street routing from one to many places or many to one. The order in the response array corresponds to the order of coordinates of the \\`many\\` parameter in the query. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **one** | **String** | geo location as latitude;longitude | [required] | **many** | [**Vec**](String.md) | geo locations as latitude;longitude,latitude;longitude,... | [required] | **mode** | [**Mode**](.md) | routing profile to use (currently supported: \\`WALK\\`, \\`BIKE\\`, \\`CAR\\`) | [required] | **max** | **f64** | maximum travel time in seconds | [required] | **max_matching_distance** | **f64** | maximum matching distance in meters to match geo coordinates to the street network | [required] | **arrive_by** | **bool** | true = many to one false = one to many | [required] | **elevation_costs** | Option<[**ElevationCosts**](.md)> | Optional. Default is `NONE`. Set an elevation cost profile, to penalize routes with incline. - `NONE`: No additional costs for elevations. This is the default behavior - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required. - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required. As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue. Elevation cost profiles are currently used by following street modes: - `BIKE` | |[default to NONE] ### Return type [**Vec**](Duration.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## plan > models::Plan200Response plan(from_place, to_place, detailed_transfers, via, via_minimum_stay, time, max_transfers, max_travel_time, min_transfer_time, additional_transfer_time, transfer_time_factor, max_matching_distance, pedestrian_profile, pedestrian_speed, cycling_speed, elevation_costs, use_routed_transfers, join_interlined_legs, transit_modes, direct_modes, pre_transit_modes, post_transit_modes, direct_rental_form_factors, pre_transit_rental_form_factors, post_transit_rental_form_factors, direct_rental_propulsion_types, pre_transit_rental_propulsion_types, post_transit_rental_propulsion_types, direct_rental_providers, direct_rental_provider_groups, pre_transit_rental_providers, pre_transit_rental_provider_groups, post_transit_rental_providers, post_transit_rental_provider_groups, ignore_direct_rental_return_constraints, ignore_pre_transit_rental_return_constraints, ignore_post_transit_rental_return_constraints, num_itineraries, max_itineraries, page_cursor, timetable_view, arrive_by, search_window, require_bike_transport, require_car_transport, max_pre_transit_time, max_post_transit_time, max_direct_time, fastest_direct_factor, timeout, passengers, luggage, slow_direct, fastest_slow_direct_factor, with_fares, with_scheduled_skipped_stops, language, algorithm) Computes optimal connections from one place to another. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **from_place** | **String** | \\`latitude,longitude[,level]\\` tuple with - latitude and longitude in degrees - (optional) level: the OSM level (default: 0) OR stop id | [required] | **to_place** | **String** | \\`latitude,longitude[,level]\\` tuple with - latitude and longitude in degrees - (optional) level: the OSM level (default: 0) OR stop id | [required] | **detailed_transfers** | **bool** | - true: Compute transfer polylines and step instructions. - false: Only return basic information (start time, end time, duration) for transfers. | [required] |[default to true] **via** | Option<[**Vec**](String.md)> | List of via stops to visit (only stop IDs, no coordinates allowed for now). Also see the optional parameter `viaMinimumStay` to set a set a minimum stay duration for each via stop. | | **via_minimum_stay** | Option<[**Vec**](i32.md)> | Optional. If not set, the default is `0,0` - no stay required. For each `via` stop a minimum stay duration in minutes. The value `0` signals that it's allowed to stay in the same trip. This enables via stays without counting a transfer and can lead to better connections with less transfers. Transfer connections can still be found with `viaMinimumStay=0`. | |[default to [0,0]] **time** | Option<**String**> | Optional. Defaults to the current time. Departure time ($arriveBy=false) / arrival date ($arriveBy=true), | | **max_transfers** | Option<**i32**> | The maximum number of allowed transfers (i.e. interchanges between transit legs, pre- and postTransit do not count as transfers). `maxTransfers=0` searches for direct transit connections without any transfers. If you want to search only for non-transit connections (`FOOT`, `CAR`, etc.), send an empty `transitModes` parameter instead. If not provided, the routing uses the server-side default value which is hardcoded and very high to cover all use cases. *Warning*: Use with care. Setting this too low can lead to optimal (e.g. the fastest) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance. In plan endpoints before v3, the behavior is off by one, i.e. `maxTransfers=0` only returns non-transit connections. | | **max_travel_time** | Option<**i32**> | The maximum travel time in minutes. If not provided, the routing to uses the value hardcoded in the server which is usually quite high. *Warning*: Use with care. Setting this too low can lead to optimal (e.g. the least transfers) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance. | | **min_transfer_time** | Option<**i32**> | Optional. Default is 0 minutes. Minimum transfer time for each transfer in minutes. | |[default to 0] **additional_transfer_time** | Option<**i32**> | Optional. Default is 0 minutes. Additional transfer time reserved for each transfer in minutes. | |[default to 0] **transfer_time_factor** | Option<**f64**> | Optional. Default is 1.0 Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported. | |[default to 1.0] **max_matching_distance** | Option<**f64**> | Optional. Default is 25 meters. Maximum matching distance in meters to match geo coordinates to the street network. | |[default to 25] **pedestrian_profile** | Option<[**PedestrianProfile**](.md)> | Optional. Default is `FOOT`. Accessibility profile to use for pedestrian routing in transfers between transit connections, on the first mile, and last mile. | |[default to FOOT] **pedestrian_speed** | Option<**f64**> | Optional Average speed for pedestrian routing. | | **cycling_speed** | Option<**f64**> | Optional Average speed for bike routing. | | **elevation_costs** | Option<[**ElevationCosts**](.md)> | Optional. Default is `NONE`. Set an elevation cost profile, to penalize routes with incline. - `NONE`: No additional costs for elevations. This is the default behavior - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required. - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required. As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue. The profile is used for direct routing, on the first mile, and last mile. Elevation cost profiles are currently used by following street modes: - `BIKE` | |[default to NONE] **use_routed_transfers** | Option<**bool**> | Optional. Default is `false`. Whether to use transfers routed on OpenStreetMap data. | |[default to false] **join_interlined_legs** | Option<**bool**> | Optional. Default is `true`. Controls if a journey section with stay-seated transfers is returned: - `joinInterlinedLegs=false`: as several legs (full information about all trip numbers, headsigns, etc.). Legs that do not require a transfer (stay-seated transfer) are marked with `interlineWithPreviousLeg=true`. - `joinInterlinedLegs=true` (default behavior): as only one joined leg containing all stops | |[default to true] **transit_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `TRANSIT` which allows all transit modes (no restriction). Allowed modes for the transit part. If empty, no transit connections will be computed. For example, this can be used to allow only `SUBURBAN,SUBWAY,TRAM`. | |[default to ["TRANSIT"]] **direct_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `WALK` which will compute walking routes as direct connections. Modes used for direction connections from start to destination without using transit. Results will be returned on the `direct` key. Note: Direct connections will only be returned on the first call. For paging calls, they can be omitted. Note: Transit connections that are slower than the fastest direct connection will not show up. This is being used as a cut-off during transit routing to speed up the search. To prevent this, it's possible to send two separate requests (one with only `transitModes` and one with only `directModes`). Note: the output `direct` array will stay empty if the input param `maxDirectTime` makes any direct trip impossible. Only non-transit modes such as `WALK`, `BIKE`, `CAR`, `BIKE_SHARING`, etc. can be used. | |[default to ["WALK"]] **pre_transit_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `WALK`. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`). A list of modes that are allowed to be used from the `from` coordinate to the first transit stop. Example: `WALK,BIKE_SHARING`. | |[default to [WALK]] **post_transit_modes** | Option<[**Vec**](models::Mode.md)> | Optional. Default is `WALK`. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`). A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. | |[default to [WALK]] **direct_rental_form_factors** | Option<[**Vec**](models::RentalFormFactor.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of vehicle type form factors that are allowed to be used for direct connections. If empty (the default), all form factors are allowed. Example: `BICYCLE,SCOOTER_STANDING`. | | **pre_transit_rental_form_factors** | Option<[**Vec**](models::RentalFormFactor.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalFormFactors`). A list of vehicle type form factors that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all form factors are allowed. Example: `BICYCLE,SCOOTER_STANDING`. | | **post_transit_rental_form_factors** | Option<[**Vec**](models::RentalFormFactor.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalFormFactors`). A list of vehicle type form factors that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all form factors are allowed. Example: `BICYCLE,SCOOTER_STANDING`. | | **direct_rental_propulsion_types** | Option<[**Vec**](models::RentalPropulsionType.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of vehicle type form factors that are allowed to be used for direct connections. If empty (the default), all propulsion types are allowed. Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`. | | **pre_transit_rental_propulsion_types** | Option<[**Vec**](models::RentalPropulsionType.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalPropulsionTypes`). A list of vehicle propulsion types that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all propulsion types are allowed. Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`. | | **post_transit_rental_propulsion_types** | Option<[**Vec**](models::RentalPropulsionType.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalPropulsionTypes`). A list of vehicle propulsion types that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all propulsion types are allowed. Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`. | | **direct_rental_providers** | Option<[**Vec**](String.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of rental providers that are allowed to be used for direct connections. If empty (the default), all providers are allowed. | | **direct_rental_provider_groups** | Option<[**Vec**](String.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of rental provider groups that are allowed to be used for direct connections. If empty (the default), all providers are allowed. | | **pre_transit_rental_providers** | Option<[**Vec**](String.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviders`). A list of rental providers that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all providers are allowed. | | **pre_transit_rental_provider_groups** | Option<[**Vec**](String.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviderGroups`). A list of rental provider groups that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all providers are allowed. | | **post_transit_rental_providers** | Option<[**Vec**](String.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviders`). A list of rental providers that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all providers are allowed. | | **post_transit_rental_provider_groups** | Option<[**Vec**](String.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviderGroups`). A list of rental provider groups that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all providers are allowed. | | **ignore_direct_rental_return_constraints** | Option<**bool**> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the routing will ignore rental return constraints for direct connections, allowing the rental vehicle to be parked anywhere. | |[default to false] **ignore_pre_transit_rental_return_constraints** | Option<**bool**> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the routing will ignore rental return constraints for the part from the `from` coordinate to the first transit stop, allowing the rental vehicle to be parked anywhere. | |[default to false] **ignore_post_transit_rental_return_constraints** | Option<**bool**> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the routing will ignore rental return constraints for the part from the last transit stop to the `to` coordinate, allowing the rental vehicle to be parked anywhere. | |[default to false] **num_itineraries** | Option<**i32**> | The minimum number of itineraries to compute. This is only relevant if `timetableView=true`. The default value is 5. | |[default to 5] **max_itineraries** | Option<**i32**> | Optional. By default all computed itineraries will be returned The maximum number of itineraries to compute. This is only relevant if `timetableView=true`. Note: With the current implementation, setting this to a lower number will not result in any speedup. Note: The number of returned itineraries might be slightly higher than `maxItineraries` as there might be several itineraries with the same departure time but different number of transfers. In order to not miss any itineraries for paging, either none or all itineraries with the same departure time have to be returned. | | **page_cursor** | Option<**String**> | Use the cursor to go to the next \"page\" of itineraries. Copy the cursor from the last response and keep the original request as is. This will enable you to search for itineraries in the next or previous time-window. | | **timetable_view** | Option<**bool**> | Optional. Default is `true`. Search for the best trip options within a time window. If true two itineraries are considered optimal if one is better on arrival time (earliest wins) and the other is better on departure time (latest wins). In combination with arriveBy this parameter cover the following use cases: `timetable=false` = waiting for the first transit departure/arrival is considered travel time: - `arriveBy=true`: event (e.g. a meeting) starts at 10:00 am, compute the best journeys that arrive by that time (maximizes departure time) - `arriveBy=false`: event (e.g. a meeting) ends at 11:00 am, compute the best journeys that depart after that time `timetable=true` = optimize \"later departure\" + \"earlier arrival\" and give all options over a time window: - `arriveBy=true`: the time window around `date` and `time` refers to the arrival time window - `arriveBy=false`: the time window around `date` and `time` refers to the departure time window | |[default to true] **arrive_by** | Option<**bool**> | Optional. Default is `false`. - `arriveBy=true`: the parameters `date` and `time` refer to the arrival time - `arriveBy=false`: the parameters `date` and `time` refer to the departure time | |[default to false] **search_window** | Option<**i32**> | Optional. Default is 2 hours which is `7200`. The length of the search-window in seconds. Default value two hours. - `arriveBy=true`: number of seconds between the earliest departure time and latest departure time - `arriveBy=false`: number of seconds between the earliest arrival time and the latest arrival time | |[default to 7200] **require_bike_transport** | Option<**bool**> | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow bike carriage. | |[default to false] **require_car_transport** | Option<**bool**> | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow car carriage. | |[default to false] **max_pre_transit_time** | Option<**i32**> | Optional. Default is 15min which is `900`. Maximum time in seconds for the first street leg. Is limited by server config variable `street_routing_max_prepost_transit_seconds`. | |[default to 900] **max_post_transit_time** | Option<**i32**> | Optional. Default is 15min which is `900`. Maximum time in seconds for the last street leg. Is limited by server config variable `street_routing_max_prepost_transit_seconds`. | |[default to 900] **max_direct_time** | Option<**i32**> | Optional. Default is 30min which is `1800`. Maximum time in seconds for direct connections. Is limited by server config variable `street_routing_max_direct_seconds`. | |[default to 1800] **fastest_direct_factor** | Option<**f64**> | Optional. Experimental. Default is `1.0`. Factor with which the duration of the fastest direct non-public-transit connection is multiplied. Values > 1.0 allow transit connections that are slower than the fastest direct non-public-transit connection to be found. | |[default to 1.0] **timeout** | Option<**i32**> | Optional. Query timeout in seconds. | | **passengers** | Option<**i32**> | Optional. Experimental. Number of passengers (e.g. for ODM or price calculation) | | **luggage** | Option<**i32**> | Optional. Experimental. Number of luggage pieces; base unit: airline cabin luggage (e.g. for ODM or price calculation) | | **slow_direct** | Option<**bool**> | Optional. Experimental. Adds overtaken direct public transit connections. | |[default to false] **fastest_slow_direct_factor** | Option<**f64**> | Optional. Factor with which the duration of the fastest slowDirect connection is multiplied. Values > 1.0 allow connections that are slower than the fastest direct transit connection to be found. Values < 1.0 will return all slowDirect connections. | |[default to 3.0] **with_fares** | Option<**bool**> | Optional. Experimental. If set to true, the response will contain fare information. | |[default to false] **with_scheduled_skipped_stops** | Option<**bool**> | Optional. Include intermediate stops where passengers can not alight/board according to schedule. | |[default to false] **language** | Option<[**Vec**](String.md)> | language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1) | | **algorithm** | Option<**String**> | algorithm to use | |[default to RAPTOR] ### Return type [**models::Plan200Response**](plan_200_response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/StepInstruction.md000064400000000000000000000033161046102023000176230ustar 00000000000000# StepInstruction ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **relative_direction** | [**models::Direction**](Direction.md) | | **distance** | **f64** | The distance in meters that this step takes. | **from_level** | **f64** | level where this segment starts, based on OpenStreetMap data | **to_level** | **f64** | level where this segment starts, based on OpenStreetMap data | **osm_way** | Option<**i32**> | OpenStreetMap way index | [optional] **polyline** | [**models::EncodedPolyline**](EncodedPolyline.md) | | **street_name** | **String** | The name of the street. | **exit** | **String** | Not implemented! When exiting a highway or traffic circle, the exit name/number. | **stay_on** | **bool** | Not implemented! Indicates whether or not a street changes direction at an intersection. | **area** | **bool** | Not implemented! This step is on an open area, such as a plaza or train platform, and thus the directions should say something like \"cross\" | **toll** | Option<**bool**> | Indicates that a fee must be paid by general traffic to use a road, road bridge or road tunnel. | [optional] **access_restriction** | Option<**String**> | Experimental. Indicates whether access to this part of the route is restricted. See: https://wiki.openstreetmap.org/wiki/Conditional_restrictions | [optional] **elevation_up** | Option<**i32**> | incline in meters across this path segment | [optional] **elevation_down** | Option<**i32**> | decline in meters across this path segment | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/StopTime.md000064400000000000000000000042671046102023000162200ustar 00000000000000# StopTime ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **place** | [**models::Place**](Place.md) | information about the stop place and time | **mode** | [**models::Mode**](Mode.md) | Transport mode for this leg | **real_time** | **bool** | Whether there is real-time data about this leg | **headsign** | **String** | The headsign of the bus or train being used. For non-transit legs, null | **trip_to** | [**models::Place**](Place.md) | final stop of this trip | **agency_id** | **String** | | **agency_name** | **String** | | **agency_url** | **String** | | **route_color** | Option<**String**> | | [optional] **route_text_color** | Option<**String**> | | [optional] **trip_id** | **String** | | **route_type** | Option<**i32**> | | [optional] **route_short_name** | **String** | | **route_long_name** | **String** | | **trip_short_name** | **String** | | **display_name** | **String** | | **previous_stops** | Option<[**Vec**](Place.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Stops on the trips before this stop. Returned only if `fetchStop` and `arriveBy` are `true`. | [optional] **next_stops** | Option<[**Vec**](Place.md)> | Experimental. Expect unannounced breaking changes (without version bumps). Stops on the trips after this stop. Returned only if `fetchStop` is `true` and `arriveBy` is `false`. | [optional] **pickup_dropoff_type** | [**models::PickupDropoffType**](PickupDropoffType.md) | Type of pickup (for departures) or dropoff (for arrivals), may be disallowed either due to schedule, skipped stops or cancellations | **cancelled** | **bool** | Whether the departure/arrival is cancelled due to the realtime situation (either because the stop is skipped or because the entire trip is cancelled). | **trip_cancelled** | **bool** | Whether the entire trip is cancelled due to the realtime situation. | **source** | **String** | Filename and line number where this trip is from | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Stoptimes200Response.md000064400000000000000000000016621046102023000204000ustar 00000000000000# Stoptimes200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **stop_times** | [**Vec**](StopTime.md) | list of stop times | **place** | [**models::Place**](Place.md) | metadata of the requested stop | **previous_page_cursor** | **String** | Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of stop times BEFORE the first stop time in the result. | **next_page_cursor** | **String** | Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of stop times AFTER the last stop time in this result. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/TimeRange.md000064400000000000000000000011731046102023000163200ustar 00000000000000# TimeRange ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **start** | **String** | If missing, the interval starts at minus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. | **end** | **String** | If missing, the interval ends at plus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/TimetableApi.md000064400000000000000000000121311046102023000170010ustar 00000000000000# \TimetableApi All URIs are relative to *https://api.transitous.org* Method | HTTP request | Description ------------- | ------------- | ------------- [**stoptimes**](TimetableApi.md#stoptimes) | **GET** /api/v5/stoptimes | Get the next N departures or arrivals of a stop sorted by time [**trip**](TimetableApi.md#trip) | **GET** /api/v5/trip | Get a trip as itinerary ## stoptimes > models::Stoptimes200Response stoptimes(stop_id, n, time, arrive_by, direction, mode, radius, exact_radius, fetch_stops, page_cursor, with_scheduled_skipped_stops, language) Get the next N departures or arrivals of a stop sorted by time ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **stop_id** | **String** | stop id of the stop to retrieve departures/arrivals for | [required] | **n** | **i32** | the number of events | [required] | **time** | Option<**String**> | Optional. Defaults to the current time. | | **arrive_by** | Option<**bool**> | Optional. Default is `false`. - `arriveBy=true`: the parameters `date` and `time` refer to the arrival time - `arriveBy=false`: the parameters `date` and `time` refer to the departure time | |[default to false] **direction** | Option<**String**> | This parameter will be ignored in case `pageCursor` is set. Optional. Default is - `LATER` for `arriveBy=false` - `EARLIER` for `arriveBy=true` The response will contain the next `n` arrivals / departures in case `EARLIER` is selected and the previous `n` arrivals / departures if `LATER` is selected. | | **mode** | Option<[**Vec**](models::Mode.md)> | Optional. Default is all transit modes. Only return arrivals/departures of the given modes. | |[default to [TRANSIT]] **radius** | Option<**i32**> | Optional. Radius in meters. Default is that only stop times of the parent of the stop itself and all stops with the same name (+ their child stops) are returned. If set, all stops at parent stations and their child stops in the specified radius are returned. | | **exact_radius** | Option<**bool**> | Optional. Default is `false`. If set to `true`, only stations that are phyiscally in the radius are considered. If set to `false`, additionally to the stations in the radius, equivalences with the same name and children are considered. | |[default to false] **fetch_stops** | Option<**bool**> | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the following stops are returned for departures and the previous stops are returned for arrivals. | | **page_cursor** | Option<**String**> | Use the cursor to go to the next \"page\" of stop times. Copy the cursor from the last response and keep the original request as is. This will enable you to search for stop times in the next or previous time-window. | | **with_scheduled_skipped_stops** | Option<**bool**> | Optional. Include stoptimes where passengers can not alight/board according to schedule. | |[default to false] **language** | Option<[**Vec**](String.md)> | language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1) | | ### Return type [**models::Stoptimes200Response**](stoptimes_200_response.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## trip > models::Itinerary trip(trip_id, with_scheduled_skipped_stops, join_interlined_legs, language) Get a trip as itinerary ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **trip_id** | **String** | trip identifier (e.g. from an itinerary leg or stop event) | [required] | **with_scheduled_skipped_stops** | Option<**bool**> | Optional. Include intermediate stops where passengers can not alight/board according to schedule. | |[default to false] **join_interlined_legs** | Option<**bool**> | Optional. Default is `true`. Controls if a trip with stay-seated transfers is returned: - `joinInterlinedLegs=false`: as several legs (full information about all trip numbers, headsigns, etc.). Legs that do not require a transfer (stay-seated transfer) are marked with `interlineWithPreviousLeg=true`. - `joinInterlinedLegs=true` (default behavior): as only one joined leg containing all stops | |[default to true] **language** | Option<[**Vec**](String.md)> | language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1) | | ### Return type [**models::Itinerary**](Itinerary.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Transfer.md000064400000000000000000000027061046102023000162340ustar 00000000000000# Transfer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to** | [**models::Place**](Place.md) | | **default** | Option<**f64**> | optional; missing if the GTFS did not contain a transfer transfer duration in minutes according to GTFS (+heuristics) | [optional] **foot** | Option<**f64**> | optional; missing if no path was found (timetable / osr) transfer duration in minutes for the foot profile | [optional] **foot_routed** | Option<**f64**> | optional; missing if no path was found with foot routing transfer duration in minutes for the foot profile | [optional] **wheelchair** | Option<**f64**> | optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile | [optional] **wheelchair_routed** | Option<**f64**> | optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile | [optional] **wheelchair_uses_elevator** | Option<**bool**> | optional; missing if no path was found with the wheelchair profile true if the wheelchair path uses an elevator | [optional] **car** | Option<**f64**> | optional; missing if no path was found with car routing transfer duration in minutes for the car profile | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/Transfers200Response.md000064400000000000000000000014701046102023000203550ustar 00000000000000# Transfers200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **place** | [**models::Place**](Place.md) | | **root** | [**models::Place**](Place.md) | | **equivalences** | [**Vec**](Place.md) | | **has_foot_transfers** | **bool** | true if the server has foot transfers computed | **has_wheelchair_transfers** | **bool** | true if the server has wheelchair transfers computed | **has_car_transfers** | **bool** | true if the server has car transfers computed | **transfers** | [**Vec**](Transfer.md) | all outgoing transfers of this location | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/TripInfo.md000064400000000000000000000010541046102023000161750ustar 00000000000000# TripInfo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **trip_id** | **String** | trip ID (dataset trip id prefixed with the dataset tag) | **route_short_name** | Option<**String**> | trip display name (api version < 4) | [optional] **display_name** | Option<**String**> | trip display name (api version >= 4) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/TripSegment.md000064400000000000000000000020241046102023000167020ustar 00000000000000# TripSegment ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **trips** | [**Vec**](TripInfo.md) | | **route_color** | Option<**String**> | | [optional] **mode** | [**models::Mode**](Mode.md) | Transport mode for this leg | **distance** | **f64** | distance in meters | **from** | [**models::Place**](Place.md) | | **to** | [**models::Place**](Place.md) | | **departure** | **String** | departure time | **arrival** | **String** | arrival time | **scheduled_departure** | **String** | scheduled departure time | **scheduled_arrival** | **String** | scheduled arrival time | **real_time** | **bool** | Whether there is real-time data about this leg | **polyline** | **String** | Google polyline encoded coordinate sequence (with precision 5) where the trip travels on this segment. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/docs/VertexType.md000064400000000000000000000004521046102023000165630ustar 00000000000000# VertexType ## Enum Variants | Name | Value | |---- | -----| | Normal | NORMAL | | Bikeshare | BIKESHARE | | Transit | TRANSIT | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) motis-openapi-sdk-5.0.0/generate.sh000064400000000000000000000011621046102023000153170ustar 00000000000000curl -o openapi.yml https://raw.githubusercontent.com/motis-project/motis/refs/heads/master/openapi.yaml openapi-generator-cli generate -g rust -i openapi.yml --package-name motis-openapi-sdk # Fix too long description sed -i 's/description = .*/description = "Automatically generated code for the Motis OpenAPI description."/' Cargo.toml # Change autor of autogenerated package; it is different from the autor of the OpenAPI specification. sed -i 's/felix@triptix.tech/Julian Schmidhuber /' Cargo.toml # Disable clippy on generated code. sed -i '1s/^/#![allow(clippy::all)]\n/' src/lib.rs motis-openapi-sdk-5.0.0/git_push.sh000064400000000000000000000034461046102023000153560ustar 00000000000000#!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 git_host=$4 if [ "$git_host" = "" ]; then git_host="github.com" echo "[INFO] No command line input provided. Set \$git_host to $git_host" fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then git_repo_id="GIT_REPO_ID" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi if [ "$release_note" = "" ]; then release_note="Minor update" echo "[INFO] No command line input provided. Set \$release_note to $release_note" fi # Initialize the local directory as a Git repository git init # Adds the files in the local repository and stages them for commit. git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' motis-openapi-sdk-5.0.0/openapi.yml000064400000000000000000003601261046102023000153570ustar 00000000000000openapi: 3.1.0 info: title: MOTIS API description: | This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). contact: email: felix@triptix.tech license: name: MIT url: https://opensource.org/license/mit version: v5 externalDocs: description: Find out more about MOTIS url: https://github.com/motis-project/motis servers: - url: https://api.transitous.org description: Transitous production server - url: https://staging.api.transitous.org description: Transitous staging server - url: http://localhost:8080 description: Local MOTIS server paths: /api/v5/plan: get: tags: - routing summary: Computes optimal connections from one place to another. operationId: plan parameters: - name: fromPlace in: query required: true description: | \`latitude,longitude[,level]\` tuple with - latitude and longitude in degrees - (optional) level: the OSM level (default: 0) OR stop id schema: type: string - name: toPlace in: query required: true description: | \`latitude,longitude[,level]\` tuple with - latitude and longitude in degrees - (optional) level: the OSM level (default: 0) OR stop id schema: type: string - name: via in: query required: false description: | List of via stops to visit (only stop IDs, no coordinates allowed for now). Also see the optional parameter `viaMinimumStay` to set a set a minimum stay duration for each via stop. schema: type: array maxItems: 2 items: type: string explode: false - name: viaMinimumStay in: query required: false description: | Optional. If not set, the default is `0,0` - no stay required. For each `via` stop a minimum stay duration in minutes. The value `0` signals that it's allowed to stay in the same trip. This enables via stays without counting a transfer and can lead to better connections with less transfers. Transfer connections can still be found with `viaMinimumStay=0`. schema: default: [ 0, 0 ] type: array maxItems: 2 items: type: integer explode: false - name: time in: query required: false description: | Optional. Defaults to the current time. Departure time ($arriveBy=false) / arrival date ($arriveBy=true), schema: type: string format: date-time - name: maxTransfers in: query required: false description: | The maximum number of allowed transfers (i.e. interchanges between transit legs, pre- and postTransit do not count as transfers). `maxTransfers=0` searches for direct transit connections without any transfers. If you want to search only for non-transit connections (`FOOT`, `CAR`, etc.), send an empty `transitModes` parameter instead. If not provided, the routing uses the server-side default value which is hardcoded and very high to cover all use cases. *Warning*: Use with care. Setting this too low can lead to optimal (e.g. the fastest) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance. In plan endpoints before v3, the behavior is off by one, i.e. `maxTransfers=0` only returns non-transit connections. schema: type: integer - name: maxTravelTime in: query required: false description: | The maximum travel time in minutes. If not provided, the routing to uses the value hardcoded in the server which is usually quite high. *Warning*: Use with care. Setting this too low can lead to optimal (e.g. the least transfers) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance. schema: type: integer - name: minTransferTime in: query required: false description: | Optional. Default is 0 minutes. Minimum transfer time for each transfer in minutes. schema: type: integer default: 0 - name: additionalTransferTime in: query required: false description: | Optional. Default is 0 minutes. Additional transfer time reserved for each transfer in minutes. schema: type: integer default: 0 - name: transferTimeFactor in: query required: false description: | Optional. Default is 1.0 Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported. schema: type: number default: 1.0 - name: maxMatchingDistance in: query required: false description: | Optional. Default is 25 meters. Maximum matching distance in meters to match geo coordinates to the street network. schema: type: number default: 25 - name: pedestrianProfile in: query required: false description: | Optional. Default is `FOOT`. Accessibility profile to use for pedestrian routing in transfers between transit connections, on the first mile, and last mile. schema: $ref: '#/components/schemas/PedestrianProfile' default: FOOT - name: pedestrianSpeed in: query required: false description: | Optional Average speed for pedestrian routing. schema: $ref: '#/components/schemas/PedestrianSpeed' - name: cyclingSpeed in: query required: false description: | Optional Average speed for bike routing. schema: $ref: '#/components/schemas/CyclingSpeed' - name: elevationCosts in: query required: false description: | Optional. Default is `NONE`. Set an elevation cost profile, to penalize routes with incline. - `NONE`: No additional costs for elevations. This is the default behavior - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required. - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required. As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue. The profile is used for direct routing, on the first mile, and last mile. Elevation cost profiles are currently used by following street modes: - `BIKE` schema: $ref: '#/components/schemas/ElevationCosts' default: NONE - name: useRoutedTransfers in: query required: false description: | Optional. Default is `false`. Whether to use transfers routed on OpenStreetMap data. schema: type: boolean default: false - name: detailedTransfers in: query required: true description: | - true: Compute transfer polylines and step instructions. - false: Only return basic information (start time, end time, duration) for transfers. schema: type: boolean default: true - name: joinInterlinedLegs in: query description: | Optional. Default is `true`. Controls if a journey section with stay-seated transfers is returned: - `joinInterlinedLegs=false`: as several legs (full information about all trip numbers, headsigns, etc.). Legs that do not require a transfer (stay-seated transfer) are marked with `interlineWithPreviousLeg=true`. - `joinInterlinedLegs=true` (default behavior): as only one joined leg containing all stops schema: type: boolean default: true - name: transitModes in: query required: false description: | Optional. Default is `TRANSIT` which allows all transit modes (no restriction). Allowed modes for the transit part. If empty, no transit connections will be computed. For example, this can be used to allow only `SUBURBAN,SUBWAY,TRAM`. schema: default: - TRANSIT type: array items: $ref: '#/components/schemas/Mode' explode: false - name: directModes in: query required: false description: | Optional. Default is `WALK` which will compute walking routes as direct connections. Modes used for direction connections from start to destination without using transit. Results will be returned on the `direct` key. Note: Direct connections will only be returned on the first call. For paging calls, they can be omitted. Note: Transit connections that are slower than the fastest direct connection will not show up. This is being used as a cut-off during transit routing to speed up the search. To prevent this, it's possible to send two separate requests (one with only `transitModes` and one with only `directModes`). Note: the output `direct` array will stay empty if the input param `maxDirectTime` makes any direct trip impossible. Only non-transit modes such as `WALK`, `BIKE`, `CAR`, `BIKE_SHARING`, etc. can be used. schema: default: - WALK type: array items: $ref: '#/components/schemas/Mode' explode: false - name: preTransitModes in: query required: false description: | Optional. Default is `WALK`. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`). A list of modes that are allowed to be used from the `from` coordinate to the first transit stop. Example: `WALK,BIKE_SHARING`. schema: default: - WALK type: array items: $ref: '#/components/schemas/Mode' explode: false - name: postTransitModes in: query required: false description: | Optional. Default is `WALK`. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`). A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. schema: default: - WALK type: array items: $ref: '#/components/schemas/Mode' explode: false - name: directRentalFormFactors in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of vehicle type form factors that are allowed to be used for direct connections. If empty (the default), all form factors are allowed. Example: `BICYCLE,SCOOTER_STANDING`. schema: type: array items: $ref: '#/components/schemas/RentalFormFactor' explode: false - name: preTransitRentalFormFactors in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalFormFactors`). A list of vehicle type form factors that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all form factors are allowed. Example: `BICYCLE,SCOOTER_STANDING`. schema: type: array items: $ref: '#/components/schemas/RentalFormFactor' explode: false - name: postTransitRentalFormFactors in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalFormFactors`). A list of vehicle type form factors that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all form factors are allowed. Example: `BICYCLE,SCOOTER_STANDING`. schema: type: array items: $ref: '#/components/schemas/RentalFormFactor' explode: false - name: directRentalPropulsionTypes in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of vehicle type form factors that are allowed to be used for direct connections. If empty (the default), all propulsion types are allowed. Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`. schema: type: array items: $ref: '#/components/schemas/RentalPropulsionType' explode: false - name: preTransitRentalPropulsionTypes in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalPropulsionTypes`). A list of vehicle propulsion types that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all propulsion types are allowed. Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`. schema: type: array items: $ref: '#/components/schemas/RentalPropulsionType' explode: false - name: postTransitRentalPropulsionTypes in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalPropulsionTypes`). A list of vehicle propulsion types that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all propulsion types are allowed. Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`. schema: type: array items: $ref: '#/components/schemas/RentalPropulsionType' explode: false - name: directRentalProviders in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of rental providers that are allowed to be used for direct connections. If empty (the default), all providers are allowed. schema: type: array items: type: string explode: false - name: directRentalProviderGroups in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies to direct connections. A list of rental provider groups that are allowed to be used for direct connections. If empty (the default), all providers are allowed. schema: type: array items: type: string explode: false - name: preTransitRentalProviders in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviders`). A list of rental providers that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all providers are allowed. schema: type: array items: type: string explode: false - name: preTransitRentalProviderGroups in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviderGroups`). A list of rental provider groups that are allowed to be used from the `from` coordinate to the first transit stop. If empty (the default), all providers are allowed. schema: type: array items: type: string explode: false - name: postTransitRentalProviders in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviders`). A list of rental providers that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all providers are allowed. schema: type: array items: type: string explode: false - name: postTransitRentalProviderGroups in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviderGroups`). A list of rental provider groups that are allowed to be used from the last transit stop to the `to` coordinate. If empty (the default), all providers are allowed. schema: type: array items: type: string explode: false - name: ignoreDirectRentalReturnConstraints in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the routing will ignore rental return constraints for direct connections, allowing the rental vehicle to be parked anywhere. schema: type: boolean default: false - name: ignorePreTransitRentalReturnConstraints in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the routing will ignore rental return constraints for the part from the `from` coordinate to the first transit stop, allowing the rental vehicle to be parked anywhere. schema: type: boolean default: false - name: ignorePostTransitRentalReturnConstraints in: query required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the routing will ignore rental return constraints for the part from the last transit stop to the `to` coordinate, allowing the rental vehicle to be parked anywhere. schema: type: boolean default: false - name: numItineraries in: query required: false description: | The minimum number of itineraries to compute. This is only relevant if `timetableView=true`. The default value is 5. schema: type: integer default: 5 - name: maxItineraries in: query required: false description: | Optional. By default all computed itineraries will be returned The maximum number of itineraries to compute. This is only relevant if `timetableView=true`. Note: With the current implementation, setting this to a lower number will not result in any speedup. Note: The number of returned itineraries might be slightly higher than `maxItineraries` as there might be several itineraries with the same departure time but different number of transfers. In order to not miss any itineraries for paging, either none or all itineraries with the same departure time have to be returned. schema: type: integer - name: pageCursor in: query required: false description: | Use the cursor to go to the next "page" of itineraries. Copy the cursor from the last response and keep the original request as is. This will enable you to search for itineraries in the next or previous time-window. schema: type: string - name: timetableView in: query required: false description: | Optional. Default is `true`. Search for the best trip options within a time window. If true two itineraries are considered optimal if one is better on arrival time (earliest wins) and the other is better on departure time (latest wins). In combination with arriveBy this parameter cover the following use cases: `timetable=false` = waiting for the first transit departure/arrival is considered travel time: - `arriveBy=true`: event (e.g. a meeting) starts at 10:00 am, compute the best journeys that arrive by that time (maximizes departure time) - `arriveBy=false`: event (e.g. a meeting) ends at 11:00 am, compute the best journeys that depart after that time `timetable=true` = optimize "later departure" + "earlier arrival" and give all options over a time window: - `arriveBy=true`: the time window around `date` and `time` refers to the arrival time window - `arriveBy=false`: the time window around `date` and `time` refers to the departure time window schema: type: boolean default: true - name: arriveBy in: query required: false schema: type: boolean default: false description: | Optional. Default is `false`. - `arriveBy=true`: the parameters `date` and `time` refer to the arrival time - `arriveBy=false`: the parameters `date` and `time` refer to the departure time - name: searchWindow in: query required: false description: | Optional. Default is 2 hours which is `7200`. The length of the search-window in seconds. Default value two hours. - `arriveBy=true`: number of seconds between the earliest departure time and latest departure time - `arriveBy=false`: number of seconds between the earliest arrival time and the latest arrival time schema: type: integer default: 7200 minimum: 0 - name: requireBikeTransport in: query required: false schema: type: boolean default: false description: | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow bike carriage. - name: requireCarTransport in: query required: false schema: type: boolean default: false description: | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow car carriage. - name: maxPreTransitTime in: query required: false description: | Optional. Default is 15min which is `900`. Maximum time in seconds for the first street leg. Is limited by server config variable `street_routing_max_prepost_transit_seconds`. schema: type: integer default: 900 minimum: 0 - name: maxPostTransitTime in: query required: false description: | Optional. Default is 15min which is `900`. Maximum time in seconds for the last street leg. Is limited by server config variable `street_routing_max_prepost_transit_seconds`. schema: type: integer default: 900 minimum: 0 - name: maxDirectTime in: query required: false description: | Optional. Default is 30min which is `1800`. Maximum time in seconds for direct connections. Is limited by server config variable `street_routing_max_direct_seconds`. schema: type: integer default: 1800 minimum: 0 - name: fastestDirectFactor in: query required: false description: | Optional. Experimental. Default is `1.0`. Factor with which the duration of the fastest direct non-public-transit connection is multiplied. Values > 1.0 allow transit connections that are slower than the fastest direct non-public-transit connection to be found. schema: type: number default: 1.0 minimum: 0 - name: timeout in: query required: false description: Optional. Query timeout in seconds. schema: type: integer minimum: 0 - name: passengers in: query required: false description: Optional. Experimental. Number of passengers (e.g. for ODM or price calculation) schema: type: integer minimum: 1 - name: luggage in: query required: false description: | Optional. Experimental. Number of luggage pieces; base unit: airline cabin luggage (e.g. for ODM or price calculation) schema: type: integer minimum: 1 - name: slowDirect in: query required: false description: Optional. Experimental. Adds overtaken direct public transit connections. schema: type: boolean default: false - name: fastestSlowDirectFactor in: query required: false description: | Optional. Factor with which the duration of the fastest slowDirect connection is multiplied. Values > 1.0 allow connections that are slower than the fastest direct transit connection to be found. Values < 1.0 will return all slowDirect connections. schema: type: number default: 3.0 minimum: 0 - name: withFares in: query required: false description: Optional. Experimental. If set to true, the response will contain fare information. schema: type: boolean default: false - name: withScheduledSkippedStops in: query required: false description: Optional. Include intermediate stops where passengers can not alight/board according to schedule. schema: type: boolean default: false - name: language in: query required: false description: | language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1) schema: type: array items: type: string explode: false - name: algorithm in: query required: false description: algorithm to use schema: type: string enum: - RAPTOR - PONG - TB default: RAPTOR responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: routing result content: application/json: schema: type: object required: - requestParameters - debugOutput - from - to - direct - itineraries - previousPageCursor - nextPageCursor properties: requestParameters: description: "the routing query" type: object additionalProperties: type: string debugOutput: description: "debug statistics" type: object additionalProperties: type: integer from: $ref: '#/components/schemas/Place' to: $ref: '#/components/schemas/Place' direct: description: | Direct trips by `WALK`, `BIKE`, `CAR`, etc. without time-dependency. The starting time (`arriveBy=false`) / arrival time (`arriveBy=true`) is always the queried `time` parameter (set to \"now\" if not set). But all `direct` connections are meant to be independent of absolute times. type: array items: $ref: '#/components/schemas/Itinerary' itineraries: description: list of itineraries type: array items: $ref: '#/components/schemas/Itinerary' previousPageCursor: description: | Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of itineraries departing BEFORE the first itinerary in the result for a depart after search. When using the default sort order the previous set of itineraries is inserted before the current result. type: string nextPageCursor: description: | Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of itineraries departing AFTER the last itinerary in this result. type: string /api/v1/one-to-many: get: tags: - routing summary: | Street routing from one to many places or many to one. The order in the response array corresponds to the order of coordinates of the \`many\` parameter in the query. operationId: oneToMany parameters: - name: one in: query required: true description: geo location as latitude;longitude schema: type: string - name: many in: query required: true description: geo locations as latitude;longitude,latitude;longitude,... schema: type: array items: type: string explode: false - name: mode in: query required: true description: | routing profile to use (currently supported: \`WALK\`, \`BIKE\`, \`CAR\`) schema: $ref: '#/components/schemas/Mode' - name: max in: query required: true description: maximum travel time in seconds schema: type: number - name: maxMatchingDistance in: query required: true description: maximum matching distance in meters to match geo coordinates to the street network schema: type: number - name: elevationCosts in: query required: false description: | Optional. Default is `NONE`. Set an elevation cost profile, to penalize routes with incline. - `NONE`: No additional costs for elevations. This is the default behavior - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required. - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required. As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue. Elevation cost profiles are currently used by following street modes: - `BIKE` schema: $ref: '#/components/schemas/ElevationCosts' default: NONE - name: arriveBy in: query required: true description: | true = many to one false = one to many schema: type: boolean responses: '200': description: | A list of durations. If no path was found, the object is empty. content: application/json: schema: type: array items: $ref: '#/components/schemas/Duration' /api/v1/one-to-all: get: tags: - routing summary: | Computes all reachable locations from a given stop within a set duration. Each result entry will contain the fastest travel duration and the number of connections used. operationId: oneToAll parameters: - name: one in: query required: true description: | \`latitude,longitude[,level]\` tuple with - latitude and longitude in degrees - (optional) level: the OSM level (default: 0) OR stop id schema: type: string - name: time in: query required: false description: | Optional. Defaults to the current time. Departure time ($arriveBy=false) / arrival date ($arriveBy=true), schema: type: string format: date-time - name: maxTravelTime in: query required: true description: The maximum travel time in minutes. Defaults to 90. The limit may be increased by the server administrator using `onetoall_max_travel_minutes` option in `config.yml`. See documentation for details. schema: type: integer - name: arriveBy in: query required: false description: | true = all to one, false = one to all schema: type: boolean default: false - name: maxTransfers in: query required: false description: | The maximum number of allowed transfers (i.e. interchanges between transit legs, pre- and postTransit do not count as transfers). `maxTransfers=0` searches for direct transit connections without any transfers. If you want to search only for non-transit connections (`FOOT`, `CAR`, etc.), send an empty `transitModes` parameter instead. If not provided, the routing uses the server-side default value which is hardcoded and very high to cover all use cases. *Warning*: Use with care. Setting this too low can lead to optimal (e.g. the fastest) journeys not being found. If this value is too low to reach the destination at all, it can lead to slow routing performance. In plan endpoints before v3, the behavior is off by one, i.e. `maxTransfers=0` only returns non-transit connections. schema: type: integer - name: minTransferTime in: query required: false description: | Optional. Default is 0 minutes. Minimum transfer time for each transfer in minutes. schema: type: integer default: 0 - name: additionalTransferTime in: query required: false description: | Optional. Default is 0 minutes. Additional transfer time reserved for each transfer in minutes. schema: type: integer default: 0 - name: transferTimeFactor in: query required: false description: | Optional. Default is 1.0 Factor to multiply minimum required transfer times with. Values smaller than 1.0 are not supported. schema: type: number default: 1.0 - name: maxMatchingDistance in: query required: false description: | Optional. Default is 25 meters. Maximum matching distance in meters to match geo coordinates to the street network. schema: type: number default: 25 - name: useRoutedTransfers in: query required: false description: | Optional. Default is `false`. Whether to use transfers routed on OpenStreetMap data. schema: type: boolean default: false - name: pedestrianProfile in: query required: false description: | Optional. Default is `FOOT`. Accessibility profile to use for pedestrian routing in transfers between transit connections and the first and last mile respectively. schema: $ref: '#/components/schemas/PedestrianProfile' default: FOOT - name: pedestrianSpeed in: query required: false description: | Optional Average speed for pedestrian routing. schema: $ref: '#/components/schemas/PedestrianSpeed' - name: cyclingSpeed in: query required: false description: | Optional Average speed for bike routing. schema: $ref: '#/components/schemas/CyclingSpeed' - name: elevationCosts in: query required: false description: | Optional. Default is `NONE`. Set an elevation cost profile, to penalize routes with incline. - `NONE`: No additional costs for elevations. This is the default behavior - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required. - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required. As using an elevation costs profile will increase the travel duration, routing through steep terrain may exceed the maximal allowed duration, causing a location to appear unreachable. Increasing the maximum travel time for these segments may resolve this issue. The profile is used for routing on both the first and last mile. Elevation cost profiles are currently used by following street modes: - `BIKE` schema: $ref: '#/components/schemas/ElevationCosts' default: NONE - name: transitModes in: query required: false description: | Optional. Default is `TRANSIT` which allows all transit modes (no restriction). Allowed modes for the transit part. If empty, no transit connections will be computed. For example, this can be used to allow only `SUBURBAN,SUBWAY,TRAM`. schema: default: - TRANSIT type: array items: $ref: '#/components/schemas/Mode' explode: false - name: preTransitModes in: query required: false description: | Optional. Default is `WALK`. The behavior depends on whether `arriveBy` is set: - `arriveBy=true`: Currently not used - `arriveBy=false`: Only applies if the `one` place is a coordinate (not a transit stop). A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. schema: default: - WALK type: array items: $ref: '#/components/schemas/Mode' explode: false - name: postTransitModes in: query required: false description: | Optional. Default is `WALK`. The behavior depends on whether `arriveBy` is set: - `arriveBy=true`: Only applies if the `one` place is a coordinate (not a transit stop). - `arriveBy=false`: Currently not used A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`. schema: default: - WALK type: array items: $ref: '#/components/schemas/Mode' explode: false - name: requireBikeTransport in: query required: false schema: type: boolean default: false description: | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow bike carriage. - name: requireCarTransport in: query required: false schema: type: boolean default: false description: | Optional. Default is `false`. If set to `true`, all used transit trips are required to allow car carriage. - name: maxPreTransitTime in: query required: false description: | Optional. Default is 15min which is `900`. - `arriveBy=true`: Currently not used - `arriveBy=false`: Maximum time in seconds for the street leg at `one` location. Is limited by server config variable `street_routing_max_prepost_transit_seconds`. schema: type: integer default: 900 minimum: 0 - name: maxPostTransitTime in: query required: false description: | Optional. Default is 15min which is `900`. - `arriveBy=true`: Maximum time in seconds for the street leg at `one` location. - `arriveBy=false`: Currently not used Is limited by server config variable `street_routing_max_prepost_transit_seconds`. schema: type: integer default: 900 minimum: 0 responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: | The starting position and a list of all reachable stops If no paths are found, the reachable list is empty. content: application/json: schema: $ref: '#/components/schemas/Reachable' /api/v1/reverse-geocode: get: tags: - geocode summary: Translate coordinates to the closest address(es)/places/stops. operationId: reverseGeocode parameters: - name: place in: query required: true description: latitude, longitude in degrees schema: type: string - name: type in: query required: false description: | Optional. Default is all types. Only return results of the given type. For example, this can be used to allow only `ADDRESS` and `STOP` results. schema: $ref: '#/components/schemas/LocationType' responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: A list of guesses to resolve the coordinates to a location content: application/json: schema: type: array items: $ref: '#/components/schemas/Match' /api/v1/geocode: get: tags: - geocode summary: Autocompletion & geocoding that resolves user input addresses including coordinates operationId: geocode parameters: - name: text in: query required: true description: the (potentially partially typed) address to resolve schema: type: string - name: language in: query required: false description: | language tags as used in OpenStreetMap (usually ISO 639-1, or ISO 639-2 if there's no ISO 639-1) schema: type: array items: type: string explode: false - name: type in: query required: false description: | Optional. Default is all types. Only return results of the given types. For example, this can be used to allow only `ADDRESS` and `STOP` results. schema: $ref: '#/components/schemas/LocationType' - name: place in: query required: false description: | Optional. Used for biasing results towards the coordinate. Format: latitude,longitude in degrees schema: type: string - name: placeBias in: query required: false description: | Optional. Used for biasing results towards the coordinate. Higher number = higher bias. schema: type: number default: 1 responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: A list of guesses to resolve the text to a location content: application/json: schema: type: array items: $ref: '#/components/schemas/Match' /api/v5/trip: get: tags: - timetable summary: Get a trip as itinerary operationId: trip parameters: - name: tripId in: query schema: type: string required: true description: trip identifier (e.g. from an itinerary leg or stop event) - name: withScheduledSkippedStops in: query required: false description: Optional. Include intermediate stops where passengers can not alight/board according to schedule. schema: type: boolean default: false - name: joinInterlinedLegs in: query description: | Optional. Default is `true`. Controls if a trip with stay-seated transfers is returned: - `joinInterlinedLegs=false`: as several legs (full information about all trip numbers, headsigns, etc.). Legs that do not require a transfer (stay-seated transfer) are marked with `interlineWithPreviousLeg=true`. - `joinInterlinedLegs=true` (default behavior): as only one joined leg containing all stops schema: type: boolean default: true - name: language in: query required: false description: | language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1) schema: type: array items: type: string explode: false responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: the requested trip as itinerary content: application/json: schema: $ref: '#/components/schemas/Itinerary' /api/v5/stoptimes: get: tags: - timetable summary: Get the next N departures or arrivals of a stop sorted by time operationId: stoptimes parameters: - name: stopId in: query schema: type: string required: true description: stop id of the stop to retrieve departures/arrivals for - name: time in: query required: false description: | Optional. Defaults to the current time. schema: type: string format: date-time - name: arriveBy in: query required: false schema: type: boolean default: false description: | Optional. Default is `false`. - `arriveBy=true`: the parameters `date` and `time` refer to the arrival time - `arriveBy=false`: the parameters `date` and `time` refer to the departure time - name: direction in: query required: false schema: type: string enum: - EARLIER - LATER description: | This parameter will be ignored in case `pageCursor` is set. Optional. Default is - `LATER` for `arriveBy=false` - `EARLIER` for `arriveBy=true` The response will contain the next `n` arrivals / departures in case `EARLIER` is selected and the previous `n` arrivals / departures if `LATER` is selected. - name: mode in: query schema: type: array items: $ref: '#/components/schemas/Mode' default: - TRANSIT explode: false description: | Optional. Default is all transit modes. Only return arrivals/departures of the given modes. - name: n in: query schema: type: integer required: true description: the number of events - name: radius in: query schema: type: integer required: false description: | Optional. Radius in meters. Default is that only stop times of the parent of the stop itself and all stops with the same name (+ their child stops) are returned. If set, all stops at parent stations and their child stops in the specified radius are returned. - name: exactRadius in: query schema: type: boolean default: false required: false description: | Optional. Default is `false`. If set to `true`, only stations that are phyiscally in the radius are considered. If set to `false`, additionally to the stations in the radius, equivalences with the same name and children are considered. - name: fetchStops in: query schema: type: boolean required: false description: | Experimental. Expect unannounced breaking changes (without version bumps). Optional. Default is `false`. If set to `true`, the following stops are returned for departures and the previous stops are returned for arrivals. - name: pageCursor in: query required: false description: | Use the cursor to go to the next "page" of stop times. Copy the cursor from the last response and keep the original request as is. This will enable you to search for stop times in the next or previous time-window. schema: type: string - name: withScheduledSkippedStops in: query required: false description: Optional. Include stoptimes where passengers can not alight/board according to schedule. schema: type: boolean default: false - name: language in: query required: false description: | language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1) schema: type: array items: type: string explode: false responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: A list of departures/arrivals content: application/json: schema: type: object required: - stopTimes - place - previousPageCursor - nextPageCursor properties: stopTimes: description: list of stop times type: array items: $ref: '#/components/schemas/StopTime' place: description: metadata of the requested stop $ref: '#/components/schemas/Place' previousPageCursor: description: | Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of stop times BEFORE the first stop time in the result. type: string nextPageCursor: description: | Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of stop times AFTER the last stop time in this result. type: string /api/v5/map/trips: get: tags: - map operationId: trips summary: | Given a area frame (box defined by top right and bottom left corner) and a time frame, it returns all trips and their respective shapes that operate in this area + time frame. Trips are filtered by zoom level. On low zoom levels, only long distance trains will be shown while on high zoom levels, also metros, buses and trams will be returned. parameters: - name: zoom in: query required: true description: current zoom level schema: type: number - name: min in: query required: true description: latitude,longitude pair of the lower right coordinate schema: type: string - name: max in: query required: true description: latitude,longitude pair of the upper left coordinate schema: type: string - name: startTime in: query required: true description: start of the time window schema: type: string format: date-time - name: endTime in: query required: true description: end if the time window schema: type: string format: date-time responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: a list of trips content: application/json: schema: type: array items: $ref: '#/components/schemas/TripSegment' /api/v1/map/initial: get: tags: - map operationId: initial summary: initial location to view the map at after loading based on where public transport should be visible responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: latitude, longitude and zoom level to set the map to content: application/json: schema: type: object required: - lat - lon - zoom properties: lat: description: latitude type: number lon: description: longitude type: number zoom: description: zoom level type: number /api/v1/map/stops: get: tags: - map summary: Get all stops for a map section operationId: stops parameters: - name: min in: query required: true description: latitude,longitude pair of the lower right coordinate schema: type: string - name: max in: query required: true description: latitude,longitude pair of the upper left coordinate schema: type: string responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: array of stop places in the selected map section content: application/json: schema: type: array items: $ref: '#/components/schemas/Place' /api/v1/map/levels: get: tags: - map summary: Get all available levels for a map section operationId: levels parameters: - name: min in: query required: true description: latitude,longitude pair of the lower right coordinate schema: type: string - name: max in: query required: true description: latitude,longitude pair of the upper left coordinate schema: type: string responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: array of available levels content: application/json: schema: type: array items: type: number /api/v1/rentals: get: tags: - map summary: | Get a list of rental providers or all rental stations and vehicles for a map section or provider operationId: rentals description: | If neither the map section (`min` and `max`) nor a provider filter (either `providerGroups` or `providers`) is provided, returns a list of all available rental providers, but no station, vehicle or zone data. Provide the `withProviders=false` parameter to retrieve only provider groups if detailed feed information is not required. Either the map section (`min` and `max`) or the provider filter (either `providerGroups` or `providers`) must be provided to retrieve station, vehicle and zone data. If only the map section is provided, all data in the area is returned. If only the provider filter is provided, all data for the given providers is returned. If both parameters are provided, only data for the given providers in the map section is returned. parameters: - name: min in: query required: false description: latitude,longitude pair of the lower right coordinate schema: type: string - name: max in: query required: false description: latitude,longitude pair of the upper left coordinate schema: type: string - name: providerGroups in: query required: false description: | A list of rental provider groups to return. If both `providerGroups` and `providers` are empty/not specified, all providers in the map section are returned. schema: type: array items: type: string explode: false - name: providers in: query required: false description: | A list of rental providers to return. If both `providerGroups` and `providers` are empty/not specified, all providers in the map section are returned. schema: type: array items: type: string explode: false - name: withProviders in: query required: false description: | Optional. Include providers in output. If false, only provider groups are returned. Also affects the providers list for each provider group. schema: type: boolean default: true - name: withStations in: query required: false description: Optional. Include stations in output (requires at least min+max or providers filter). schema: type: boolean default: true - name: withVehicles in: query required: false description: Optional. Include free-floating vehicles in output (requires at least min+max or providers filter). schema: type: boolean default: true - name: withZones in: query required: false description: Optional. Include geofencing zones in output (requires at least min+max or providers filter). schema: type: boolean default: true responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: Rentals in the map section or for the given providers content: application/json: schema: type: object required: - providerGroups - providers - stations - vehicles - zones properties: providerGroups: type: array items: $ref: '#/components/schemas/RentalProviderGroup' providers: type: array items: $ref: '#/components/schemas/RentalProvider' stations: type: array items: $ref: '#/components/schemas/RentalStation' vehicles: type: array items: $ref: '#/components/schemas/RentalVehicle' zones: type: array items: $ref: '#/components/schemas/RentalZone' /api/debug/transfers: get: tags: - debug summary: Prints all transfers of a timetable location (track, bus stop, etc.) operationId: transfers parameters: - name: id in: query required: true description: location id schema: type: string responses: '200': description: list of outgoing transfers of this location content: application/json: schema: type: object required: - place - root - equivalences - hasFootTransfers - hasWheelchairTransfers - hasCarTransfers - transfers properties: place: $ref: '#/components/schemas/Place' root: $ref: '#/components/schemas/Place' equivalences: type: array items: $ref: '#/components/schemas/Place' hasFootTransfers: type: boolean description: true if the server has foot transfers computed hasWheelchairTransfers: type: boolean description: true if the server has wheelchair transfers computed hasCarTransfers: type: boolean description: true if the server has car transfers computed transfers: description: all outgoing transfers of this location type: array items: $ref: '#/components/schemas/Transfer' components: schemas: AlertCause: description: Cause of this alert. type: string enum: - UNKNOWN_CAUSE - OTHER_CAUSE - TECHNICAL_PROBLEM - STRIKE - DEMONSTRATION - ACCIDENT - HOLIDAY - WEATHER - MAINTENANCE - CONSTRUCTION - POLICE_ACTIVITY - MEDICAL_EMERGENCY AlertEffect: description: The effect of this problem on the affected entity. type: string enum: - NO_SERVICE - REDUCED_SERVICE - SIGNIFICANT_DELAYS - DETOUR - ADDITIONAL_SERVICE - MODIFIED_SERVICE - OTHER_EFFECT - UNKNOWN_EFFECT - STOP_MOVED - NO_EFFECT - ACCESSIBILITY_ISSUE AlertSeverityLevel: description: The severity of the alert. type: string enum: - UNKNOWN_SEVERITY - INFO - WARNING - SEVERE TimeRange: description: | A time interval. The interval is considered active at time t if t is greater than or equal to the start time and less than the end time. type: object required: - start - end properties: start: description: | If missing, the interval starts at minus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. type: string format: date-time end: description: | If missing, the interval ends at plus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. type: string format: date-time Alert: description: An alert, indicating some sort of incident in the public transit network. type: object required: - headerText - descriptionText properties: communicationPeriod: description: | Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. type: array items: $ref: '#/components/schemas/TimeRange' impactPeriod: description: Time when the services are affected by the disruption mentioned in the alert. type: array items: $ref: '#/components/schemas/TimeRange' cause: $ref: '#/components/schemas/AlertCause' causeDetail: type: string description: | Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. effect: $ref: '#/components/schemas/AlertEffect' effectDetail: type: string description: | Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. url: type: string description: The URL which provides additional information about the alert. headerText: type: string description: | Header for the alert. This plain-text string will be highlighted, for example in boldface. descriptionText: type: string description: | Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user). The information in the description should add to the information of the header. ttsHeaderText: type: string description: | Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as headerText but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) ttsDescriptionText: type: string description: | Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) severityLevel: description: Severity of the alert. $ref: '#/components/schemas/AlertSeverityLevel' imageUrl: description: String containing an URL linking to an image. type: string imageMediaType: description: | IANA media type as to specify the type of image to be displayed. The type must start with "image/" type: string imageAlternativeText: description: | Text describing the appearance of the linked image in the image field (e.g., in case the image can't be displayed or the user can't see the image for accessibility reasons). See the HTML spec for alt image text. type: string Duration: description: Object containing duration if a path was found or none if no path was found type: object properties: duration: type: number description: duration in seconds if a path was found, otherwise missing Area: description: Administrative area type: object required: - name - adminLevel - matched properties: name: type: string description: Name of the area adminLevel: type: number description: | [OpenStreetMap `admin_level`](https://wiki.openstreetmap.org/wiki/Key:admin_level) of the area matched: type: boolean description: Whether this area was matched by the input text unique: type: boolean description: | Set for the first area after the `default` area that distinguishes areas if the match is ambiguous regarding (`default` area + place name / street [+ house number]). default: type: boolean description: Whether this area should be displayed as default area (area with admin level closest 7) Token: description: Matched token range (from index, length) type: array minItems: 2 maxItems: 2 items: type: number LocationType: description: location type type: string enum: - ADDRESS - PLACE - STOP Mode: description: | # Street modes - `WALK` - `BIKE` - `RENTAL` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs. - `CAR` - `CAR_PARKING` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs. - `CAR_DROPOFF` Experimental. Expect unannounced breaking changes (without version bumps) for all perameters and returned structs. - `ODM` on-demand taxis from the Prima+ÖV Project - `RIDE_SHARING` ride sharing from the Prima+ÖV Project - `FLEX` flexible transports # Transit modes - `TRANSIT`: translates to `RAIL,TRAM,BUS,FERRY,AIRPLANE,COACH,CABLE_CAR,FUNICULAR,AREAL_LIFT,OTHER` - `TRAM`: trams - `SUBWAY`: subway trains (Paris Metro, London Underground, but also NYC Subway, Hamburger Hochbahn, and other non-underground services) - `FERRY`: ferries - `AIRPLANE`: airline flights - `BUS`: short distance buses (does not include `COACH`) - `COACH`: long distance buses (does not include `BUS`) - `RAIL`: translates to `HIGHSPEED_RAIL,LONG_DISTANCE,NIGHT_RAIL,REGIONAL_RAIL,REGIONAL_FAST_RAIL,SUBURBAN,SUBWAY` - `SUBURBAN`: suburban trains (e.g. S-Bahn, RER, Elizabeth Line, ...) - `HIGHSPEED_RAIL`: long distance high speed trains (e.g. TGV) - `LONG_DISTANCE`: long distance inter city trains - `NIGHT_RAIL`: long distance night trains - `REGIONAL_FAST_RAIL`: regional express routes that skip low traffic stops to be faster - `REGIONAL_RAIL`: regional train - `CABLE_CAR`: Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco). - `FUNICULAR`: Funicular. Any rail system designed for steep inclines. - `AERIAL_LIFT`: Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables. - `AREAL_LIFT`: deprecated - `METRO`: deprecated type: string enum: # === Street === - WALK - BIKE - RENTAL - CAR - CAR_PARKING - CAR_DROPOFF - ODM - RIDE_SHARING - FLEX # === Transit === - TRANSIT - TRAM - SUBWAY - FERRY - AIRPLANE - SUBURBAN - BUS - COACH - RAIL - HIGHSPEED_RAIL - LONG_DISTANCE - NIGHT_RAIL - REGIONAL_FAST_RAIL - REGIONAL_RAIL - CABLE_CAR - FUNICULAR - AERIAL_LIFT - OTHER - AREAL_LIFT - METRO Match: description: GeoCoding match type: object required: - type - name - id - lat - lon - tokens - areas - score properties: type: $ref: '#/components/schemas/LocationType' category: description: | Experimental. Type categories might be adjusted. For OSM stop locations: the amenity type based on https://wiki.openstreetmap.org/wiki/OpenStreetMap_Carto/Symbols type: string tokens: description: list of non-overlapping tokens that were matched type: array items: $ref: '#/components/schemas/Token' name: description: name of the location (transit stop / PoI / address) type: string id: description: unique ID of the location type: string lat: description: latitude type: number lon: description: longitude type: number level: description: | level according to OpenStreetMap (at the moment only for public transport) type: number street: description: street name type: string houseNumber: description: house number type: string country: description: ISO3166-1 country code from OpenStreetMap type: string zip: description: zip code type: string tz: description: timezone name (e.g. "Europe/Berlin") type: string areas: description: list of areas type: array items: $ref: '#/components/schemas/Area' score: description: score according to the internal scoring system (the scoring algorithm might change in the future) type: number modes: description: available transport modes for stops type: array items: $ref: "#/components/schemas/Mode" importance: description: importance of a stop, normalized from [0, 1] type: number ElevationCosts: description: | Different elevation cost profiles for street routing. Using a elevation cost profile will prefer routes with a smaller incline and smaller difference in elevation, even if the routed way is longer. - `NONE`: Ignore elevation data for routing. This is the default behavior - `LOW`: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller. - `HIGH`: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller. type: string enum: - NONE - LOW - HIGH PedestrianProfile: description: Different accessibility profiles for pedestrians. type: string enum: - FOOT - WHEELCHAIR PedestrianSpeed: description: Average speed for pedestrian routing in meters per second type: number CyclingSpeed: description: Average speed for bike routing in meters per second type: number VertexType: type: string description: | - `NORMAL` - latitude / longitude coordinate or address - `BIKESHARE` - bike sharing station - `TRANSIT` - transit stop enum: - NORMAL - BIKESHARE - TRANSIT PickupDropoffType: type: string description: | - `NORMAL` - entry/exit is possible normally - `NOT_ALLOWED` - entry/exit is not allowed enum: - NORMAL - NOT_ALLOWED Place: type: object required: - name - lat - lon - level properties: name: description: name of the transit stop / PoI / address type: string stopId: description: The ID of the stop. This is often something that users don't care about. type: string importance: description: The importance of the stop between 0-1. type: number lat: description: latitude type: number lon: description: longitude type: number level: description: level according to OpenStreetMap type: number tz: description: timezone name (e.g. "Europe/Berlin") type: string arrival: description: arrival time type: string format: date-time departure: description: departure time type: string format: date-time scheduledArrival: description: scheduled arrival time type: string format: date-time scheduledDeparture: description: scheduled departure time type: string format: date-time scheduledTrack: description: scheduled track from the static schedule timetable dataset type: string track: description: | The current track/platform information, updated with real-time updates if available. Can be missing if neither real-time updates nor the schedule timetable contains track information. type: string description: description: description of the location that provides more detailed information type: string vertexType: $ref: '#/components/schemas/VertexType' pickupType: description: Type of pickup. It could be disallowed due to schedule, skipped stops or cancellations. $ref: '#/components/schemas/PickupDropoffType' dropoffType: description: Type of dropoff. It could be disallowed due to schedule, skipped stops or cancellations. $ref: '#/components/schemas/PickupDropoffType' cancelled: description: Whether this stop is cancelled due to the realtime situation. type: boolean alerts: description: Alerts for this stop. type: array items: $ref: '#/components/schemas/Alert' flex: description: for `FLEX` transports, the flex location area or location group name type: string flexId: description: for `FLEX` transports, the flex location area ID or location group ID type: string flexStartPickupDropOffWindow: description: Time that on-demand service becomes available type: string format: date-time flexEndPickupDropOffWindow: description: Time that on-demand service ends type: string format: date-time ReachablePlace: description: Place reachable by One-to-All type: object properties: place: $ref: "#/components/schemas/Place" description: Place reached by One-to-All duration: type: integer description: Total travel duration k: type: integer description: | k is the smallest number, for which a journey with the shortest duration and at most k-1 transfers exist. You can think of k as the number of connections used. In more detail: k=0: No connection, e.g. for the one location k=1: Direct connection k=2: Connection with 1 transfer Reachable: description: Object containing all reachable places by One-to-All search type: object properties: one: $ref: "#/components/schemas/Place" description: One location used in One-to-All search all: description: List of locations reachable by One-to-All type: array items: $ref: "#/components/schemas/ReachablePlace" StopTime: description: departure or arrival event at a stop type: object required: - place - mode - realTime - headsign - tripTo - agencyId - agencyName - agencyUrl - tripId - routeShortName - routeLongName - tripShortName - displayName - pickupDropoffType - cancelled - tripCancelled - source properties: place: $ref: '#/components/schemas/Place' description: information about the stop place and time mode: $ref: '#/components/schemas/Mode' description: Transport mode for this leg realTime: description: Whether there is real-time data about this leg type: boolean headsign: description: | The headsign of the bus or train being used. For non-transit legs, null type: string tripTo: description: final stop of this trip $ref: '#/components/schemas/Place' agencyId: type: string agencyName: type: string agencyUrl: type: string routeColor: type: string routeTextColor: type: string tripId: type: string routeType: type: integer routeShortName: type: string routeLongName: type: string tripShortName: type: string displayName: type: string previousStops: type: array description: | Experimental. Expect unannounced breaking changes (without version bumps). Stops on the trips before this stop. Returned only if `fetchStop` and `arriveBy` are `true`. items: $ref: "#/components/schemas/Place" nextStops: type: array description: | Experimental. Expect unannounced breaking changes (without version bumps). Stops on the trips after this stop. Returned only if `fetchStop` is `true` and `arriveBy` is `false`. items: $ref: "#/components/schemas/Place" pickupDropoffType: description: Type of pickup (for departures) or dropoff (for arrivals), may be disallowed either due to schedule, skipped stops or cancellations $ref: '#/components/schemas/PickupDropoffType' cancelled: description: Whether the departure/arrival is cancelled due to the realtime situation (either because the stop is skipped or because the entire trip is cancelled). type: boolean tripCancelled: description: Whether the entire trip is cancelled due to the realtime situation. type: boolean source: description: Filename and line number where this trip is from type: string TripInfo: description: trip id and name type: object required: - tripId properties: tripId: description: trip ID (dataset trip id prefixed with the dataset tag) type: string routeShortName: description: trip display name (api version < 4) type: string displayName: description: trip display name (api version >= 4) type: string TripSegment: description: trip segment between two stops to show a trip on a map type: object required: - trips - mode - distance - from - to - departure - arrival - scheduledArrival - scheduledDeparture - realTime - polyline properties: trips: type: array items: $ref: '#/components/schemas/TripInfo' routeColor: type: string mode: $ref: '#/components/schemas/Mode' description: Transport mode for this leg distance: type: number description: distance in meters from: $ref: '#/components/schemas/Place' to: $ref: '#/components/schemas/Place' departure: description: departure time type: string format: date-time arrival: description: arrival time type: string format: date-time scheduledDeparture: description: scheduled departure time type: string format: date-time scheduledArrival: description: scheduled arrival time type: string format: date-time realTime: description: Whether there is real-time data about this leg type: boolean polyline: description: Google polyline encoded coordinate sequence (with precision 5) where the trip travels on this segment. type: string Direction: type: string enum: - DEPART - HARD_LEFT - LEFT - SLIGHTLY_LEFT - CONTINUE - SLIGHTLY_RIGHT - RIGHT - HARD_RIGHT - CIRCLE_CLOCKWISE - CIRCLE_COUNTERCLOCKWISE - STAIRS - ELEVATOR - UTURN_LEFT - UTURN_RIGHT EncodedPolyline: type: object required: - points - precision - length properties: points: description: The encoded points of the polyline using the Google polyline encoding. type: string precision: description: | The precision of the returned polyline (7 for /v1, 6 for /v2) Be aware that with precision 7, coordinates with |longitude| > 107.37 are undefined/will overflow. type: integer length: description: The number of points in the string type: integer minimum: 0 StepInstruction: type: object required: - fromLevel - toLevel - polyline - relativeDirection - distance - streetName - exit - stayOn - area properties: relativeDirection: $ref: '#/components/schemas/Direction' distance: description: The distance in meters that this step takes. type: number fromLevel: description: level where this segment starts, based on OpenStreetMap data type: number toLevel: description: level where this segment starts, based on OpenStreetMap data type: number osmWay: description: OpenStreetMap way index type: integer polyline: $ref: '#/components/schemas/EncodedPolyline' streetName: description: The name of the street. type: string exit: description: | Not implemented! When exiting a highway or traffic circle, the exit name/number. type: string stayOn: description: | Not implemented! Indicates whether or not a street changes direction at an intersection. type: boolean area: description: | Not implemented! This step is on an open area, such as a plaza or train platform, and thus the directions should say something like "cross" type: boolean toll: description: Indicates that a fee must be paid by general traffic to use a road, road bridge or road tunnel. type: boolean accessRestriction: description: | Experimental. Indicates whether access to this part of the route is restricted. See: https://wiki.openstreetmap.org/wiki/Conditional_restrictions type: string elevationUp: type: integer description: incline in meters across this path segment elevationDown: type: integer description: decline in meters across this path segment RentalFormFactor: type: string enum: - BICYCLE - CARGO_BICYCLE - CAR - MOPED - SCOOTER_STANDING - SCOOTER_SEATED - OTHER RentalPropulsionType: type: string enum: - HUMAN - ELECTRIC_ASSIST - ELECTRIC - COMBUSTION - COMBUSTION_DIESEL - HYBRID - PLUG_IN_HYBRID - HYDROGEN_FUEL_CELL RentalReturnConstraint: type: string enum: - NONE - ANY_STATION - ROUNDTRIP_STATION Rental: description: Vehicle rental type: object required: - providerId - providerGroupId - systemId properties: providerId: type: string description: Rental provider ID providerGroupId: type: string description: Rental provider group ID systemId: type: string description: Vehicle share system ID systemName: type: string description: Vehicle share system name url: type: string description: URL of the vehicle share system color: type: string description: | Color associated with this provider, in hexadecimal RGB format (e.g. "#FF0000" for red). Can be empty. stationName: type: string description: Name of the station fromStationName: type: string description: Name of the station where the vehicle is picked up (empty for free floating vehicles) toStationName: type: string description: Name of the station where the vehicle is returned (empty for free floating vehicles) rentalUriAndroid: type: string description: Rental URI for Android (deep link to the specific station or vehicle) rentalUriIOS: type: string description: Rental URI for iOS (deep link to the specific station or vehicle) rentalUriWeb: type: string description: Rental URI for web (deep link to the specific station or vehicle) formFactor: $ref: '#/components/schemas/RentalFormFactor' propulsionType: $ref: '#/components/schemas/RentalPropulsionType' returnConstraint: $ref: '#/components/schemas/RentalReturnConstraint' MultiPolygon: type: array description: | A multi-polygon contains a number of polygons, each containing a number of rings, which are encoded as polylines (with precision 6). For each polygon, the first ring is the outer ring, all subsequent rings are inner rings (holes). items: # polygons type: array items: # rings $ref: '#/components/schemas/EncodedPolyline' RentalZoneRestrictions: type: object required: - vehicleTypeIdxs - rideStartAllowed - rideEndAllowed - rideThroughAllowed properties: vehicleTypeIdxs: type: array description: | List of vehicle types (as indices into the provider's vehicle types array) to which these restrictions apply. If empty, the restrictions apply to all vehicle types of the provider. items: type: integer rideStartAllowed: type: boolean description: whether the ride is allowed to start in this zone rideEndAllowed: type: boolean description: whether the ride is allowed to end in this zone rideThroughAllowed: type: boolean description: whether the ride is allowed to pass through this zone stationParking: type: boolean description: whether vehicles can only be parked at stations in this zone RentalVehicleType: type: object required: - id - formFactor - propulsionType - returnConstraint - returnConstraintGuessed properties: id: type: string description: Unique identifier of the vehicle type (unique within the provider) name: type: string description: Public name of the vehicle type (can be empty) formFactor: $ref: '#/components/schemas/RentalFormFactor' propulsionType: $ref: '#/components/schemas/RentalPropulsionType' returnConstraint: $ref: '#/components/schemas/RentalReturnConstraint' returnConstraintGuessed: type: boolean description: Whether the return constraint was guessed instead of being specified by the rental provider RentalProvider: type: object required: - id - name - groupId - bbox - vehicleTypes - formFactors - defaultRestrictions - globalGeofencingRules properties: id: type: string description: Unique identifier of the rental provider name: type: string description: Name of the provider to be displayed to customers groupId: type: string description: Id of the rental provider group this provider belongs to operator: type: string description: Name of the system operator url: type: string description: URL of the vehicle share system purchaseUrl: type: string description: URL where a customer can purchase a membership color: type: string description: | Color associated with this provider, in hexadecimal RGB format (e.g. "#FF0000" for red). Can be empty. bbox: type: array description: | Bounding box of the area covered by this rental provider, [west, south, east, north] as [lon, lat, lon, lat] minItems: 4 maxItems: 4 items: type: number vehicleTypes: type: array items: $ref: '#/components/schemas/RentalVehicleType' formFactors: type: array description: List of form factors offered by this provider items: $ref: '#/components/schemas/RentalFormFactor' defaultRestrictions: $ref: '#/components/schemas/RentalZoneRestrictions' globalGeofencingRules: type: array items: $ref: '#/components/schemas/RentalZoneRestrictions' RentalProviderGroup: type: object required: - id - name - providers - formFactors properties: id: type: string description: Unique identifier of the rental provider group name: type: string description: Name of the provider group to be displayed to customers color: type: string description: | Color associated with this provider group, in hexadecimal RGB format (e.g. "#FF0000" for red). Can be empty. providers: type: array description: List of rental provider IDs that belong to this group items: type: string formFactors: type: array description: List of form factors offered by this provider group items: $ref: '#/components/schemas/RentalFormFactor' RentalStation: type: object required: - id - providerId - providerGroupId - name - lat - lon - isRenting - isReturning - numVehiclesAvailable - formFactors - vehicleTypesAvailable - vehicleDocksAvailable - bbox properties: id: type: string description: Unique identifier of the rental station providerId: type: string description: Unique identifier of the rental provider providerGroupId: type: string description: Unique identifier of the rental provider group name: type: string description: Public name of the station lat: description: latitude type: number lon: description: longitude type: number address: type: string description: Address where the station is located crossStreet: type: string description: Cross street or landmark where the station is located rentalUriAndroid: type: string description: Rental URI for Android (deep link to the specific station) rentalUriIOS: type: string description: Rental URI for iOS (deep link to the specific station) rentalUriWeb: type: string description: Rental URI for web (deep link to the specific station) isRenting: type: boolean description: true if vehicles can be rented from this station, false if it is temporarily out of service isReturning: type: boolean description: true if vehicles can be returned to this station, false if it is temporarily out of service numVehiclesAvailable: type: integer description: Number of vehicles available for rental at this station formFactors: type: array description: List of form factors available for rental and/or return at this station items: $ref: '#/components/schemas/RentalFormFactor' vehicleTypesAvailable: type: object description: List of vehicle types currently available at this station (vehicle type ID -> count) additionalProperties: type: integer vehicleDocksAvailable: type: object description: List of vehicle docks currently available at this station (vehicle type ID -> count) additionalProperties: type: integer stationArea: $ref: '#/components/schemas/MultiPolygon' bbox: type: array description: | Bounding box of the area covered by this station, [west, south, east, north] as [lon, lat, lon, lat] minItems: 4 maxItems: 4 items: type: number RentalVehicle: type: object required: - id - providerId - providerGroupId - typeId - lat - lon - formFactor - propulsionType - returnConstraint - isReserved - isDisabled properties: id: type: string description: Unique identifier of the rental vehicle providerId: type: string description: Unique identifier of the rental provider providerGroupId: type: string description: Unique identifier of the rental provider group typeId: type: string description: Vehicle type ID (unique within the provider) lat: description: latitude type: number lon: description: longitude type: number formFactor: $ref: '#/components/schemas/RentalFormFactor' propulsionType: $ref: '#/components/schemas/RentalPropulsionType' returnConstraint: $ref: '#/components/schemas/RentalReturnConstraint' stationId: type: string description: Station ID if the vehicle is currently at a station homeStationId: type: string description: Station ID where the vehicle must be returned, if applicable isReserved: type: boolean description: true if the vehicle is currently reserved by a customer, false otherwise isDisabled: type: boolean description: true if the vehicle is out of service, false otherwise rentalUriAndroid: type: string description: Rental URI for Android (deep link to the specific vehicle) rentalUriIOS: type: string description: Rental URI for iOS (deep link to the specific vehicle) rentalUriWeb: type: string description: Rental URI for web (deep link to the specific vehicle) RentalZone: type: object required: - providerId - providerGroupId - z - bbox - area - rules properties: providerId: type: string description: Unique identifier of the rental provider providerGroupId: type: string description: Unique identifier of the rental provider group name: type: string description: Public name of the geofencing zone z: type: integer description: Zone precedence / z-index (higher number = higher precedence) bbox: type: array description: | Bounding box of the area covered by this zone, [west, south, east, north] as [lon, lat, lon, lat] minItems: 4 maxItems: 4 items: type: number area: $ref: '#/components/schemas/MultiPolygon' rules: type: array items: $ref: '#/components/schemas/RentalZoneRestrictions' Leg: type: object required: - mode - startTime - endTime - scheduledStartTime - scheduledEndTime - realTime - scheduled - duration - from - to - legGeometry properties: mode: $ref: '#/components/schemas/Mode' description: Transport mode for this leg from: $ref: '#/components/schemas/Place' to: $ref: '#/components/schemas/Place' duration: description: | Leg duration in seconds If leg is footpath: The footpath duration is derived from the default footpath duration using the query parameters `transferTimeFactor` and `additionalTransferTime` as follows: `leg.duration = defaultDuration * transferTimeFactor + additionalTransferTime.` In case the defaultDuration is needed, it can be calculated by `defaultDuration = (leg.duration - additionalTransferTime) / transferTimeFactor`. Note that the default values are `transferTimeFactor = 1` and `additionalTransferTime = 0` in case they are not explicitly provided in the query. type: integer startTime: type: string format: date-time description: leg departure time endTime: type: string format: date-time description: leg arrival time scheduledStartTime: type: string format: date-time description: scheduled leg departure time scheduledEndTime: type: string format: date-time description: scheduled leg arrival time realTime: description: Whether there is real-time data about this leg type: boolean scheduled: description: | Whether this leg was originally scheduled to run or is an additional service. Scheduled times will equal realtime times in this case. type: boolean distance: description: For non-transit legs the distance traveled while traversing this leg in meters. type: number interlineWithPreviousLeg: description: For transit legs, if the rider should stay on the vehicle as it changes route names. type: boolean headsign: description: | For transit legs, the headsign of the bus or train being used. For non-transit legs, null type: string tripTo: description: final stop of this trip (can differ from headsign) $ref: '#/components/schemas/Place' routeColor: type: string routeTextColor: type: string routeType: type: integer agencyName: type: string agencyUrl: type: string agencyId: type: string tripId: type: string routeShortName: type: string routeLongName: type: string tripShortName: type: string displayName: type: string cancelled: description: Whether this trip is cancelled type: boolean source: description: Filename and line number where this trip is from type: string intermediateStops: description: | For transit legs, intermediate stops between the Place where the leg originates and the Place where the leg ends. For non-transit legs, null. type: array items: $ref: "#/components/schemas/Place" legGeometry: $ref: '#/components/schemas/EncodedPolyline' steps: description: | A series of turn by turn instructions used for walking, biking and driving. type: array items: $ref: '#/components/schemas/StepInstruction' rental: $ref: '#/components/schemas/Rental' fareTransferIndex: type: integer description: | Index into `Itinerary.fareTransfers` array to identify which fare transfer this leg belongs to effectiveFareLegIndex: type: integer description: | Index into the `Itinerary.fareTransfers[fareTransferIndex].effectiveFareLegProducts` array to identify which effective fare leg this itinerary leg belongs to alerts: description: Alerts for this stop. type: array items: $ref: '#/components/schemas/Alert' loopedCalendarSince: description: | If set, this attribute indicates that this trip has been expanded beyond the feed end date (enabled by config flag `timetable.dataset.extend_calendar`) by looping active weekdays, e.g. from calendar.txt in GTFS. type: string format: date-time RiderCategory: type: object required: - riderCategoryName - isDefaultFareCategory properties: riderCategoryName: description: Rider category name as displayed to the rider. type: string isDefaultFareCategory: description: Specifies if this category should be considered the default (i.e. the main category displayed to riders). type: boolean eligibilityUrl: description: URL to a web page providing detailed information about the rider category and/or its eligibility criteria. type: string FareMediaType: type: string enum: [ "NONE", "PAPER_TICKET", "TRANSIT_CARD", "CONTACTLESS_EMV", "MOBILE_APP" ] description: | - `NONE`: No fare media involved (e.g., cash payment) - `PAPER_TICKET`: Physical paper ticket - `TRANSIT_CARD`: Physical transit card with stored value - `CONTACTLESS_EMV`: cEMV (contactless payment) - `MOBILE_APP`: Mobile app with virtual transit cards/passes FareMedia: type: object required: - fareMediaType properties: fareMediaName: description: Name of the fare media. Required for transit cards and mobile apps. type: string fareMediaType: description: The type of fare media. $ref: '#/components/schemas/FareMediaType' FareProduct: type: object required: - name - amount - currency properties: name: description: The name of the fare product as displayed to riders. type: string amount: description: The cost of the fare product. May be negative to represent transfer discounts. May be zero to represent a fare product that is free. type: number currency: description: ISO 4217 currency code. The currency of the cost of the fare product. type: string riderCategory: $ref: '#/components/schemas/RiderCategory' media: $ref: '#/components/schemas/FareMedia' FareTransferRule: type: string enum: - A_AB - A_AB_B - AB FareTransfer: type: object description: | The concept is derived from: https://gtfs.org/documentation/schedule/reference/#fare_transfer_rulestxt Terminology: - **Leg**: An itinerary leg as described by the `Leg` type of this API description. - **Effective Fare Leg**: Itinerary legs can be joined together to form one *effective fare leg*. - **Fare Transfer**: A fare transfer groups two or more effective fare legs. - **A** is the first *effective fare leg* of potentially multiple consecutive legs contained in a fare transfer - **B** is any *effective fare leg* following the first *effective fare leg* in this transfer - **AB** are all changes between *effective fare legs* contained in this transfer The fare transfer rule is used to derive the final set of products of the itinerary legs contained in this transfer: - A_AB means that any product from the first effective fare leg combined with the product attached to the transfer itself (AB) which can be empty (= free). Note that all subsequent effective fare leg products need to be ignored in this case. - A_AB_B mean that a product for each effective fare leg needs to be purchased in a addition to the product attached to the transfer itself (AB) which can be empty (= free) - AB only the transfer product itself has to be purchased. Note that all fare products attached to the contained effective fare legs need to be ignored in this case. An itinerary `Leg` references the index of the fare transfer and the index of the effective fare leg in this transfer it belongs to. required: - effectiveFareLegProducts properties: rule: $ref: '#/components/schemas/FareTransferRule' transferProducts: type: array items: $ref: '#/components/schemas/FareProduct' effectiveFareLegProducts: description: | Lists all valid fare products for the effective fare legs. This is an `array>` where the inner array lists all possible fare products that would cover this effective fare leg. Each "effective fare leg" can have multiple options for adult/child/weekly/monthly/day/one-way tickets etc. You can see the outer array as AND (you need one ticket for each effective fare leg (`A_AB_B`), the first effective fare leg (`A_AB`) or no fare leg at all but only the transfer product (`AB`) and the inner array as OR (you can choose which ticket to buy) type: array items: type: array items: type: array items: $ref: '#/components/schemas/FareProduct' Itinerary: type: object required: - duration - startTime - endTime - transfers - legs properties: duration: description: journey duration in seconds type: integer startTime: type: string format: date-time description: journey departure time endTime: type: string format: date-time description: journey arrival time transfers: type: integer description: The number of transfers this trip has. legs: description: Journey legs type: array items: $ref: '#/components/schemas/Leg' fareTransfers: description: Fare information type: array items: $ref: '#/components/schemas/FareTransfer' Transfer: description: transfer from one location to another type: object required: - to properties: to: $ref: '#/components/schemas/Place' default: type: number description: | optional; missing if the GTFS did not contain a transfer transfer duration in minutes according to GTFS (+heuristics) foot: type: number description: | optional; missing if no path was found (timetable / osr) transfer duration in minutes for the foot profile footRouted: type: number description: | optional; missing if no path was found with foot routing transfer duration in minutes for the foot profile wheelchair: type: number description: | optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile wheelchairRouted: type: number description: | optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile wheelchairUsesElevator: type: boolean description: | optional; missing if no path was found with the wheelchair profile true if the wheelchair path uses an elevator car: type: number description: | optional; missing if no path was found with car routing transfer duration in minutes for the car profile Error: type: object properties: error: type: string motis-openapi-sdk-5.0.0/rustfmt.toml000064400000000000000000000000361046102023000155710ustar 00000000000000disable_all_formatting = true motis-openapi-sdk-5.0.0/src/apis/configuration.rs000064400000000000000000000042401046102023000201310ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, pub user_agent: Option, pub client: reqwest::Client, pub basic_auth: Option, pub oauth_access_token: Option, pub bearer_access_token: Option, pub api_key: Option, } pub type BasicAuth = (String, Option); #[derive(Debug, Clone)] pub struct ApiKey { pub prefix: Option, pub key: String, } impl Configuration { pub fn new() -> Configuration { Configuration::default() } } impl Default for Configuration { fn default() -> Self { Configuration { base_path: "https://api.transitous.org".to_owned(), user_agent: Some("OpenAPI-Generator/v5/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, bearer_access_token: None, api_key: None, } } } motis-openapi-sdk-5.0.0/src/apis/debug_api.rs000064400000000000000000000065671046102023000172170ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; use crate::{apis::ResponseContent, models}; use super::{Error, configuration, ContentType}; /// struct for typed errors of method [`transfers`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum TransfersError { UnknownValue(serde_json::Value), } pub async fn transfers(configuration: &configuration::Configuration, id: &str) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_id = id; let uri_str = format!("{}/api/debug/transfers", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("id", &p_query_id.to_string())]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Transfers200Response`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Transfers200Response`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } motis-openapi-sdk-5.0.0/src/apis/geocode_api.rs000064400000000000000000000153351046102023000175270ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; use crate::{apis::ResponseContent, models}; use super::{Error, configuration, ContentType}; /// struct for typed errors of method [`geocode`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum GeocodeError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`reverse_geocode`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum ReverseGeocodeError { Status400(models::Error), UnknownValue(serde_json::Value), } pub async fn geocode(configuration: &configuration::Configuration, text: &str, language: Option>, r#type: Option, place: Option<&str>, place_bias: Option) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_text = text; let p_query_language = language; let p_query_type = r#type; let p_query_place = place; let p_query_place_bias = place_bias; let uri_str = format!("{}/api/v1/geocode", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("text", &p_query_text.to_string())]); if let Some(ref param_value) = p_query_language { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("language".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("language", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_type { req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_place { req_builder = req_builder.query(&[("place", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_place_bias { req_builder = req_builder.query(&[("placeBias", ¶m_value.to_string())]); } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Match>`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Match>`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn reverse_geocode(configuration: &configuration::Configuration, place: &str, r#type: Option) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_place = place; let p_query_type = r#type; let uri_str = format!("{}/api/v1/reverse-geocode", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("place", &p_query_place.to_string())]); if let Some(ref param_value) = p_query_type { req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Match>`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Match>`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } motis-openapi-sdk-5.0.0/src/apis/map_api.rs000064400000000000000000000355221046102023000166770ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; use crate::{apis::ResponseContent, models}; use super::{Error, configuration, ContentType}; /// struct for typed errors of method [`initial`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum InitialError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`levels`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum LevelsError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`rentals`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum RentalsError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`stops`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum StopsError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`trips`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum TripsError { Status400(models::Error), UnknownValue(serde_json::Value), } pub async fn initial(configuration: &configuration::Configuration, ) -> Result> { let uri_str = format!("{}/api/v1/map/initial", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Initial200Response`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Initial200Response`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn levels(configuration: &configuration::Configuration, min: &str, max: &str) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_min = min; let p_query_max = max; let uri_str = format!("{}/api/v1/map/levels", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("min", &p_query_min.to_string())]); req_builder = req_builder.query(&[("max", &p_query_max.to_string())]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<f64>`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<f64>`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } /// If neither the map section (`min` and `max`) nor a provider filter (either `providerGroups` or `providers`) is provided, returns a list of all available rental providers, but no station, vehicle or zone data. Provide the `withProviders=false` parameter to retrieve only provider groups if detailed feed information is not required. Either the map section (`min` and `max`) or the provider filter (either `providerGroups` or `providers`) must be provided to retrieve station, vehicle and zone data. If only the map section is provided, all data in the area is returned. If only the provider filter is provided, all data for the given providers is returned. If both parameters are provided, only data for the given providers in the map section is returned. pub async fn rentals(configuration: &configuration::Configuration, min: Option<&str>, max: Option<&str>, provider_groups: Option>, providers: Option>, with_providers: Option, with_stations: Option, with_vehicles: Option, with_zones: Option) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_min = min; let p_query_max = max; let p_query_provider_groups = provider_groups; let p_query_providers = providers; let p_query_with_providers = with_providers; let p_query_with_stations = with_stations; let p_query_with_vehicles = with_vehicles; let p_query_with_zones = with_zones; let uri_str = format!("{}/api/v1/rentals", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); if let Some(ref param_value) = p_query_min { req_builder = req_builder.query(&[("min", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max { req_builder = req_builder.query(&[("max", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_provider_groups { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("providerGroups".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("providerGroups", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_providers { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("providers".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("providers", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_with_providers { req_builder = req_builder.query(&[("withProviders", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_with_stations { req_builder = req_builder.query(&[("withStations", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_with_vehicles { req_builder = req_builder.query(&[("withVehicles", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_with_zones { req_builder = req_builder.query(&[("withZones", ¶m_value.to_string())]); } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Rentals200Response`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Rentals200Response`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn stops(configuration: &configuration::Configuration, min: &str, max: &str) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_min = min; let p_query_max = max; let uri_str = format!("{}/api/v1/map/stops", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("min", &p_query_min.to_string())]); req_builder = req_builder.query(&[("max", &p_query_max.to_string())]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Place>`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Place>`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn trips(configuration: &configuration::Configuration, zoom: f64, min: &str, max: &str, start_time: String, end_time: String) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_zoom = zoom; let p_query_min = min; let p_query_max = max; let p_query_start_time = start_time; let p_query_end_time = end_time; let uri_str = format!("{}/api/v5/map/trips", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("zoom", &p_query_zoom.to_string())]); req_builder = req_builder.query(&[("min", &p_query_min.to_string())]); req_builder = req_builder.query(&[("max", &p_query_max.to_string())]); req_builder = req_builder.query(&[("startTime", &p_query_start_time.to_string())]); req_builder = req_builder.query(&[("endTime", &p_query_end_time.to_string())]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::TripSegment>`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::TripSegment>`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } motis-openapi-sdk-5.0.0/src/apis/mod.rs000064400000000000000000000064601046102023000160470ustar 00000000000000use std::error; use std::fmt; #[derive(Debug, Clone)] pub struct ResponseContent { pub status: reqwest::StatusCode, pub content: String, pub entity: Option, } #[derive(Debug)] pub enum Error { Reqwest(reqwest::Error), Serde(serde_json::Error), Io(std::io::Error), ResponseError(ResponseContent), } impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), Error::Serde(e) => ("serde", e.to_string()), Error::Io(e) => ("IO", e.to_string()), Error::ResponseError(e) => ("response", format!("status code {}", e.status)), }; write!(f, "error in {}: {}", module, e) } } impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, Error::Serde(e) => e, Error::Io(e) => e, Error::ResponseError(_) => return None, }) } } impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } } pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { if let serde_json::Value::Object(object) = value { let mut params = vec![]; for (key, value) in object { match value { serde_json::Value::Object(_) => params.append(&mut parse_deep_object( &format!("{}[{}]", prefix, key), value, )), serde_json::Value::Array(array) => { for (i, value) in array.iter().enumerate() { params.append(&mut parse_deep_object( &format!("{}[{}][{}]", prefix, key, i), value, )); } }, serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } return params; } unimplemented!("Only objects are supported with style=deepObject") } /// Internal use only /// A content type supported by this client. #[allow(dead_code)] enum ContentType { Json, Text, Unsupported(String) } impl From<&str> for ContentType { fn from(content_type: &str) -> Self { if content_type.starts_with("application") && content_type.contains("json") { return Self::Json; } else if content_type.starts_with("text/plain") { return Self::Text; } else { return Self::Unsupported(content_type.to_string()); } } } pub mod debug_api; pub mod geocode_api; pub mod map_api; pub mod routing_api; pub mod timetable_api; pub mod configuration; motis-openapi-sdk-5.0.0/src/apis/routing_api.rs000064400000000000000000001052511046102023000176060ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; use crate::{apis::ResponseContent, models}; use super::{Error, configuration, ContentType}; /// struct for typed errors of method [`one_to_all`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum OneToAllError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`one_to_many`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum OneToManyError { UnknownValue(serde_json::Value), } /// struct for typed errors of method [`plan`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum PlanError { Status400(models::Error), UnknownValue(serde_json::Value), } pub async fn one_to_all(configuration: &configuration::Configuration, one: &str, max_travel_time: i32, time: Option, arrive_by: Option, max_transfers: Option, min_transfer_time: Option, additional_transfer_time: Option, transfer_time_factor: Option, max_matching_distance: Option, use_routed_transfers: Option, pedestrian_profile: Option, pedestrian_speed: Option, cycling_speed: Option, elevation_costs: Option, transit_modes: Option>, pre_transit_modes: Option>, post_transit_modes: Option>, require_bike_transport: Option, require_car_transport: Option, max_pre_transit_time: Option, max_post_transit_time: Option) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_one = one; let p_query_max_travel_time = max_travel_time; let p_query_time = time; let p_query_arrive_by = arrive_by; let p_query_max_transfers = max_transfers; let p_query_min_transfer_time = min_transfer_time; let p_query_additional_transfer_time = additional_transfer_time; let p_query_transfer_time_factor = transfer_time_factor; let p_query_max_matching_distance = max_matching_distance; let p_query_use_routed_transfers = use_routed_transfers; let p_query_pedestrian_profile = pedestrian_profile; let p_query_pedestrian_speed = pedestrian_speed; let p_query_cycling_speed = cycling_speed; let p_query_elevation_costs = elevation_costs; let p_query_transit_modes = transit_modes; let p_query_pre_transit_modes = pre_transit_modes; let p_query_post_transit_modes = post_transit_modes; let p_query_require_bike_transport = require_bike_transport; let p_query_require_car_transport = require_car_transport; let p_query_max_pre_transit_time = max_pre_transit_time; let p_query_max_post_transit_time = max_post_transit_time; let uri_str = format!("{}/api/v1/one-to-all", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("one", &p_query_one.to_string())]); if let Some(ref param_value) = p_query_time { req_builder = req_builder.query(&[("time", ¶m_value.to_string())]); } req_builder = req_builder.query(&[("maxTravelTime", &p_query_max_travel_time.to_string())]); if let Some(ref param_value) = p_query_arrive_by { req_builder = req_builder.query(&[("arriveBy", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_transfers { req_builder = req_builder.query(&[("maxTransfers", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_min_transfer_time { req_builder = req_builder.query(&[("minTransferTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_additional_transfer_time { req_builder = req_builder.query(&[("additionalTransferTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_transfer_time_factor { req_builder = req_builder.query(&[("transferTimeFactor", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_matching_distance { req_builder = req_builder.query(&[("maxMatchingDistance", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_use_routed_transfers { req_builder = req_builder.query(&[("useRoutedTransfers", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_pedestrian_profile { req_builder = req_builder.query(&[("pedestrianProfile", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_pedestrian_speed { req_builder = req_builder.query(&[("pedestrianSpeed", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_cycling_speed { req_builder = req_builder.query(&[("cyclingSpeed", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_elevation_costs { req_builder = req_builder.query(&[("elevationCosts", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_transit_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("transitModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("transitModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_pre_transit_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("preTransitModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("preTransitModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_post_transit_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("postTransitModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("postTransitModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_require_bike_transport { req_builder = req_builder.query(&[("requireBikeTransport", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_require_car_transport { req_builder = req_builder.query(&[("requireCarTransport", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_pre_transit_time { req_builder = req_builder.query(&[("maxPreTransitTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_post_transit_time { req_builder = req_builder.query(&[("maxPostTransitTime", ¶m_value.to_string())]); } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Reachable`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Reachable`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn one_to_many(configuration: &configuration::Configuration, one: &str, many: Vec, mode: models::Mode, max: f64, max_matching_distance: f64, arrive_by: bool, elevation_costs: Option) -> Result, Error> { // add a prefix to parameters to efficiently prevent name collisions let p_query_one = one; let p_query_many = many; let p_query_mode = mode; let p_query_max = max; let p_query_max_matching_distance = max_matching_distance; let p_query_arrive_by = arrive_by; let p_query_elevation_costs = elevation_costs; let uri_str = format!("{}/api/v1/one-to-many", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("one", &p_query_one.to_string())]); req_builder = match "csv" { "multi" => req_builder.query(&p_query_many.into_iter().map(|p| ("many".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("many", &p_query_many.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; req_builder = req_builder.query(&[("mode", &p_query_mode.to_string())]); req_builder = req_builder.query(&[("max", &p_query_max.to_string())]); req_builder = req_builder.query(&[("maxMatchingDistance", &p_query_max_matching_distance.to_string())]); if let Some(ref param_value) = p_query_elevation_costs { req_builder = req_builder.query(&[("elevationCosts", ¶m_value.to_string())]); } req_builder = req_builder.query(&[("arriveBy", &p_query_arrive_by.to_string())]); if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Duration>`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec<models::Duration>`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn plan(configuration: &configuration::Configuration, from_place: &str, to_place: &str, detailed_transfers: bool, via: Option>, via_minimum_stay: Option>, time: Option, max_transfers: Option, max_travel_time: Option, min_transfer_time: Option, additional_transfer_time: Option, transfer_time_factor: Option, max_matching_distance: Option, pedestrian_profile: Option, pedestrian_speed: Option, cycling_speed: Option, elevation_costs: Option, use_routed_transfers: Option, join_interlined_legs: Option, transit_modes: Option>, direct_modes: Option>, pre_transit_modes: Option>, post_transit_modes: Option>, direct_rental_form_factors: Option>, pre_transit_rental_form_factors: Option>, post_transit_rental_form_factors: Option>, direct_rental_propulsion_types: Option>, pre_transit_rental_propulsion_types: Option>, post_transit_rental_propulsion_types: Option>, direct_rental_providers: Option>, direct_rental_provider_groups: Option>, pre_transit_rental_providers: Option>, pre_transit_rental_provider_groups: Option>, post_transit_rental_providers: Option>, post_transit_rental_provider_groups: Option>, ignore_direct_rental_return_constraints: Option, ignore_pre_transit_rental_return_constraints: Option, ignore_post_transit_rental_return_constraints: Option, num_itineraries: Option, max_itineraries: Option, page_cursor: Option<&str>, timetable_view: Option, arrive_by: Option, search_window: Option, require_bike_transport: Option, require_car_transport: Option, max_pre_transit_time: Option, max_post_transit_time: Option, max_direct_time: Option, fastest_direct_factor: Option, timeout: Option, passengers: Option, luggage: Option, slow_direct: Option, fastest_slow_direct_factor: Option, with_fares: Option, with_scheduled_skipped_stops: Option, language: Option>, algorithm: Option<&str>) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_from_place = from_place; let p_query_to_place = to_place; let p_query_detailed_transfers = detailed_transfers; let p_query_via = via; let p_query_via_minimum_stay = via_minimum_stay; let p_query_time = time; let p_query_max_transfers = max_transfers; let p_query_max_travel_time = max_travel_time; let p_query_min_transfer_time = min_transfer_time; let p_query_additional_transfer_time = additional_transfer_time; let p_query_transfer_time_factor = transfer_time_factor; let p_query_max_matching_distance = max_matching_distance; let p_query_pedestrian_profile = pedestrian_profile; let p_query_pedestrian_speed = pedestrian_speed; let p_query_cycling_speed = cycling_speed; let p_query_elevation_costs = elevation_costs; let p_query_use_routed_transfers = use_routed_transfers; let p_query_join_interlined_legs = join_interlined_legs; let p_query_transit_modes = transit_modes; let p_query_direct_modes = direct_modes; let p_query_pre_transit_modes = pre_transit_modes; let p_query_post_transit_modes = post_transit_modes; let p_query_direct_rental_form_factors = direct_rental_form_factors; let p_query_pre_transit_rental_form_factors = pre_transit_rental_form_factors; let p_query_post_transit_rental_form_factors = post_transit_rental_form_factors; let p_query_direct_rental_propulsion_types = direct_rental_propulsion_types; let p_query_pre_transit_rental_propulsion_types = pre_transit_rental_propulsion_types; let p_query_post_transit_rental_propulsion_types = post_transit_rental_propulsion_types; let p_query_direct_rental_providers = direct_rental_providers; let p_query_direct_rental_provider_groups = direct_rental_provider_groups; let p_query_pre_transit_rental_providers = pre_transit_rental_providers; let p_query_pre_transit_rental_provider_groups = pre_transit_rental_provider_groups; let p_query_post_transit_rental_providers = post_transit_rental_providers; let p_query_post_transit_rental_provider_groups = post_transit_rental_provider_groups; let p_query_ignore_direct_rental_return_constraints = ignore_direct_rental_return_constraints; let p_query_ignore_pre_transit_rental_return_constraints = ignore_pre_transit_rental_return_constraints; let p_query_ignore_post_transit_rental_return_constraints = ignore_post_transit_rental_return_constraints; let p_query_num_itineraries = num_itineraries; let p_query_max_itineraries = max_itineraries; let p_query_page_cursor = page_cursor; let p_query_timetable_view = timetable_view; let p_query_arrive_by = arrive_by; let p_query_search_window = search_window; let p_query_require_bike_transport = require_bike_transport; let p_query_require_car_transport = require_car_transport; let p_query_max_pre_transit_time = max_pre_transit_time; let p_query_max_post_transit_time = max_post_transit_time; let p_query_max_direct_time = max_direct_time; let p_query_fastest_direct_factor = fastest_direct_factor; let p_query_timeout = timeout; let p_query_passengers = passengers; let p_query_luggage = luggage; let p_query_slow_direct = slow_direct; let p_query_fastest_slow_direct_factor = fastest_slow_direct_factor; let p_query_with_fares = with_fares; let p_query_with_scheduled_skipped_stops = with_scheduled_skipped_stops; let p_query_language = language; let p_query_algorithm = algorithm; let uri_str = format!("{}/api/v5/plan", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("fromPlace", &p_query_from_place.to_string())]); req_builder = req_builder.query(&[("toPlace", &p_query_to_place.to_string())]); if let Some(ref param_value) = p_query_via { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("via".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("via", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_via_minimum_stay { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("viaMinimumStay".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("viaMinimumStay", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_time { req_builder = req_builder.query(&[("time", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_transfers { req_builder = req_builder.query(&[("maxTransfers", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_travel_time { req_builder = req_builder.query(&[("maxTravelTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_min_transfer_time { req_builder = req_builder.query(&[("minTransferTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_additional_transfer_time { req_builder = req_builder.query(&[("additionalTransferTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_transfer_time_factor { req_builder = req_builder.query(&[("transferTimeFactor", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_matching_distance { req_builder = req_builder.query(&[("maxMatchingDistance", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_pedestrian_profile { req_builder = req_builder.query(&[("pedestrianProfile", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_pedestrian_speed { req_builder = req_builder.query(&[("pedestrianSpeed", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_cycling_speed { req_builder = req_builder.query(&[("cyclingSpeed", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_elevation_costs { req_builder = req_builder.query(&[("elevationCosts", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_use_routed_transfers { req_builder = req_builder.query(&[("useRoutedTransfers", ¶m_value.to_string())]); } req_builder = req_builder.query(&[("detailedTransfers", &p_query_detailed_transfers.to_string())]); if let Some(ref param_value) = p_query_join_interlined_legs { req_builder = req_builder.query(&[("joinInterlinedLegs", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_transit_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("transitModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("transitModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_direct_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("directModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("directModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_pre_transit_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("preTransitModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("preTransitModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_post_transit_modes { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("postTransitModes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("postTransitModes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_direct_rental_form_factors { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("directRentalFormFactors".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("directRentalFormFactors", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_pre_transit_rental_form_factors { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("preTransitRentalFormFactors".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("preTransitRentalFormFactors", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_post_transit_rental_form_factors { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("postTransitRentalFormFactors".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("postTransitRentalFormFactors", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_direct_rental_propulsion_types { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("directRentalPropulsionTypes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("directRentalPropulsionTypes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_pre_transit_rental_propulsion_types { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("preTransitRentalPropulsionTypes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("preTransitRentalPropulsionTypes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_post_transit_rental_propulsion_types { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("postTransitRentalPropulsionTypes".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("postTransitRentalPropulsionTypes", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_direct_rental_providers { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("directRentalProviders".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("directRentalProviders", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_direct_rental_provider_groups { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("directRentalProviderGroups".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("directRentalProviderGroups", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_pre_transit_rental_providers { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("preTransitRentalProviders".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("preTransitRentalProviders", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_pre_transit_rental_provider_groups { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("preTransitRentalProviderGroups".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("preTransitRentalProviderGroups", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_post_transit_rental_providers { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("postTransitRentalProviders".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("postTransitRentalProviders", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_post_transit_rental_provider_groups { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("postTransitRentalProviderGroups".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("postTransitRentalProviderGroups", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_ignore_direct_rental_return_constraints { req_builder = req_builder.query(&[("ignoreDirectRentalReturnConstraints", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_ignore_pre_transit_rental_return_constraints { req_builder = req_builder.query(&[("ignorePreTransitRentalReturnConstraints", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_ignore_post_transit_rental_return_constraints { req_builder = req_builder.query(&[("ignorePostTransitRentalReturnConstraints", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_num_itineraries { req_builder = req_builder.query(&[("numItineraries", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_itineraries { req_builder = req_builder.query(&[("maxItineraries", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_page_cursor { req_builder = req_builder.query(&[("pageCursor", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_timetable_view { req_builder = req_builder.query(&[("timetableView", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_arrive_by { req_builder = req_builder.query(&[("arriveBy", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_search_window { req_builder = req_builder.query(&[("searchWindow", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_require_bike_transport { req_builder = req_builder.query(&[("requireBikeTransport", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_require_car_transport { req_builder = req_builder.query(&[("requireCarTransport", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_pre_transit_time { req_builder = req_builder.query(&[("maxPreTransitTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_post_transit_time { req_builder = req_builder.query(&[("maxPostTransitTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_max_direct_time { req_builder = req_builder.query(&[("maxDirectTime", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_fastest_direct_factor { req_builder = req_builder.query(&[("fastestDirectFactor", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_timeout { req_builder = req_builder.query(&[("timeout", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_passengers { req_builder = req_builder.query(&[("passengers", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_luggage { req_builder = req_builder.query(&[("luggage", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_slow_direct { req_builder = req_builder.query(&[("slowDirect", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_fastest_slow_direct_factor { req_builder = req_builder.query(&[("fastestSlowDirectFactor", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_with_fares { req_builder = req_builder.query(&[("withFares", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_with_scheduled_skipped_stops { req_builder = req_builder.query(&[("withScheduledSkippedStops", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_language { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("language".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("language", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref param_value) = p_query_algorithm { req_builder = req_builder.query(&[("algorithm", ¶m_value.to_string())]); } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Plan200Response`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Plan200Response`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } motis-openapi-sdk-5.0.0/src/apis/timetable_api.rs000064400000000000000000000223561046102023000200710ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use reqwest; use serde::{Deserialize, Serialize, de::Error as _}; use crate::{apis::ResponseContent, models}; use super::{Error, configuration, ContentType}; /// struct for typed errors of method [`stoptimes`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum StoptimesError { Status400(models::Error), UnknownValue(serde_json::Value), } /// struct for typed errors of method [`trip`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] pub enum TripError { Status400(models::Error), UnknownValue(serde_json::Value), } pub async fn stoptimes(configuration: &configuration::Configuration, stop_id: &str, n: i32, time: Option, arrive_by: Option, direction: Option<&str>, mode: Option>, radius: Option, exact_radius: Option, fetch_stops: Option, page_cursor: Option<&str>, with_scheduled_skipped_stops: Option, language: Option>) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_stop_id = stop_id; let p_query_n = n; let p_query_time = time; let p_query_arrive_by = arrive_by; let p_query_direction = direction; let p_query_mode = mode; let p_query_radius = radius; let p_query_exact_radius = exact_radius; let p_query_fetch_stops = fetch_stops; let p_query_page_cursor = page_cursor; let p_query_with_scheduled_skipped_stops = with_scheduled_skipped_stops; let p_query_language = language; let uri_str = format!("{}/api/v5/stoptimes", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("stopId", &p_query_stop_id.to_string())]); if let Some(ref param_value) = p_query_time { req_builder = req_builder.query(&[("time", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_arrive_by { req_builder = req_builder.query(&[("arriveBy", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_direction { req_builder = req_builder.query(&[("direction", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_mode { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("mode".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("mode", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } req_builder = req_builder.query(&[("n", &p_query_n.to_string())]); if let Some(ref param_value) = p_query_radius { req_builder = req_builder.query(&[("radius", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_exact_radius { req_builder = req_builder.query(&[("exactRadius", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_fetch_stops { req_builder = req_builder.query(&[("fetchStops", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_page_cursor { req_builder = req_builder.query(&[("pageCursor", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_with_scheduled_skipped_stops { req_builder = req_builder.query(&[("withScheduledSkippedStops", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_language { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("language".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("language", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Stoptimes200Response`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Stoptimes200Response`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } pub async fn trip(configuration: &configuration::Configuration, trip_id: &str, with_scheduled_skipped_stops: Option, join_interlined_legs: Option, language: Option>) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_trip_id = trip_id; let p_query_with_scheduled_skipped_stops = with_scheduled_skipped_stops; let p_query_join_interlined_legs = join_interlined_legs; let p_query_language = language; let uri_str = format!("{}/api/v5/trip", configuration.base_path); let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); req_builder = req_builder.query(&[("tripId", &p_query_trip_id.to_string())]); if let Some(ref param_value) = p_query_with_scheduled_skipped_stops { req_builder = req_builder.query(&[("withScheduledSkippedStops", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_join_interlined_legs { req_builder = req_builder.query(&[("joinInterlinedLegs", ¶m_value.to_string())]); } if let Some(ref param_value) = p_query_language { req_builder = match "csv" { "multi" => req_builder.query(¶m_value.into_iter().map(|p| ("language".to_owned(), p.to_string())).collect::>()), _ => req_builder.query(&[("language", ¶m_value.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), }; } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } let req = req_builder.build()?; let resp = configuration.client.execute(req).await?; let status = resp.status(); let content_type = resp .headers() .get("content-type") .and_then(|v| v.to_str().ok()) .unwrap_or("application/octet-stream"); let content_type = super::ContentType::from(content_type); if !status.is_client_error() && !status.is_server_error() { let content = resp.text().await?; match content_type { ContentType::Json => serde_json::from_str(&content).map_err(Error::from), ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Itinerary`"))), ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Itinerary`")))), } } else { let content = resp.text().await?; let entity: Option = serde_json::from_str(&content).ok(); Err(Error::ResponseError(ResponseContent { status, content, entity })) } } motis-openapi-sdk-5.0.0/src/lib.rs000064400000000000000000000003451046102023000150760ustar 00000000000000#![allow(clippy::all)] #![allow(unused_imports)] #![allow(clippy::too_many_arguments)] extern crate serde_repr; extern crate serde; extern crate serde_json; extern crate url; extern crate reqwest; pub mod apis; pub mod models; motis-openapi-sdk-5.0.0/src/models/absolute_direction.rs000064400000000000000000000025701046102023000214730ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. * * The version of the OpenAPI document: v1 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AbsoluteDirection { #[serde(rename = "NORTH")] North, #[serde(rename = "NORTHEAST")] Northeast, #[serde(rename = "EAST")] East, #[serde(rename = "SOUTHEAST")] Southeast, #[serde(rename = "SOUTH")] South, #[serde(rename = "SOUTHWEST")] Southwest, #[serde(rename = "WEST")] West, #[serde(rename = "NORTHWEST")] Northwest, } impl std::fmt::Display for AbsoluteDirection { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::North => write!(f, "NORTH"), Self::Northeast => write!(f, "NORTHEAST"), Self::East => write!(f, "EAST"), Self::Southeast => write!(f, "SOUTHEAST"), Self::South => write!(f, "SOUTH"), Self::Southwest => write!(f, "SOUTHWEST"), Self::West => write!(f, "WEST"), Self::Northwest => write!(f, "NORTHWEST"), } } } impl Default for AbsoluteDirection { fn default() -> AbsoluteDirection { Self::North } } motis-openapi-sdk-5.0.0/src/models/alert.rs000064400000000000000000000134351046102023000167260ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Alert : An alert, indicating some sort of incident in the public transit network. #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Alert { /// Time when the alert should be shown to the user. If missing, the alert will be shown as long as it appears in the feed. If multiple ranges are given, the alert will be shown during all of them. #[serde(rename = "communicationPeriod", skip_serializing_if = "Option::is_none")] pub communication_period: Option>, /// Time when the services are affected by the disruption mentioned in the alert. #[serde(rename = "impactPeriod", skip_serializing_if = "Option::is_none")] pub impact_period: Option>, #[serde(rename = "cause", skip_serializing_if = "Option::is_none")] pub cause: Option, /// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. #[serde(rename = "causeDetail", skip_serializing_if = "Option::is_none")] pub cause_detail: Option, #[serde(rename = "effect", skip_serializing_if = "Option::is_none")] pub effect: Option, /// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. #[serde(rename = "effectDetail", skip_serializing_if = "Option::is_none")] pub effect_detail: Option, /// The URL which provides additional information about the alert. #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, /// Header for the alert. This plain-text string will be highlighted, for example in boldface. #[serde(rename = "headerText")] pub header_text: String, /// Description for the alert. This plain-text string will be formatted as the body of the alert (or shown on an explicit \"expand\" request by the user). The information in the description should add to the information of the header. #[serde(rename = "descriptionText")] pub description_text: String, /// Text containing the alert's header to be used for text-to-speech implementations. This field is the text-to-speech version of header_text. It should contain the same information as headerText but formatted such that it can read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) #[serde(rename = "ttsHeaderText", skip_serializing_if = "Option::is_none")] pub tts_header_text: Option, /// Text containing a description for the alert to be used for text-to-speech implementations. This field is the text-to-speech version of description_text. It should contain the same information as description_text but formatted such that it can be read as text-to-speech (for example, abbreviations removed, numbers spelled out, etc.) #[serde(rename = "ttsDescriptionText", skip_serializing_if = "Option::is_none")] pub tts_description_text: Option, /// Severity of the alert. #[serde(rename = "severityLevel", skip_serializing_if = "Option::is_none")] pub severity_level: Option, /// String containing an URL linking to an image. #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")] pub image_url: Option, /// IANA media type as to specify the type of image to be displayed. The type must start with \"image/\" #[serde(rename = "imageMediaType", skip_serializing_if = "Option::is_none")] pub image_media_type: Option, /// Text describing the appearance of the linked image in the image field (e.g., in case the image can't be displayed or the user can't see the image for accessibility reasons). See the HTML spec for alt image text. #[serde(rename = "imageAlternativeText", skip_serializing_if = "Option::is_none")] pub image_alternative_text: Option, } impl Alert { /// An alert, indicating some sort of incident in the public transit network. pub fn new(header_text: String, description_text: String) -> Alert { Alert { communication_period: None, impact_period: None, cause: None, cause_detail: None, effect: None, effect_detail: None, url: None, header_text, description_text, tts_header_text: None, tts_description_text: None, severity_level: None, image_url: None, image_media_type: None, image_alternative_text: None, } } } motis-openapi-sdk-5.0.0/src/models/alert_cause.rs000064400000000000000000000060151046102023000201020ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// AlertCause : Cause of this alert. /// Cause of this alert. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AlertCause { #[serde(rename = "UNKNOWN_CAUSE")] UnknownCause, #[serde(rename = "OTHER_CAUSE")] OtherCause, #[serde(rename = "TECHNICAL_PROBLEM")] TechnicalProblem, #[serde(rename = "STRIKE")] Strike, #[serde(rename = "DEMONSTRATION")] Demonstration, #[serde(rename = "ACCIDENT")] Accident, #[serde(rename = "HOLIDAY")] Holiday, #[serde(rename = "WEATHER")] Weather, #[serde(rename = "MAINTENANCE")] Maintenance, #[serde(rename = "CONSTRUCTION")] Construction, #[serde(rename = "POLICE_ACTIVITY")] PoliceActivity, #[serde(rename = "MEDICAL_EMERGENCY")] MedicalEmergency, } impl std::fmt::Display for AlertCause { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::UnknownCause => write!(f, "UNKNOWN_CAUSE"), Self::OtherCause => write!(f, "OTHER_CAUSE"), Self::TechnicalProblem => write!(f, "TECHNICAL_PROBLEM"), Self::Strike => write!(f, "STRIKE"), Self::Demonstration => write!(f, "DEMONSTRATION"), Self::Accident => write!(f, "ACCIDENT"), Self::Holiday => write!(f, "HOLIDAY"), Self::Weather => write!(f, "WEATHER"), Self::Maintenance => write!(f, "MAINTENANCE"), Self::Construction => write!(f, "CONSTRUCTION"), Self::PoliceActivity => write!(f, "POLICE_ACTIVITY"), Self::MedicalEmergency => write!(f, "MEDICAL_EMERGENCY"), } } } impl Default for AlertCause { fn default() -> AlertCause { Self::UnknownCause } } motis-openapi-sdk-5.0.0/src/models/alert_effect.rs000064400000000000000000000060441046102023000202400ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// AlertEffect : The effect of this problem on the affected entity. /// The effect of this problem on the affected entity. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AlertEffect { #[serde(rename = "NO_SERVICE")] NoService, #[serde(rename = "REDUCED_SERVICE")] ReducedService, #[serde(rename = "SIGNIFICANT_DELAYS")] SignificantDelays, #[serde(rename = "DETOUR")] Detour, #[serde(rename = "ADDITIONAL_SERVICE")] AdditionalService, #[serde(rename = "MODIFIED_SERVICE")] ModifiedService, #[serde(rename = "OTHER_EFFECT")] OtherEffect, #[serde(rename = "UNKNOWN_EFFECT")] UnknownEffect, #[serde(rename = "STOP_MOVED")] StopMoved, #[serde(rename = "NO_EFFECT")] NoEffect, #[serde(rename = "ACCESSIBILITY_ISSUE")] AccessibilityIssue, } impl std::fmt::Display for AlertEffect { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::NoService => write!(f, "NO_SERVICE"), Self::ReducedService => write!(f, "REDUCED_SERVICE"), Self::SignificantDelays => write!(f, "SIGNIFICANT_DELAYS"), Self::Detour => write!(f, "DETOUR"), Self::AdditionalService => write!(f, "ADDITIONAL_SERVICE"), Self::ModifiedService => write!(f, "MODIFIED_SERVICE"), Self::OtherEffect => write!(f, "OTHER_EFFECT"), Self::UnknownEffect => write!(f, "UNKNOWN_EFFECT"), Self::StopMoved => write!(f, "STOP_MOVED"), Self::NoEffect => write!(f, "NO_EFFECT"), Self::AccessibilityIssue => write!(f, "ACCESSIBILITY_ISSUE"), } } } impl Default for AlertEffect { fn default() -> AlertEffect { Self::NoService } } motis-openapi-sdk-5.0.0/src/models/alert_severity_level.rs000064400000000000000000000042041046102023000220410ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// AlertSeverityLevel : The severity of the alert. /// The severity of the alert. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AlertSeverityLevel { #[serde(rename = "UNKNOWN_SEVERITY")] UnknownSeverity, #[serde(rename = "INFO")] Info, #[serde(rename = "WARNING")] Warning, #[serde(rename = "SEVERE")] Severe, } impl std::fmt::Display for AlertSeverityLevel { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::UnknownSeverity => write!(f, "UNKNOWN_SEVERITY"), Self::Info => write!(f, "INFO"), Self::Warning => write!(f, "WARNING"), Self::Severe => write!(f, "SEVERE"), } } } impl Default for AlertSeverityLevel { fn default() -> AlertSeverityLevel { Self::UnknownSeverity } } motis-openapi-sdk-5.0.0/src/models/area.rs000064400000000000000000000047131046102023000165260ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Area : Administrative area #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Area { /// Name of the area #[serde(rename = "name")] pub name: String, /// [OpenStreetMap `admin_level`](https://wiki.openstreetmap.org/wiki/Key:admin_level) of the area #[serde(rename = "adminLevel")] pub admin_level: f64, /// Whether this area was matched by the input text #[serde(rename = "matched")] pub matched: bool, /// Set for the first area after the `default` area that distinguishes areas if the match is ambiguous regarding (`default` area + place name / street [+ house number]). #[serde(rename = "unique", skip_serializing_if = "Option::is_none")] pub unique: Option, /// Whether this area should be displayed as default area (area with admin level closest 7) #[serde(rename = "default", skip_serializing_if = "Option::is_none")] pub default: Option, } impl Area { /// Administrative area pub fn new(name: String, admin_level: f64, matched: bool) -> Area { Area { name, admin_level, matched, unique: None, default: None, } } } motis-openapi-sdk-5.0.0/src/models/direction.rs000064400000000000000000000061451046102023000175770ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Direction { #[serde(rename = "DEPART")] Depart, #[serde(rename = "HARD_LEFT")] HardLeft, #[serde(rename = "LEFT")] Left, #[serde(rename = "SLIGHTLY_LEFT")] SlightlyLeft, #[serde(rename = "CONTINUE")] Continue, #[serde(rename = "SLIGHTLY_RIGHT")] SlightlyRight, #[serde(rename = "RIGHT")] Right, #[serde(rename = "HARD_RIGHT")] HardRight, #[serde(rename = "CIRCLE_CLOCKWISE")] CircleClockwise, #[serde(rename = "CIRCLE_COUNTERCLOCKWISE")] CircleCounterclockwise, #[serde(rename = "STAIRS")] Stairs, #[serde(rename = "ELEVATOR")] Elevator, #[serde(rename = "UTURN_LEFT")] UturnLeft, #[serde(rename = "UTURN_RIGHT")] UturnRight, } impl std::fmt::Display for Direction { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Depart => write!(f, "DEPART"), Self::HardLeft => write!(f, "HARD_LEFT"), Self::Left => write!(f, "LEFT"), Self::SlightlyLeft => write!(f, "SLIGHTLY_LEFT"), Self::Continue => write!(f, "CONTINUE"), Self::SlightlyRight => write!(f, "SLIGHTLY_RIGHT"), Self::Right => write!(f, "RIGHT"), Self::HardRight => write!(f, "HARD_RIGHT"), Self::CircleClockwise => write!(f, "CIRCLE_CLOCKWISE"), Self::CircleCounterclockwise => write!(f, "CIRCLE_COUNTERCLOCKWISE"), Self::Stairs => write!(f, "STAIRS"), Self::Elevator => write!(f, "ELEVATOR"), Self::UturnLeft => write!(f, "UTURN_LEFT"), Self::UturnRight => write!(f, "UTURN_RIGHT"), } } } impl Default for Direction { fn default() -> Direction { Self::Depart } } motis-openapi-sdk-5.0.0/src/models/duration.rs000064400000000000000000000034641046102023000174450ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Duration : Object containing duration if a path was found or none if no path was found #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Duration { /// duration in seconds if a path was found, otherwise missing #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, } impl Duration { /// Object containing duration if a path was found or none if no path was found pub fn new() -> Duration { Duration { duration: None, } } } motis-openapi-sdk-5.0.0/src/models/elevation_costs.rs000064400000000000000000000056561046102023000210260ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// ElevationCosts : Different elevation cost profiles for street routing. Using a elevation cost profile will prefer routes with a smaller incline and smaller difference in elevation, even if the routed way is longer. - `NONE`: Ignore elevation data for routing. This is the default behavior - `LOW`: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller. - `HIGH`: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller. /// Different elevation cost profiles for street routing. Using a elevation cost profile will prefer routes with a smaller incline and smaller difference in elevation, even if the routed way is longer. - `NONE`: Ignore elevation data for routing. This is the default behavior - `LOW`: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller. - `HIGH`: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ElevationCosts { #[serde(rename = "NONE")] None, #[serde(rename = "LOW")] Low, #[serde(rename = "HIGH")] High, } impl std::fmt::Display for ElevationCosts { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::None => write!(f, "NONE"), Self::Low => write!(f, "LOW"), Self::High => write!(f, "HIGH"), } } } impl Default for ElevationCosts { fn default() -> ElevationCosts { Self::None } } motis-openapi-sdk-5.0.0/src/models/encoded_polyline.rs000064400000000000000000000040161046102023000211260ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct EncodedPolyline { /// The encoded points of the polyline using the Google polyline encoding. #[serde(rename = "points")] pub points: String, /// The precision of the returned polyline (7 for /v1, 6 for /v2) Be aware that with precision 7, coordinates with |longitude| > 107.37 are undefined/will overflow. #[serde(rename = "precision")] pub precision: i32, /// The number of points in the string #[serde(rename = "length")] pub length: i32, } impl EncodedPolyline { pub fn new(points: String, precision: i32, length: i32) -> EncodedPolyline { EncodedPolyline { points, precision, length, } } } motis-openapi-sdk-5.0.0/src/models/error.rs000064400000000000000000000030601046102023000167410ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Error { #[serde(rename = "error", skip_serializing_if = "Option::is_none")] pub error: Option, } impl Error { pub fn new() -> Error { Error { error: None, } } } motis-openapi-sdk-5.0.0/src/models/fare_media.rs000064400000000000000000000035421046102023000176710ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FareMedia { /// Name of the fare media. Required for transit cards and mobile apps. #[serde(rename = "fareMediaName", skip_serializing_if = "Option::is_none")] pub fare_media_name: Option, /// The type of fare media. #[serde(rename = "fareMediaType")] pub fare_media_type: models::FareMediaType, } impl FareMedia { pub fn new(fare_media_type: models::FareMediaType) -> FareMedia { FareMedia { fare_media_name: None, fare_media_type, } } } motis-openapi-sdk-5.0.0/src/models/fare_media_type.rs000064400000000000000000000053051046102023000207310ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// FareMediaType : - `NONE`: No fare media involved (e.g., cash payment) - `PAPER_TICKET`: Physical paper ticket - `TRANSIT_CARD`: Physical transit card with stored value - `CONTACTLESS_EMV`: cEMV (contactless payment) - `MOBILE_APP`: Mobile app with virtual transit cards/passes /// - `NONE`: No fare media involved (e.g., cash payment) - `PAPER_TICKET`: Physical paper ticket - `TRANSIT_CARD`: Physical transit card with stored value - `CONTACTLESS_EMV`: cEMV (contactless payment) - `MOBILE_APP`: Mobile app with virtual transit cards/passes #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum FareMediaType { #[serde(rename = "NONE")] None, #[serde(rename = "PAPER_TICKET")] PaperTicket, #[serde(rename = "TRANSIT_CARD")] TransitCard, #[serde(rename = "CONTACTLESS_EMV")] ContactlessEmv, #[serde(rename = "MOBILE_APP")] MobileApp, } impl std::fmt::Display for FareMediaType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::None => write!(f, "NONE"), Self::PaperTicket => write!(f, "PAPER_TICKET"), Self::TransitCard => write!(f, "TRANSIT_CARD"), Self::ContactlessEmv => write!(f, "CONTACTLESS_EMV"), Self::MobileApp => write!(f, "MOBILE_APP"), } } } impl Default for FareMediaType { fn default() -> FareMediaType { Self::None } } motis-openapi-sdk-5.0.0/src/models/fare_product.rs000064400000000000000000000044521046102023000202730ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FareProduct { /// The name of the fare product as displayed to riders. #[serde(rename = "name")] pub name: String, /// The cost of the fare product. May be negative to represent transfer discounts. May be zero to represent a fare product that is free. #[serde(rename = "amount")] pub amount: f64, /// ISO 4217 currency code. The currency of the cost of the fare product. #[serde(rename = "currency")] pub currency: String, #[serde(rename = "riderCategory", skip_serializing_if = "Option::is_none")] pub rider_category: Option>, #[serde(rename = "media", skip_serializing_if = "Option::is_none")] pub media: Option>, } impl FareProduct { pub fn new(name: String, amount: f64, currency: String) -> FareProduct { FareProduct { name, amount, currency, rider_category: None, media: None, } } } motis-openapi-sdk-5.0.0/src/models/fare_transfer.rs000064400000000000000000000130401046102023000204300ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// FareTransfer : The concept is derived from: https://gtfs.org/documentation/schedule/reference/#fare_transfer_rulestxt Terminology: - **Leg**: An itinerary leg as described by the `Leg` type of this API description. - **Effective Fare Leg**: Itinerary legs can be joined together to form one *effective fare leg*. - **Fare Transfer**: A fare transfer groups two or more effective fare legs. - **A** is the first *effective fare leg* of potentially multiple consecutive legs contained in a fare transfer - **B** is any *effective fare leg* following the first *effective fare leg* in this transfer - **AB** are all changes between *effective fare legs* contained in this transfer The fare transfer rule is used to derive the final set of products of the itinerary legs contained in this transfer: - A_AB means that any product from the first effective fare leg combined with the product attached to the transfer itself (AB) which can be empty (= free). Note that all subsequent effective fare leg products need to be ignored in this case. - A_AB_B mean that a product for each effective fare leg needs to be purchased in a addition to the product attached to the transfer itself (AB) which can be empty (= free) - AB only the transfer product itself has to be purchased. Note that all fare products attached to the contained effective fare legs need to be ignored in this case. An itinerary `Leg` references the index of the fare transfer and the index of the effective fare leg in this transfer it belongs to. #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FareTransfer { #[serde(rename = "rule", skip_serializing_if = "Option::is_none")] pub rule: Option, #[serde(rename = "transferProducts", skip_serializing_if = "Option::is_none")] pub transfer_products: Option>, /// Lists all valid fare products for the effective fare legs. This is an `array>` where the inner array lists all possible fare products that would cover this effective fare leg. Each \"effective fare leg\" can have multiple options for adult/child/weekly/monthly/day/one-way tickets etc. You can see the outer array as AND (you need one ticket for each effective fare leg (`A_AB_B`), the first effective fare leg (`A_AB`) or no fare leg at all but only the transfer product (`AB`) and the inner array as OR (you can choose which ticket to buy) #[serde(rename = "effectiveFareLegProducts")] pub effective_fare_leg_products: Vec>>, } impl FareTransfer { /// The concept is derived from: https://gtfs.org/documentation/schedule/reference/#fare_transfer_rulestxt Terminology: - **Leg**: An itinerary leg as described by the `Leg` type of this API description. - **Effective Fare Leg**: Itinerary legs can be joined together to form one *effective fare leg*. - **Fare Transfer**: A fare transfer groups two or more effective fare legs. - **A** is the first *effective fare leg* of potentially multiple consecutive legs contained in a fare transfer - **B** is any *effective fare leg* following the first *effective fare leg* in this transfer - **AB** are all changes between *effective fare legs* contained in this transfer The fare transfer rule is used to derive the final set of products of the itinerary legs contained in this transfer: - A_AB means that any product from the first effective fare leg combined with the product attached to the transfer itself (AB) which can be empty (= free). Note that all subsequent effective fare leg products need to be ignored in this case. - A_AB_B mean that a product for each effective fare leg needs to be purchased in a addition to the product attached to the transfer itself (AB) which can be empty (= free) - AB only the transfer product itself has to be purchased. Note that all fare products attached to the contained effective fare legs need to be ignored in this case. An itinerary `Leg` references the index of the fare transfer and the index of the effective fare leg in this transfer it belongs to. pub fn new(effective_fare_leg_products: Vec>>) -> FareTransfer { FareTransfer { rule: None, transfer_products: None, effective_fare_leg_products, } } } motis-openapi-sdk-5.0.0/src/models/fare_transfer_rule.rs000064400000000000000000000036051046102023000214650ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum FareTransferRule { #[serde(rename = "A_AB")] AAb, #[serde(rename = "A_AB_B")] AAbB, #[serde(rename = "AB")] Ab, } impl std::fmt::Display for FareTransferRule { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::AAb => write!(f, "A_AB"), Self::AAbB => write!(f, "A_AB_B"), Self::Ab => write!(f, "AB"), } } } impl Default for FareTransferRule { fn default() -> FareTransferRule { Self::AAb } } motis-openapi-sdk-5.0.0/src/models/footpath.rs000064400000000000000000000036411046102023000174410ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. * * The version of the OpenAPI document: v1 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Footpath : footpath from one location to another #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Footpath { #[serde(rename = "to")] pub to: Box, /// optional; missing if the GTFS did not contain a footpath footpath duration in minutes according to GTFS (+heuristics) #[serde(rename = "default", skip_serializing_if = "Option::is_none")] pub default: Option, /// optional; missing if no path was found (timetable / osr) footpath duration in minutes for the foot profile #[serde(rename = "foot", skip_serializing_if = "Option::is_none")] pub foot: Option, /// optional; missing if no path was found with foot routing footpath duration in minutes for the foot profile #[serde(rename = "footRouted", skip_serializing_if = "Option::is_none")] pub foot_routed: Option, /// optional; missing if no path was found with the wheelchair profile footpath duration in minutes for the wheelchair profile #[serde(rename = "wheelchair", skip_serializing_if = "Option::is_none")] pub wheelchair: Option, /// optional; missing if no path was found with the wheelchair profile true if the wheelchair path uses an elevator #[serde(rename = "wheelchairUsesElevator", skip_serializing_if = "Option::is_none")] pub wheelchair_uses_elevator: Option, } impl Footpath { /// footpath from one location to another pub fn new(to: models::Place) -> Footpath { Footpath { to: Box::new(to), default: None, foot: None, foot_routed: None, wheelchair: None, wheelchair_uses_elevator: None, } } } motis-openapi-sdk-5.0.0/src/models/footpaths_200_response.rs000064400000000000000000000014021046102023000221140ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. * * The version of the OpenAPI document: v1 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Footpaths200Response { #[serde(rename = "place")] pub place: Box, /// all outgoing footpaths of this location #[serde(rename = "footpaths")] pub footpaths: Vec, } impl Footpaths200Response { pub fn new(place: models::Place, footpaths: Vec) -> Footpaths200Response { Footpaths200Response { place: Box::new(place), footpaths, } } } motis-openapi-sdk-5.0.0/src/models/initial_200_response.rs000064400000000000000000000033721046102023000215460ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Initial200Response { /// latitude #[serde(rename = "lat")] pub lat: f64, /// longitude #[serde(rename = "lon")] pub lon: f64, /// zoom level #[serde(rename = "zoom")] pub zoom: f64, } impl Initial200Response { pub fn new(lat: f64, lon: f64, zoom: f64) -> Initial200Response { Initial200Response { lat, lon, zoom, } } } motis-openapi-sdk-5.0.0/src/models/itinerary.rs000064400000000000000000000044361046102023000176260ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Itinerary { /// journey duration in seconds #[serde(rename = "duration")] pub duration: i32, /// journey departure time #[serde(rename = "startTime")] pub start_time: String, /// journey arrival time #[serde(rename = "endTime")] pub end_time: String, /// The number of transfers this trip has. #[serde(rename = "transfers")] pub transfers: i32, /// Journey legs #[serde(rename = "legs")] pub legs: Vec, /// Fare information #[serde(rename = "fareTransfers", skip_serializing_if = "Option::is_none")] pub fare_transfers: Option>, } impl Itinerary { pub fn new(duration: i32, start_time: String, end_time: String, transfers: i32, legs: Vec) -> Itinerary { Itinerary { duration, start_time, end_time, transfers, legs, fare_transfers: None, } } } motis-openapi-sdk-5.0.0/src/models/leg.rs000064400000000000000000000204761046102023000163710ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Leg { /// Transport mode for this leg #[serde(rename = "mode")] pub mode: models::Mode, #[serde(rename = "from")] pub from: Box, #[serde(rename = "to")] pub to: Box, /// Leg duration in seconds If leg is footpath: The footpath duration is derived from the default footpath duration using the query parameters `transferTimeFactor` and `additionalTransferTime` as follows: `leg.duration = defaultDuration * transferTimeFactor + additionalTransferTime.` In case the defaultDuration is needed, it can be calculated by `defaultDuration = (leg.duration - additionalTransferTime) / transferTimeFactor`. Note that the default values are `transferTimeFactor = 1` and `additionalTransferTime = 0` in case they are not explicitly provided in the query. #[serde(rename = "duration")] pub duration: i32, /// leg departure time #[serde(rename = "startTime")] pub start_time: String, /// leg arrival time #[serde(rename = "endTime")] pub end_time: String, /// scheduled leg departure time #[serde(rename = "scheduledStartTime")] pub scheduled_start_time: String, /// scheduled leg arrival time #[serde(rename = "scheduledEndTime")] pub scheduled_end_time: String, /// Whether there is real-time data about this leg #[serde(rename = "realTime")] pub real_time: bool, /// Whether this leg was originally scheduled to run or is an additional service. Scheduled times will equal realtime times in this case. #[serde(rename = "scheduled")] pub scheduled: bool, /// For non-transit legs the distance traveled while traversing this leg in meters. #[serde(rename = "distance", skip_serializing_if = "Option::is_none")] pub distance: Option, /// For transit legs, if the rider should stay on the vehicle as it changes route names. #[serde(rename = "interlineWithPreviousLeg", skip_serializing_if = "Option::is_none")] pub interline_with_previous_leg: Option, /// For transit legs, the headsign of the bus or train being used. For non-transit legs, null #[serde(rename = "headsign", skip_serializing_if = "Option::is_none")] pub headsign: Option, /// final stop of this trip (can differ from headsign) #[serde(rename = "tripTo", skip_serializing_if = "Option::is_none")] pub trip_to: Option>, #[serde(rename = "routeColor", skip_serializing_if = "Option::is_none")] pub route_color: Option, #[serde(rename = "routeTextColor", skip_serializing_if = "Option::is_none")] pub route_text_color: Option, #[serde(rename = "routeType", skip_serializing_if = "Option::is_none")] pub route_type: Option, #[serde(rename = "agencyName", skip_serializing_if = "Option::is_none")] pub agency_name: Option, #[serde(rename = "agencyUrl", skip_serializing_if = "Option::is_none")] pub agency_url: Option, #[serde(rename = "agencyId", skip_serializing_if = "Option::is_none")] pub agency_id: Option, #[serde(rename = "tripId", skip_serializing_if = "Option::is_none")] pub trip_id: Option, #[serde(rename = "routeShortName", skip_serializing_if = "Option::is_none")] pub route_short_name: Option, #[serde(rename = "routeLongName", skip_serializing_if = "Option::is_none")] pub route_long_name: Option, #[serde(rename = "tripShortName", skip_serializing_if = "Option::is_none")] pub trip_short_name: Option, #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] pub display_name: Option, /// Whether this trip is cancelled #[serde(rename = "cancelled", skip_serializing_if = "Option::is_none")] pub cancelled: Option, /// Filename and line number where this trip is from #[serde(rename = "source", skip_serializing_if = "Option::is_none")] pub source: Option, /// For transit legs, intermediate stops between the Place where the leg originates and the Place where the leg ends. For non-transit legs, null. #[serde(rename = "intermediateStops", skip_serializing_if = "Option::is_none")] pub intermediate_stops: Option>, #[serde(rename = "legGeometry")] pub leg_geometry: Box, /// A series of turn by turn instructions used for walking, biking and driving. #[serde(rename = "steps", skip_serializing_if = "Option::is_none")] pub steps: Option>, #[serde(rename = "rental", skip_serializing_if = "Option::is_none")] pub rental: Option>, /// Index into `Itinerary.fareTransfers` array to identify which fare transfer this leg belongs to #[serde(rename = "fareTransferIndex", skip_serializing_if = "Option::is_none")] pub fare_transfer_index: Option, /// Index into the `Itinerary.fareTransfers[fareTransferIndex].effectiveFareLegProducts` array to identify which effective fare leg this itinerary leg belongs to #[serde(rename = "effectiveFareLegIndex", skip_serializing_if = "Option::is_none")] pub effective_fare_leg_index: Option, /// Alerts for this stop. #[serde(rename = "alerts", skip_serializing_if = "Option::is_none")] pub alerts: Option>, /// If set, this attribute indicates that this trip has been expanded beyond the feed end date (enabled by config flag `timetable.dataset.extend_calendar`) by looping active weekdays, e.g. from calendar.txt in GTFS. #[serde(rename = "loopedCalendarSince", skip_serializing_if = "Option::is_none")] pub looped_calendar_since: Option, } impl Leg { pub fn new(mode: models::Mode, from: models::Place, to: models::Place, duration: i32, start_time: String, end_time: String, scheduled_start_time: String, scheduled_end_time: String, real_time: bool, scheduled: bool, leg_geometry: models::EncodedPolyline) -> Leg { Leg { mode, from: Box::new(from), to: Box::new(to), duration, start_time, end_time, scheduled_start_time, scheduled_end_time, real_time, scheduled, distance: None, interline_with_previous_leg: None, headsign: None, trip_to: None, route_color: None, route_text_color: None, route_type: None, agency_name: None, agency_url: None, agency_id: None, trip_id: None, route_short_name: None, route_long_name: None, trip_short_name: None, display_name: None, cancelled: None, source: None, intermediate_stops: None, leg_geometry: Box::new(leg_geometry), steps: None, rental: None, fare_transfer_index: None, effective_fare_leg_index: None, alerts: None, looped_calendar_since: None, } } } motis-openapi-sdk-5.0.0/src/models/level_encoded_polyline.rs000064400000000000000000000021351046102023000223150ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. * * The version of the OpenAPI document: v1 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct LevelEncodedPolyline { /// level where this segment starts, based on OpenStreetMap data #[serde(rename = "fromLevel")] pub from_level: f64, /// level where this segment starts, based on OpenStreetMap data #[serde(rename = "toLevel")] pub to_level: f64, /// OpenStreetMap way index #[serde(rename = "osmWay", skip_serializing_if = "Option::is_none")] pub osm_way: Option, #[serde(rename = "polyline")] pub polyline: Box, } impl LevelEncodedPolyline { pub fn new(from_level: f64, to_level: f64, polyline: models::EncodedPolyline) -> LevelEncodedPolyline { LevelEncodedPolyline { from_level, to_level, osm_way: None, polyline: Box::new(polyline), } } } motis-openapi-sdk-5.0.0/src/models/location_type.rs000064400000000000000000000036751046102023000204750ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// LocationType : location type /// location type #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum LocationType { #[serde(rename = "ADDRESS")] Address, #[serde(rename = "PLACE")] Place, #[serde(rename = "STOP")] Stop, } impl std::fmt::Display for LocationType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Address => write!(f, "ADDRESS"), Self::Place => write!(f, "PLACE"), Self::Stop => write!(f, "STOP"), } } } impl Default for LocationType { fn default() -> LocationType { Self::Address } } motis-openapi-sdk-5.0.0/src/models/mod.rs000064400000000000000000000063261046102023000163770ustar 00000000000000pub mod alert; pub use self::alert::Alert; pub mod alert_cause; pub use self::alert_cause::AlertCause; pub mod alert_effect; pub use self::alert_effect::AlertEffect; pub mod alert_severity_level; pub use self::alert_severity_level::AlertSeverityLevel; pub mod area; pub use self::area::Area; pub mod direction; pub use self::direction::Direction; pub mod duration; pub use self::duration::Duration; pub mod elevation_costs; pub use self::elevation_costs::ElevationCosts; pub mod encoded_polyline; pub use self::encoded_polyline::EncodedPolyline; pub mod error; pub use self::error::Error; pub mod fare_media; pub use self::fare_media::FareMedia; pub mod fare_media_type; pub use self::fare_media_type::FareMediaType; pub mod fare_product; pub use self::fare_product::FareProduct; pub mod fare_transfer; pub use self::fare_transfer::FareTransfer; pub mod fare_transfer_rule; pub use self::fare_transfer_rule::FareTransferRule; pub mod initial_200_response; pub use self::initial_200_response::Initial200Response; pub mod itinerary; pub use self::itinerary::Itinerary; pub mod leg; pub use self::leg::Leg; pub mod location_type; pub use self::location_type::LocationType; pub mod model_match; pub use self::model_match::Match; pub mod mode; pub use self::mode::Mode; pub mod pedestrian_profile; pub use self::pedestrian_profile::PedestrianProfile; pub mod pickup_dropoff_type; pub use self::pickup_dropoff_type::PickupDropoffType; pub mod place; pub use self::place::Place; pub mod plan_200_response; pub use self::plan_200_response::Plan200Response; pub mod reachable; pub use self::reachable::Reachable; pub mod reachable_place; pub use self::reachable_place::ReachablePlace; pub mod rental; pub use self::rental::Rental; pub mod rental_form_factor; pub use self::rental_form_factor::RentalFormFactor; pub mod rental_propulsion_type; pub use self::rental_propulsion_type::RentalPropulsionType; pub mod rental_provider; pub use self::rental_provider::RentalProvider; pub mod rental_provider_group; pub use self::rental_provider_group::RentalProviderGroup; pub mod rental_return_constraint; pub use self::rental_return_constraint::RentalReturnConstraint; pub mod rental_station; pub use self::rental_station::RentalStation; pub mod rental_vehicle; pub use self::rental_vehicle::RentalVehicle; pub mod rental_vehicle_type; pub use self::rental_vehicle_type::RentalVehicleType; pub mod rental_zone; pub use self::rental_zone::RentalZone; pub mod rental_zone_restrictions; pub use self::rental_zone_restrictions::RentalZoneRestrictions; pub mod rentals_200_response; pub use self::rentals_200_response::Rentals200Response; pub mod rider_category; pub use self::rider_category::RiderCategory; pub mod step_instruction; pub use self::step_instruction::StepInstruction; pub mod stop_time; pub use self::stop_time::StopTime; pub mod stoptimes_200_response; pub use self::stoptimes_200_response::Stoptimes200Response; pub mod time_range; pub use self::time_range::TimeRange; pub mod transfer; pub use self::transfer::Transfer; pub mod transfers_200_response; pub use self::transfers_200_response::Transfers200Response; pub mod trip_info; pub use self::trip_info::TripInfo; pub mod trip_segment; pub use self::trip_segment::TripSegment; pub mod vertex_type; pub use self::vertex_type::VertexType; motis-openapi-sdk-5.0.0/src/models/mode.rs000064400000000000000000000204161046102023000165400ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Mode : # Street modes - `WALK` - `BIKE` - `RENTAL` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs. - `CAR` - `CAR_PARKING` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs. - `CAR_DROPOFF` Experimental. Expect unannounced breaking changes (without version bumps) for all perameters and returned structs. - `ODM` on-demand taxis from the Prima+ÖV Project - `RIDE_SHARING` ride sharing from the Prima+ÖV Project - `FLEX` flexible transports # Transit modes - `TRANSIT`: translates to `RAIL,TRAM,BUS,FERRY,AIRPLANE,COACH,CABLE_CAR,FUNICULAR,AREAL_LIFT,OTHER` - `TRAM`: trams - `SUBWAY`: subway trains (Paris Metro, London Underground, but also NYC Subway, Hamburger Hochbahn, and other non-underground services) - `FERRY`: ferries - `AIRPLANE`: airline flights - `BUS`: short distance buses (does not include `COACH`) - `COACH`: long distance buses (does not include `BUS`) - `RAIL`: translates to `HIGHSPEED_RAIL,LONG_DISTANCE,NIGHT_RAIL,REGIONAL_RAIL,REGIONAL_FAST_RAIL,SUBURBAN,SUBWAY` - `SUBURBAN`: suburban trains (e.g. S-Bahn, RER, Elizabeth Line, ...) - `HIGHSPEED_RAIL`: long distance high speed trains (e.g. TGV) - `LONG_DISTANCE`: long distance inter city trains - `NIGHT_RAIL`: long distance night trains - `REGIONAL_FAST_RAIL`: regional express routes that skip low traffic stops to be faster - `REGIONAL_RAIL`: regional train - `CABLE_CAR`: Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco). - `FUNICULAR`: Funicular. Any rail system designed for steep inclines. - `AERIAL_LIFT`: Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables. - `AREAL_LIFT`: deprecated - `METRO`: deprecated /// # Street modes - `WALK` - `BIKE` - `RENTAL` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs. - `CAR` - `CAR_PARKING` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs. - `CAR_DROPOFF` Experimental. Expect unannounced breaking changes (without version bumps) for all perameters and returned structs. - `ODM` on-demand taxis from the Prima+ÖV Project - `RIDE_SHARING` ride sharing from the Prima+ÖV Project - `FLEX` flexible transports # Transit modes - `TRANSIT`: translates to `RAIL,TRAM,BUS,FERRY,AIRPLANE,COACH,CABLE_CAR,FUNICULAR,AREAL_LIFT,OTHER` - `TRAM`: trams - `SUBWAY`: subway trains (Paris Metro, London Underground, but also NYC Subway, Hamburger Hochbahn, and other non-underground services) - `FERRY`: ferries - `AIRPLANE`: airline flights - `BUS`: short distance buses (does not include `COACH`) - `COACH`: long distance buses (does not include `BUS`) - `RAIL`: translates to `HIGHSPEED_RAIL,LONG_DISTANCE,NIGHT_RAIL,REGIONAL_RAIL,REGIONAL_FAST_RAIL,SUBURBAN,SUBWAY` - `SUBURBAN`: suburban trains (e.g. S-Bahn, RER, Elizabeth Line, ...) - `HIGHSPEED_RAIL`: long distance high speed trains (e.g. TGV) - `LONG_DISTANCE`: long distance inter city trains - `NIGHT_RAIL`: long distance night trains - `REGIONAL_FAST_RAIL`: regional express routes that skip low traffic stops to be faster - `REGIONAL_RAIL`: regional train - `CABLE_CAR`: Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco). - `FUNICULAR`: Funicular. Any rail system designed for steep inclines. - `AERIAL_LIFT`: Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables. - `AREAL_LIFT`: deprecated - `METRO`: deprecated #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Mode { #[serde(rename = "WALK")] Walk, #[serde(rename = "BIKE")] Bike, #[serde(rename = "RENTAL")] Rental, #[serde(rename = "CAR")] Car, #[serde(rename = "CAR_PARKING")] CarParking, #[serde(rename = "CAR_DROPOFF")] CarDropoff, #[serde(rename = "ODM")] Odm, #[serde(rename = "RIDE_SHARING")] RideSharing, #[serde(rename = "FLEX")] Flex, #[serde(rename = "TRANSIT")] Transit, #[serde(rename = "TRAM")] Tram, #[serde(rename = "SUBWAY")] Subway, #[serde(rename = "FERRY")] Ferry, #[serde(rename = "AIRPLANE")] Airplane, #[serde(rename = "SUBURBAN")] Suburban, #[serde(rename = "BUS")] Bus, #[serde(rename = "COACH")] Coach, #[serde(rename = "RAIL")] Rail, #[serde(rename = "HIGHSPEED_RAIL")] HighspeedRail, #[serde(rename = "LONG_DISTANCE")] LongDistance, #[serde(rename = "NIGHT_RAIL")] NightRail, #[serde(rename = "REGIONAL_FAST_RAIL")] RegionalFastRail, #[serde(rename = "REGIONAL_RAIL")] RegionalRail, #[serde(rename = "CABLE_CAR")] CableCar, #[serde(rename = "FUNICULAR")] Funicular, #[serde(rename = "AERIAL_LIFT")] AerialLift, #[serde(rename = "OTHER")] Other, #[serde(rename = "AREAL_LIFT")] ArealLift, #[serde(rename = "METRO")] Metro, } impl std::fmt::Display for Mode { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Walk => write!(f, "WALK"), Self::Bike => write!(f, "BIKE"), Self::Rental => write!(f, "RENTAL"), Self::Car => write!(f, "CAR"), Self::CarParking => write!(f, "CAR_PARKING"), Self::CarDropoff => write!(f, "CAR_DROPOFF"), Self::Odm => write!(f, "ODM"), Self::RideSharing => write!(f, "RIDE_SHARING"), Self::Flex => write!(f, "FLEX"), Self::Transit => write!(f, "TRANSIT"), Self::Tram => write!(f, "TRAM"), Self::Subway => write!(f, "SUBWAY"), Self::Ferry => write!(f, "FERRY"), Self::Airplane => write!(f, "AIRPLANE"), Self::Suburban => write!(f, "SUBURBAN"), Self::Bus => write!(f, "BUS"), Self::Coach => write!(f, "COACH"), Self::Rail => write!(f, "RAIL"), Self::HighspeedRail => write!(f, "HIGHSPEED_RAIL"), Self::LongDistance => write!(f, "LONG_DISTANCE"), Self::NightRail => write!(f, "NIGHT_RAIL"), Self::RegionalFastRail => write!(f, "REGIONAL_FAST_RAIL"), Self::RegionalRail => write!(f, "REGIONAL_RAIL"), Self::CableCar => write!(f, "CABLE_CAR"), Self::Funicular => write!(f, "FUNICULAR"), Self::AerialLift => write!(f, "AERIAL_LIFT"), Self::Other => write!(f, "OTHER"), Self::ArealLift => write!(f, "AREAL_LIFT"), Self::Metro => write!(f, "METRO"), } } } impl Default for Mode { fn default() -> Mode { Self::Walk } } motis-openapi-sdk-5.0.0/src/models/model_match.rs000064400000000000000000000102301046102023000200610ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Match : GeoCoding match #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Match { #[serde(rename = "type")] pub r#type: models::LocationType, /// Experimental. Type categories might be adjusted. For OSM stop locations: the amenity type based on https://wiki.openstreetmap.org/wiki/OpenStreetMap_Carto/Symbols #[serde(rename = "category", skip_serializing_if = "Option::is_none")] pub category: Option, /// list of non-overlapping tokens that were matched #[serde(rename = "tokens")] pub tokens: Vec>, /// name of the location (transit stop / PoI / address) #[serde(rename = "name")] pub name: String, /// unique ID of the location #[serde(rename = "id")] pub id: String, /// latitude #[serde(rename = "lat")] pub lat: f64, /// longitude #[serde(rename = "lon")] pub lon: f64, /// level according to OpenStreetMap (at the moment only for public transport) #[serde(rename = "level", skip_serializing_if = "Option::is_none")] pub level: Option, /// street name #[serde(rename = "street", skip_serializing_if = "Option::is_none")] pub street: Option, /// house number #[serde(rename = "houseNumber", skip_serializing_if = "Option::is_none")] pub house_number: Option, /// ISO3166-1 country code from OpenStreetMap #[serde(rename = "country", skip_serializing_if = "Option::is_none")] pub country: Option, /// zip code #[serde(rename = "zip", skip_serializing_if = "Option::is_none")] pub zip: Option, /// timezone name (e.g. \"Europe/Berlin\") #[serde(rename = "tz", skip_serializing_if = "Option::is_none")] pub tz: Option, /// list of areas #[serde(rename = "areas")] pub areas: Vec, /// score according to the internal scoring system (the scoring algorithm might change in the future) #[serde(rename = "score")] pub score: f64, /// available transport modes for stops #[serde(rename = "modes", skip_serializing_if = "Option::is_none")] pub modes: Option>, /// importance of a stop, normalized from [0, 1] #[serde(rename = "importance", skip_serializing_if = "Option::is_none")] pub importance: Option, } impl Match { /// GeoCoding match pub fn new(r#type: models::LocationType, tokens: Vec>, name: String, id: String, lat: f64, lon: f64, areas: Vec, score: f64) -> Match { Match { r#type, category: None, tokens, name, id, lat, lon, level: None, street: None, house_number: None, country: None, zip: None, tz: None, areas, score, modes: None, importance: None, } } } motis-openapi-sdk-5.0.0/src/models/pedestrian_profile.rs000064400000000000000000000037161046102023000214760ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// PedestrianProfile : Different accessibility profiles for pedestrians. /// Different accessibility profiles for pedestrians. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PedestrianProfile { #[serde(rename = "FOOT")] Foot, #[serde(rename = "WHEELCHAIR")] Wheelchair, } impl std::fmt::Display for PedestrianProfile { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Foot => write!(f, "FOOT"), Self::Wheelchair => write!(f, "WHEELCHAIR"), } } } impl Default for PedestrianProfile { fn default() -> PedestrianProfile { Self::Foot } } motis-openapi-sdk-5.0.0/src/models/pickup_dropoff_type.rs000064400000000000000000000040521046102023000216650ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// PickupDropoffType : - `NORMAL` - entry/exit is possible normally - `NOT_ALLOWED` - entry/exit is not allowed /// - `NORMAL` - entry/exit is possible normally - `NOT_ALLOWED` - entry/exit is not allowed #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PickupDropoffType { #[serde(rename = "NORMAL")] Normal, #[serde(rename = "NOT_ALLOWED")] NotAllowed, } impl std::fmt::Display for PickupDropoffType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Normal => write!(f, "NORMAL"), Self::NotAllowed => write!(f, "NOT_ALLOWED"), } } } impl Default for PickupDropoffType { fn default() -> PickupDropoffType { Self::Normal } } motis-openapi-sdk-5.0.0/src/models/place.rs000064400000000000000000000134411046102023000167000ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Place { /// name of the transit stop / PoI / address #[serde(rename = "name")] pub name: String, /// The ID of the stop. This is often something that users don't care about. #[serde(rename = "stopId", skip_serializing_if = "Option::is_none")] pub stop_id: Option, /// The importance of the stop between 0-1. #[serde(rename = "importance", skip_serializing_if = "Option::is_none")] pub importance: Option, /// latitude #[serde(rename = "lat")] pub lat: f64, /// longitude #[serde(rename = "lon")] pub lon: f64, /// level according to OpenStreetMap #[serde(rename = "level")] pub level: f64, /// timezone name (e.g. \"Europe/Berlin\") #[serde(rename = "tz", skip_serializing_if = "Option::is_none")] pub tz: Option, /// arrival time #[serde(rename = "arrival", skip_serializing_if = "Option::is_none")] pub arrival: Option, /// departure time #[serde(rename = "departure", skip_serializing_if = "Option::is_none")] pub departure: Option, /// scheduled arrival time #[serde(rename = "scheduledArrival", skip_serializing_if = "Option::is_none")] pub scheduled_arrival: Option, /// scheduled departure time #[serde(rename = "scheduledDeparture", skip_serializing_if = "Option::is_none")] pub scheduled_departure: Option, /// scheduled track from the static schedule timetable dataset #[serde(rename = "scheduledTrack", skip_serializing_if = "Option::is_none")] pub scheduled_track: Option, /// The current track/platform information, updated with real-time updates if available. Can be missing if neither real-time updates nor the schedule timetable contains track information. #[serde(rename = "track", skip_serializing_if = "Option::is_none")] pub track: Option, /// description of the location that provides more detailed information #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "vertexType", skip_serializing_if = "Option::is_none")] pub vertex_type: Option, /// Type of pickup. It could be disallowed due to schedule, skipped stops or cancellations. #[serde(rename = "pickupType", skip_serializing_if = "Option::is_none")] pub pickup_type: Option, /// Type of dropoff. It could be disallowed due to schedule, skipped stops or cancellations. #[serde(rename = "dropoffType", skip_serializing_if = "Option::is_none")] pub dropoff_type: Option, /// Whether this stop is cancelled due to the realtime situation. #[serde(rename = "cancelled", skip_serializing_if = "Option::is_none")] pub cancelled: Option, /// Alerts for this stop. #[serde(rename = "alerts", skip_serializing_if = "Option::is_none")] pub alerts: Option>, /// for `FLEX` transports, the flex location area or location group name #[serde(rename = "flex", skip_serializing_if = "Option::is_none")] pub flex: Option, /// for `FLEX` transports, the flex location area ID or location group ID #[serde(rename = "flexId", skip_serializing_if = "Option::is_none")] pub flex_id: Option, /// Time that on-demand service becomes available #[serde(rename = "flexStartPickupDropOffWindow", skip_serializing_if = "Option::is_none")] pub flex_start_pickup_drop_off_window: Option, /// Time that on-demand service ends #[serde(rename = "flexEndPickupDropOffWindow", skip_serializing_if = "Option::is_none")] pub flex_end_pickup_drop_off_window: Option, } impl Place { pub fn new(name: String, lat: f64, lon: f64, level: f64) -> Place { Place { name, stop_id: None, importance: None, lat, lon, level, tz: None, arrival: None, departure: None, scheduled_arrival: None, scheduled_departure: None, scheduled_track: None, track: None, description: None, vertex_type: None, pickup_type: None, dropoff_type: None, cancelled: None, alerts: None, flex: None, flex_id: None, flex_start_pickup_drop_off_window: None, flex_end_pickup_drop_off_window: None, } } } motis-openapi-sdk-5.0.0/src/models/plan_200_response.rs000064400000000000000000000070231046102023000210440ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Plan200Response { /// the routing query #[serde(rename = "requestParameters")] pub request_parameters: std::collections::HashMap, /// debug statistics #[serde(rename = "debugOutput")] pub debug_output: std::collections::HashMap, #[serde(rename = "from")] pub from: Box, #[serde(rename = "to")] pub to: Box, /// Direct trips by `WALK`, `BIKE`, `CAR`, etc. without time-dependency. The starting time (`arriveBy=false`) / arrival time (`arriveBy=true`) is always the queried `time` parameter (set to \\\"now\\\" if not set). But all `direct` connections are meant to be independent of absolute times. #[serde(rename = "direct")] pub direct: Vec, /// list of itineraries #[serde(rename = "itineraries")] pub itineraries: Vec, /// Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of itineraries departing BEFORE the first itinerary in the result for a depart after search. When using the default sort order the previous set of itineraries is inserted before the current result. #[serde(rename = "previousPageCursor")] pub previous_page_cursor: String, /// Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of itineraries departing AFTER the last itinerary in this result. #[serde(rename = "nextPageCursor")] pub next_page_cursor: String, } impl Plan200Response { pub fn new(request_parameters: std::collections::HashMap, debug_output: std::collections::HashMap, from: models::Place, to: models::Place, direct: Vec, itineraries: Vec, previous_page_cursor: String, next_page_cursor: String) -> Plan200Response { Plan200Response { request_parameters, debug_output, from: Box::new(from), to: Box::new(to), direct, itineraries, previous_page_cursor, next_page_cursor, } } } motis-openapi-sdk-5.0.0/src/models/reachable.rs000064400000000000000000000037061046102023000175250ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Reachable : Object containing all reachable places by One-to-All search #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Reachable { /// One location used in One-to-All search #[serde(rename = "one", skip_serializing_if = "Option::is_none")] pub one: Option>, /// List of locations reachable by One-to-All #[serde(rename = "all", skip_serializing_if = "Option::is_none")] pub all: Option>, } impl Reachable { /// Object containing all reachable places by One-to-All search pub fn new() -> Reachable { Reachable { one: None, all: None, } } } motis-openapi-sdk-5.0.0/src/models/reachable_place.rs000064400000000000000000000044221046102023000206650ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// ReachablePlace : Place reachable by One-to-All #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ReachablePlace { /// Place reached by One-to-All #[serde(rename = "place", skip_serializing_if = "Option::is_none")] pub place: Option>, /// Total travel duration #[serde(rename = "duration", skip_serializing_if = "Option::is_none")] pub duration: Option, /// k is the smallest number, for which a journey with the shortest duration and at most k-1 transfers exist. You can think of k as the number of connections used. In more detail: k=0: No connection, e.g. for the one location k=1: Direct connection k=2: Connection with 1 transfer #[serde(rename = "k", skip_serializing_if = "Option::is_none")] pub k: Option, } impl ReachablePlace { /// Place reachable by One-to-All pub fn new() -> ReachablePlace { ReachablePlace { place: None, duration: None, k: None, } } } motis-openapi-sdk-5.0.0/src/models/relative_direction.rs000064400000000000000000000040161046102023000214650ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. * * The version of the OpenAPI document: v1 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum RelativeDirection { #[serde(rename = "DEPART")] Depart, #[serde(rename = "HARD_LEFT")] HardLeft, #[serde(rename = "LEFT")] Left, #[serde(rename = "SLIGHTLY_LEFT")] SlightlyLeft, #[serde(rename = "CONTINUE")] Continue, #[serde(rename = "SLIGHTLY_RIGHT")] SlightlyRight, #[serde(rename = "RIGHT")] Right, #[serde(rename = "HARD_RIGHT")] HardRight, #[serde(rename = "CIRCLE_CLOCKWISE")] CircleClockwise, #[serde(rename = "CIRCLE_COUNTERCLOCKWISE")] CircleCounterclockwise, #[serde(rename = "ELEVATOR")] Elevator, #[serde(rename = "UTURN_LEFT")] UturnLeft, #[serde(rename = "UTURN_RIGHT")] UturnRight, } impl std::fmt::Display for RelativeDirection { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Depart => write!(f, "DEPART"), Self::HardLeft => write!(f, "HARD_LEFT"), Self::Left => write!(f, "LEFT"), Self::SlightlyLeft => write!(f, "SLIGHTLY_LEFT"), Self::Continue => write!(f, "CONTINUE"), Self::SlightlyRight => write!(f, "SLIGHTLY_RIGHT"), Self::Right => write!(f, "RIGHT"), Self::HardRight => write!(f, "HARD_RIGHT"), Self::CircleClockwise => write!(f, "CIRCLE_CLOCKWISE"), Self::CircleCounterclockwise => write!(f, "CIRCLE_COUNTERCLOCKWISE"), Self::Elevator => write!(f, "ELEVATOR"), Self::UturnLeft => write!(f, "UTURN_LEFT"), Self::UturnRight => write!(f, "UTURN_RIGHT"), } } } impl Default for RelativeDirection { fn default() -> RelativeDirection { Self::Depart } } motis-openapi-sdk-5.0.0/src/models/rental.rs000064400000000000000000000105271046102023000171030ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Rental : Vehicle rental #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Rental { /// Rental provider ID #[serde(rename = "providerId")] pub provider_id: String, /// Rental provider group ID #[serde(rename = "providerGroupId")] pub provider_group_id: String, /// Vehicle share system ID #[serde(rename = "systemId")] pub system_id: String, /// Vehicle share system name #[serde(rename = "systemName", skip_serializing_if = "Option::is_none")] pub system_name: Option, /// URL of the vehicle share system #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, /// Color associated with this provider, in hexadecimal RGB format (e.g. \"#FF0000\" for red). Can be empty. #[serde(rename = "color", skip_serializing_if = "Option::is_none")] pub color: Option, /// Name of the station #[serde(rename = "stationName", skip_serializing_if = "Option::is_none")] pub station_name: Option, /// Name of the station where the vehicle is picked up (empty for free floating vehicles) #[serde(rename = "fromStationName", skip_serializing_if = "Option::is_none")] pub from_station_name: Option, /// Name of the station where the vehicle is returned (empty for free floating vehicles) #[serde(rename = "toStationName", skip_serializing_if = "Option::is_none")] pub to_station_name: Option, /// Rental URI for Android (deep link to the specific station or vehicle) #[serde(rename = "rentalUriAndroid", skip_serializing_if = "Option::is_none")] pub rental_uri_android: Option, /// Rental URI for iOS (deep link to the specific station or vehicle) #[serde(rename = "rentalUriIOS", skip_serializing_if = "Option::is_none")] pub rental_uri_ios: Option, /// Rental URI for web (deep link to the specific station or vehicle) #[serde(rename = "rentalUriWeb", skip_serializing_if = "Option::is_none")] pub rental_uri_web: Option, #[serde(rename = "formFactor", skip_serializing_if = "Option::is_none")] pub form_factor: Option, #[serde(rename = "propulsionType", skip_serializing_if = "Option::is_none")] pub propulsion_type: Option, #[serde(rename = "returnConstraint", skip_serializing_if = "Option::is_none")] pub return_constraint: Option, } impl Rental { /// Vehicle rental pub fn new(provider_id: String, provider_group_id: String, system_id: String) -> Rental { Rental { provider_id, provider_group_id, system_id, system_name: None, url: None, color: None, station_name: None, from_station_name: None, to_station_name: None, rental_uri_android: None, rental_uri_ios: None, rental_uri_web: None, form_factor: None, propulsion_type: None, return_constraint: None, } } } motis-openapi-sdk-5.0.0/src/models/rental_form_factor.rs000064400000000000000000000045511046102023000214640ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum RentalFormFactor { #[serde(rename = "BICYCLE")] Bicycle, #[serde(rename = "CARGO_BICYCLE")] CargoBicycle, #[serde(rename = "CAR")] Car, #[serde(rename = "MOPED")] Moped, #[serde(rename = "SCOOTER_STANDING")] ScooterStanding, #[serde(rename = "SCOOTER_SEATED")] ScooterSeated, #[serde(rename = "OTHER")] Other, } impl std::fmt::Display for RentalFormFactor { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Bicycle => write!(f, "BICYCLE"), Self::CargoBicycle => write!(f, "CARGO_BICYCLE"), Self::Car => write!(f, "CAR"), Self::Moped => write!(f, "MOPED"), Self::ScooterStanding => write!(f, "SCOOTER_STANDING"), Self::ScooterSeated => write!(f, "SCOOTER_SEATED"), Self::Other => write!(f, "OTHER"), } } } impl Default for RentalFormFactor { fn default() -> RentalFormFactor { Self::Bicycle } } motis-openapi-sdk-5.0.0/src/models/rental_propulsion_type.rs000064400000000000000000000050561046102023000224370ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum RentalPropulsionType { #[serde(rename = "HUMAN")] Human, #[serde(rename = "ELECTRIC_ASSIST")] ElectricAssist, #[serde(rename = "ELECTRIC")] Electric, #[serde(rename = "COMBUSTION")] Combustion, #[serde(rename = "COMBUSTION_DIESEL")] CombustionDiesel, #[serde(rename = "HYBRID")] Hybrid, #[serde(rename = "PLUG_IN_HYBRID")] PlugInHybrid, #[serde(rename = "HYDROGEN_FUEL_CELL")] HydrogenFuelCell, } impl std::fmt::Display for RentalPropulsionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Human => write!(f, "HUMAN"), Self::ElectricAssist => write!(f, "ELECTRIC_ASSIST"), Self::Electric => write!(f, "ELECTRIC"), Self::Combustion => write!(f, "COMBUSTION"), Self::CombustionDiesel => write!(f, "COMBUSTION_DIESEL"), Self::Hybrid => write!(f, "HYBRID"), Self::PlugInHybrid => write!(f, "PLUG_IN_HYBRID"), Self::HydrogenFuelCell => write!(f, "HYDROGEN_FUEL_CELL"), } } } impl Default for RentalPropulsionType { fn default() -> RentalPropulsionType { Self::Human } } motis-openapi-sdk-5.0.0/src/models/rental_provider.rs000064400000000000000000000072311046102023000210130ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalProvider { /// Unique identifier of the rental provider #[serde(rename = "id")] pub id: String, /// Name of the provider to be displayed to customers #[serde(rename = "name")] pub name: String, /// Id of the rental provider group this provider belongs to #[serde(rename = "groupId")] pub group_id: String, /// Name of the system operator #[serde(rename = "operator", skip_serializing_if = "Option::is_none")] pub operator: Option, /// URL of the vehicle share system #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, /// URL where a customer can purchase a membership #[serde(rename = "purchaseUrl", skip_serializing_if = "Option::is_none")] pub purchase_url: Option, /// Color associated with this provider, in hexadecimal RGB format (e.g. \"#FF0000\" for red). Can be empty. #[serde(rename = "color", skip_serializing_if = "Option::is_none")] pub color: Option, /// Bounding box of the area covered by this rental provider, [west, south, east, north] as [lon, lat, lon, lat] #[serde(rename = "bbox")] pub bbox: Vec, #[serde(rename = "vehicleTypes")] pub vehicle_types: Vec, /// List of form factors offered by this provider #[serde(rename = "formFactors")] pub form_factors: Vec, #[serde(rename = "defaultRestrictions")] pub default_restrictions: Box, #[serde(rename = "globalGeofencingRules")] pub global_geofencing_rules: Vec, } impl RentalProvider { pub fn new(id: String, name: String, group_id: String, bbox: Vec, vehicle_types: Vec, form_factors: Vec, default_restrictions: models::RentalZoneRestrictions, global_geofencing_rules: Vec) -> RentalProvider { RentalProvider { id, name, group_id, operator: None, url: None, purchase_url: None, color: None, bbox, vehicle_types, form_factors, default_restrictions: Box::new(default_restrictions), global_geofencing_rules, } } } motis-openapi-sdk-5.0.0/src/models/rental_provider_group.rs000064400000000000000000000046021046102023000222260ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalProviderGroup { /// Unique identifier of the rental provider group #[serde(rename = "id")] pub id: String, /// Name of the provider group to be displayed to customers #[serde(rename = "name")] pub name: String, /// Color associated with this provider group, in hexadecimal RGB format (e.g. \"#FF0000\" for red). Can be empty. #[serde(rename = "color", skip_serializing_if = "Option::is_none")] pub color: Option, /// List of rental provider IDs that belong to this group #[serde(rename = "providers")] pub providers: Vec, /// List of form factors offered by this provider group #[serde(rename = "formFactors")] pub form_factors: Vec, } impl RentalProviderGroup { pub fn new(id: String, name: String, providers: Vec, form_factors: Vec) -> RentalProviderGroup { RentalProviderGroup { id, name, color: None, providers, form_factors, } } } motis-openapi-sdk-5.0.0/src/models/rental_return_constraint.rs000064400000000000000000000037601046102023000227470ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum RentalReturnConstraint { #[serde(rename = "NONE")] None, #[serde(rename = "ANY_STATION")] AnyStation, #[serde(rename = "ROUNDTRIP_STATION")] RoundtripStation, } impl std::fmt::Display for RentalReturnConstraint { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::None => write!(f, "NONE"), Self::AnyStation => write!(f, "ANY_STATION"), Self::RoundtripStation => write!(f, "ROUNDTRIP_STATION"), } } } impl Default for RentalReturnConstraint { fn default() -> RentalReturnConstraint { Self::None } } motis-openapi-sdk-5.0.0/src/models/rental_station.rs000064400000000000000000000124611046102023000206430ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalStation { /// Unique identifier of the rental station #[serde(rename = "id")] pub id: String, /// Unique identifier of the rental provider #[serde(rename = "providerId")] pub provider_id: String, /// Unique identifier of the rental provider group #[serde(rename = "providerGroupId")] pub provider_group_id: String, /// Public name of the station #[serde(rename = "name")] pub name: String, /// latitude #[serde(rename = "lat")] pub lat: f64, /// longitude #[serde(rename = "lon")] pub lon: f64, /// Address where the station is located #[serde(rename = "address", skip_serializing_if = "Option::is_none")] pub address: Option, /// Cross street or landmark where the station is located #[serde(rename = "crossStreet", skip_serializing_if = "Option::is_none")] pub cross_street: Option, /// Rental URI for Android (deep link to the specific station) #[serde(rename = "rentalUriAndroid", skip_serializing_if = "Option::is_none")] pub rental_uri_android: Option, /// Rental URI for iOS (deep link to the specific station) #[serde(rename = "rentalUriIOS", skip_serializing_if = "Option::is_none")] pub rental_uri_ios: Option, /// Rental URI for web (deep link to the specific station) #[serde(rename = "rentalUriWeb", skip_serializing_if = "Option::is_none")] pub rental_uri_web: Option, /// true if vehicles can be rented from this station, false if it is temporarily out of service #[serde(rename = "isRenting")] pub is_renting: bool, /// true if vehicles can be returned to this station, false if it is temporarily out of service #[serde(rename = "isReturning")] pub is_returning: bool, /// Number of vehicles available for rental at this station #[serde(rename = "numVehiclesAvailable")] pub num_vehicles_available: i32, /// List of form factors available for rental and/or return at this station #[serde(rename = "formFactors")] pub form_factors: Vec, /// List of vehicle types currently available at this station (vehicle type ID -> count) #[serde(rename = "vehicleTypesAvailable")] pub vehicle_types_available: std::collections::HashMap, /// List of vehicle docks currently available at this station (vehicle type ID -> count) #[serde(rename = "vehicleDocksAvailable")] pub vehicle_docks_available: std::collections::HashMap, /// A multi-polygon contains a number of polygons, each containing a number of rings, which are encoded as polylines (with precision 6). For each polygon, the first ring is the outer ring, all subsequent rings are inner rings (holes). #[serde(rename = "stationArea", skip_serializing_if = "Option::is_none")] pub station_area: Option>>, /// Bounding box of the area covered by this station, [west, south, east, north] as [lon, lat, lon, lat] #[serde(rename = "bbox")] pub bbox: Vec, } impl RentalStation { pub fn new(id: String, provider_id: String, provider_group_id: String, name: String, lat: f64, lon: f64, is_renting: bool, is_returning: bool, num_vehicles_available: i32, form_factors: Vec, vehicle_types_available: std::collections::HashMap, vehicle_docks_available: std::collections::HashMap, bbox: Vec) -> RentalStation { RentalStation { id, provider_id, provider_group_id, name, lat, lon, address: None, cross_street: None, rental_uri_android: None, rental_uri_ios: None, rental_uri_web: None, is_renting, is_returning, num_vehicles_available, form_factors, vehicle_types_available, vehicle_docks_available, station_area: None, bbox, } } } motis-openapi-sdk-5.0.0/src/models/rental_vehicle.rs000064400000000000000000000102201046102023000205700ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalVehicle { /// Unique identifier of the rental vehicle #[serde(rename = "id")] pub id: String, /// Unique identifier of the rental provider #[serde(rename = "providerId")] pub provider_id: String, /// Unique identifier of the rental provider group #[serde(rename = "providerGroupId")] pub provider_group_id: String, /// Vehicle type ID (unique within the provider) #[serde(rename = "typeId")] pub type_id: String, /// latitude #[serde(rename = "lat")] pub lat: f64, /// longitude #[serde(rename = "lon")] pub lon: f64, #[serde(rename = "formFactor")] pub form_factor: models::RentalFormFactor, #[serde(rename = "propulsionType")] pub propulsion_type: models::RentalPropulsionType, #[serde(rename = "returnConstraint")] pub return_constraint: models::RentalReturnConstraint, /// Station ID if the vehicle is currently at a station #[serde(rename = "stationId", skip_serializing_if = "Option::is_none")] pub station_id: Option, /// Station ID where the vehicle must be returned, if applicable #[serde(rename = "homeStationId", skip_serializing_if = "Option::is_none")] pub home_station_id: Option, /// true if the vehicle is currently reserved by a customer, false otherwise #[serde(rename = "isReserved")] pub is_reserved: bool, /// true if the vehicle is out of service, false otherwise #[serde(rename = "isDisabled")] pub is_disabled: bool, /// Rental URI for Android (deep link to the specific vehicle) #[serde(rename = "rentalUriAndroid", skip_serializing_if = "Option::is_none")] pub rental_uri_android: Option, /// Rental URI for iOS (deep link to the specific vehicle) #[serde(rename = "rentalUriIOS", skip_serializing_if = "Option::is_none")] pub rental_uri_ios: Option, /// Rental URI for web (deep link to the specific vehicle) #[serde(rename = "rentalUriWeb", skip_serializing_if = "Option::is_none")] pub rental_uri_web: Option, } impl RentalVehicle { pub fn new(id: String, provider_id: String, provider_group_id: String, type_id: String, lat: f64, lon: f64, form_factor: models::RentalFormFactor, propulsion_type: models::RentalPropulsionType, return_constraint: models::RentalReturnConstraint, is_reserved: bool, is_disabled: bool) -> RentalVehicle { RentalVehicle { id, provider_id, provider_group_id, type_id, lat, lon, form_factor, propulsion_type, return_constraint, station_id: None, home_station_id: None, is_reserved, is_disabled, rental_uri_android: None, rental_uri_ios: None, rental_uri_web: None, } } } motis-openapi-sdk-5.0.0/src/models/rental_vehicle_type.rs000064400000000000000000000050441046102023000216410ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalVehicleType { /// Unique identifier of the vehicle type (unique within the provider) #[serde(rename = "id")] pub id: String, /// Public name of the vehicle type (can be empty) #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(rename = "formFactor")] pub form_factor: models::RentalFormFactor, #[serde(rename = "propulsionType")] pub propulsion_type: models::RentalPropulsionType, #[serde(rename = "returnConstraint")] pub return_constraint: models::RentalReturnConstraint, /// Whether the return constraint was guessed instead of being specified by the rental provider #[serde(rename = "returnConstraintGuessed")] pub return_constraint_guessed: bool, } impl RentalVehicleType { pub fn new(id: String, form_factor: models::RentalFormFactor, propulsion_type: models::RentalPropulsionType, return_constraint: models::RentalReturnConstraint, return_constraint_guessed: bool) -> RentalVehicleType { RentalVehicleType { id, name: None, form_factor, propulsion_type, return_constraint, return_constraint_guessed, } } } motis-openapi-sdk-5.0.0/src/models/rental_zone.rs000064400000000000000000000054371046102023000201420ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalZone { /// Unique identifier of the rental provider #[serde(rename = "providerId")] pub provider_id: String, /// Unique identifier of the rental provider group #[serde(rename = "providerGroupId")] pub provider_group_id: String, /// Public name of the geofencing zone #[serde(rename = "name", skip_serializing_if = "Option::is_none")] pub name: Option, /// Zone precedence / z-index (higher number = higher precedence) #[serde(rename = "z")] pub z: i32, /// Bounding box of the area covered by this zone, [west, south, east, north] as [lon, lat, lon, lat] #[serde(rename = "bbox")] pub bbox: Vec, /// A multi-polygon contains a number of polygons, each containing a number of rings, which are encoded as polylines (with precision 6). For each polygon, the first ring is the outer ring, all subsequent rings are inner rings (holes). #[serde(rename = "area")] pub area: Vec>, #[serde(rename = "rules")] pub rules: Vec, } impl RentalZone { pub fn new(provider_id: String, provider_group_id: String, z: i32, bbox: Vec, area: Vec>, rules: Vec) -> RentalZone { RentalZone { provider_id, provider_group_id, name: None, z, bbox, area, rules, } } } motis-openapi-sdk-5.0.0/src/models/rental_zone_restrictions.rs000064400000000000000000000051341046102023000227440ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RentalZoneRestrictions { /// List of vehicle types (as indices into the provider's vehicle types array) to which these restrictions apply. If empty, the restrictions apply to all vehicle types of the provider. #[serde(rename = "vehicleTypeIdxs")] pub vehicle_type_idxs: Vec, /// whether the ride is allowed to start in this zone #[serde(rename = "rideStartAllowed")] pub ride_start_allowed: bool, /// whether the ride is allowed to end in this zone #[serde(rename = "rideEndAllowed")] pub ride_end_allowed: bool, /// whether the ride is allowed to pass through this zone #[serde(rename = "rideThroughAllowed")] pub ride_through_allowed: bool, /// whether vehicles can only be parked at stations in this zone #[serde(rename = "stationParking", skip_serializing_if = "Option::is_none")] pub station_parking: Option, } impl RentalZoneRestrictions { pub fn new(vehicle_type_idxs: Vec, ride_start_allowed: bool, ride_end_allowed: bool, ride_through_allowed: bool) -> RentalZoneRestrictions { RentalZoneRestrictions { vehicle_type_idxs, ride_start_allowed, ride_end_allowed, ride_through_allowed, station_parking: None, } } } motis-openapi-sdk-5.0.0/src/models/rentals_200_response.rs000064400000000000000000000042711046102023000215640ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Rentals200Response { #[serde(rename = "providerGroups")] pub provider_groups: Vec, #[serde(rename = "providers")] pub providers: Vec, #[serde(rename = "stations")] pub stations: Vec, #[serde(rename = "vehicles")] pub vehicles: Vec, #[serde(rename = "zones")] pub zones: Vec, } impl Rentals200Response { pub fn new(provider_groups: Vec, providers: Vec, stations: Vec, vehicles: Vec, zones: Vec) -> Rentals200Response { Rentals200Response { provider_groups, providers, stations, vehicles, zones, } } } motis-openapi-sdk-5.0.0/src/models/rider_category.rs000064400000000000000000000042621046102023000206170ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct RiderCategory { /// Rider category name as displayed to the rider. #[serde(rename = "riderCategoryName")] pub rider_category_name: String, /// Specifies if this category should be considered the default (i.e. the main category displayed to riders). #[serde(rename = "isDefaultFareCategory")] pub is_default_fare_category: bool, /// URL to a web page providing detailed information about the rider category and/or its eligibility criteria. #[serde(rename = "eligibilityUrl", skip_serializing_if = "Option::is_none")] pub eligibility_url: Option, } impl RiderCategory { pub fn new(rider_category_name: String, is_default_fare_category: bool) -> RiderCategory { RiderCategory { rider_category_name, is_default_fare_category, eligibility_url: None, } } } motis-openapi-sdk-5.0.0/src/models/step_instruction.rs000064400000000000000000000100521046102023000212230ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StepInstruction { #[serde(rename = "relativeDirection")] pub relative_direction: models::Direction, /// The distance in meters that this step takes. #[serde(rename = "distance")] pub distance: f64, /// level where this segment starts, based on OpenStreetMap data #[serde(rename = "fromLevel")] pub from_level: f64, /// level where this segment starts, based on OpenStreetMap data #[serde(rename = "toLevel")] pub to_level: f64, /// OpenStreetMap way index #[serde(rename = "osmWay", skip_serializing_if = "Option::is_none")] pub osm_way: Option, #[serde(rename = "polyline")] pub polyline: Box, /// The name of the street. #[serde(rename = "streetName")] pub street_name: String, /// Not implemented! When exiting a highway or traffic circle, the exit name/number. #[serde(rename = "exit")] pub exit: String, /// Not implemented! Indicates whether or not a street changes direction at an intersection. #[serde(rename = "stayOn")] pub stay_on: bool, /// Not implemented! This step is on an open area, such as a plaza or train platform, and thus the directions should say something like \"cross\" #[serde(rename = "area")] pub area: bool, /// Indicates that a fee must be paid by general traffic to use a road, road bridge or road tunnel. #[serde(rename = "toll", skip_serializing_if = "Option::is_none")] pub toll: Option, /// Experimental. Indicates whether access to this part of the route is restricted. See: https://wiki.openstreetmap.org/wiki/Conditional_restrictions #[serde(rename = "accessRestriction", skip_serializing_if = "Option::is_none")] pub access_restriction: Option, /// incline in meters across this path segment #[serde(rename = "elevationUp", skip_serializing_if = "Option::is_none")] pub elevation_up: Option, /// decline in meters across this path segment #[serde(rename = "elevationDown", skip_serializing_if = "Option::is_none")] pub elevation_down: Option, } impl StepInstruction { pub fn new(relative_direction: models::Direction, distance: f64, from_level: f64, to_level: f64, polyline: models::EncodedPolyline, street_name: String, exit: String, stay_on: bool, area: bool) -> StepInstruction { StepInstruction { relative_direction, distance, from_level, to_level, osm_way: None, polyline: Box::new(polyline), street_name, exit, stay_on, area, toll: None, access_restriction: None, elevation_up: None, elevation_down: None, } } } motis-openapi-sdk-5.0.0/src/models/stop_time.rs000064400000000000000000000123251046102023000176170ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// StopTime : departure or arrival event at a stop #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct StopTime { /// information about the stop place and time #[serde(rename = "place")] pub place: Box, /// Transport mode for this leg #[serde(rename = "mode")] pub mode: models::Mode, /// Whether there is real-time data about this leg #[serde(rename = "realTime")] pub real_time: bool, /// The headsign of the bus or train being used. For non-transit legs, null #[serde(rename = "headsign")] pub headsign: String, /// final stop of this trip #[serde(rename = "tripTo")] pub trip_to: Box, #[serde(rename = "agencyId")] pub agency_id: String, #[serde(rename = "agencyName")] pub agency_name: String, #[serde(rename = "agencyUrl")] pub agency_url: String, #[serde(rename = "routeColor", skip_serializing_if = "Option::is_none")] pub route_color: Option, #[serde(rename = "routeTextColor", skip_serializing_if = "Option::is_none")] pub route_text_color: Option, #[serde(rename = "tripId")] pub trip_id: String, #[serde(rename = "routeType", skip_serializing_if = "Option::is_none")] pub route_type: Option, #[serde(rename = "routeShortName")] pub route_short_name: String, #[serde(rename = "routeLongName")] pub route_long_name: String, #[serde(rename = "tripShortName")] pub trip_short_name: String, #[serde(rename = "displayName")] pub display_name: String, /// Experimental. Expect unannounced breaking changes (without version bumps). Stops on the trips before this stop. Returned only if `fetchStop` and `arriveBy` are `true`. #[serde(rename = "previousStops", skip_serializing_if = "Option::is_none")] pub previous_stops: Option>, /// Experimental. Expect unannounced breaking changes (without version bumps). Stops on the trips after this stop. Returned only if `fetchStop` is `true` and `arriveBy` is `false`. #[serde(rename = "nextStops", skip_serializing_if = "Option::is_none")] pub next_stops: Option>, /// Type of pickup (for departures) or dropoff (for arrivals), may be disallowed either due to schedule, skipped stops or cancellations #[serde(rename = "pickupDropoffType")] pub pickup_dropoff_type: models::PickupDropoffType, /// Whether the departure/arrival is cancelled due to the realtime situation (either because the stop is skipped or because the entire trip is cancelled). #[serde(rename = "cancelled")] pub cancelled: bool, /// Whether the entire trip is cancelled due to the realtime situation. #[serde(rename = "tripCancelled")] pub trip_cancelled: bool, /// Filename and line number where this trip is from #[serde(rename = "source")] pub source: String, } impl StopTime { /// departure or arrival event at a stop pub fn new(place: models::Place, mode: models::Mode, real_time: bool, headsign: String, trip_to: models::Place, agency_id: String, agency_name: String, agency_url: String, trip_id: String, route_short_name: String, route_long_name: String, trip_short_name: String, display_name: String, pickup_dropoff_type: models::PickupDropoffType, cancelled: bool, trip_cancelled: bool, source: String) -> StopTime { StopTime { place: Box::new(place), mode, real_time, headsign, trip_to: Box::new(trip_to), agency_id, agency_name, agency_url, route_color: None, route_text_color: None, trip_id, route_type: None, route_short_name, route_long_name, trip_short_name, display_name, previous_stops: None, next_stops: None, pickup_dropoff_type, cancelled, trip_cancelled, source, } } } motis-openapi-sdk-5.0.0/src/models/stoptimes_200_response.rs000064400000000000000000000047521046102023000221470ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Stoptimes200Response { /// list of stop times #[serde(rename = "stopTimes")] pub stop_times: Vec, /// metadata of the requested stop #[serde(rename = "place")] pub place: Box, /// Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of stop times BEFORE the first stop time in the result. #[serde(rename = "previousPageCursor")] pub previous_page_cursor: String, /// Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of stop times AFTER the last stop time in this result. #[serde(rename = "nextPageCursor")] pub next_page_cursor: String, } impl Stoptimes200Response { pub fn new(stop_times: Vec, place: models::Place, previous_page_cursor: String, next_page_cursor: String) -> Stoptimes200Response { Stoptimes200Response { stop_times, place: Box::new(place), previous_page_cursor, next_page_cursor, } } } motis-openapi-sdk-5.0.0/src/models/time_range.rs000064400000000000000000000043071046102023000177270ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// TimeRange : A time interval. The interval is considered active at time t if t is greater than or equal to the start time and less than the end time. #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TimeRange { /// If missing, the interval starts at minus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. #[serde(rename = "start")] pub start: String, /// If missing, the interval ends at plus infinity. If a TimeRange is provided, either start or end must be provided - both fields cannot be empty. #[serde(rename = "end")] pub end: String, } impl TimeRange { /// A time interval. The interval is considered active at time t if t is greater than or equal to the start time and less than the end time. pub fn new(start: String, end: String) -> TimeRange { TimeRange { start, end, } } } motis-openapi-sdk-5.0.0/src/models/transfer.rs000064400000000000000000000067101046102023000174410ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// Transfer : transfer from one location to another #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Transfer { #[serde(rename = "to")] pub to: Box, /// optional; missing if the GTFS did not contain a transfer transfer duration in minutes according to GTFS (+heuristics) #[serde(rename = "default", skip_serializing_if = "Option::is_none")] pub default: Option, /// optional; missing if no path was found (timetable / osr) transfer duration in minutes for the foot profile #[serde(rename = "foot", skip_serializing_if = "Option::is_none")] pub foot: Option, /// optional; missing if no path was found with foot routing transfer duration in minutes for the foot profile #[serde(rename = "footRouted", skip_serializing_if = "Option::is_none")] pub foot_routed: Option, /// optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile #[serde(rename = "wheelchair", skip_serializing_if = "Option::is_none")] pub wheelchair: Option, /// optional; missing if no path was found with the wheelchair profile transfer duration in minutes for the wheelchair profile #[serde(rename = "wheelchairRouted", skip_serializing_if = "Option::is_none")] pub wheelchair_routed: Option, /// optional; missing if no path was found with the wheelchair profile true if the wheelchair path uses an elevator #[serde(rename = "wheelchairUsesElevator", skip_serializing_if = "Option::is_none")] pub wheelchair_uses_elevator: Option, /// optional; missing if no path was found with car routing transfer duration in minutes for the car profile #[serde(rename = "car", skip_serializing_if = "Option::is_none")] pub car: Option, } impl Transfer { /// transfer from one location to another pub fn new(to: models::Place) -> Transfer { Transfer { to: Box::new(to), default: None, foot: None, foot_routed: None, wheelchair: None, wheelchair_routed: None, wheelchair_uses_elevator: None, car: None, } } } motis-openapi-sdk-5.0.0/src/models/transfers_200_response.rs000064400000000000000000000051571046102023000221270ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Transfers200Response { #[serde(rename = "place")] pub place: Box, #[serde(rename = "root")] pub root: Box, #[serde(rename = "equivalences")] pub equivalences: Vec, /// true if the server has foot transfers computed #[serde(rename = "hasFootTransfers")] pub has_foot_transfers: bool, /// true if the server has wheelchair transfers computed #[serde(rename = "hasWheelchairTransfers")] pub has_wheelchair_transfers: bool, /// true if the server has car transfers computed #[serde(rename = "hasCarTransfers")] pub has_car_transfers: bool, /// all outgoing transfers of this location #[serde(rename = "transfers")] pub transfers: Vec, } impl Transfers200Response { pub fn new(place: models::Place, root: models::Place, equivalences: Vec, has_foot_transfers: bool, has_wheelchair_transfers: bool, has_car_transfers: bool, transfers: Vec) -> Transfers200Response { Transfers200Response { place: Box::new(place), root: Box::new(root), equivalences, has_foot_transfers, has_wheelchair_transfers, has_car_transfers, transfers, } } } motis-openapi-sdk-5.0.0/src/models/trip_info.rs000064400000000000000000000040361046102023000176050ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// TripInfo : trip id and name #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TripInfo { /// trip ID (dataset trip id prefixed with the dataset tag) #[serde(rename = "tripId")] pub trip_id: String, /// trip display name (api version < 4) #[serde(rename = "routeShortName", skip_serializing_if = "Option::is_none")] pub route_short_name: Option, /// trip display name (api version >= 4) #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")] pub display_name: Option, } impl TripInfo { /// trip id and name pub fn new(trip_id: String) -> TripInfo { TripInfo { trip_id, route_short_name: None, display_name: None, } } } motis-openapi-sdk-5.0.0/src/models/trip_segment.rs000064400000000000000000000063551046102023000203220ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// TripSegment : trip segment between two stops to show a trip on a map #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct TripSegment { #[serde(rename = "trips")] pub trips: Vec, #[serde(rename = "routeColor", skip_serializing_if = "Option::is_none")] pub route_color: Option, /// Transport mode for this leg #[serde(rename = "mode")] pub mode: models::Mode, /// distance in meters #[serde(rename = "distance")] pub distance: f64, #[serde(rename = "from")] pub from: Box, #[serde(rename = "to")] pub to: Box, /// departure time #[serde(rename = "departure")] pub departure: String, /// arrival time #[serde(rename = "arrival")] pub arrival: String, /// scheduled departure time #[serde(rename = "scheduledDeparture")] pub scheduled_departure: String, /// scheduled arrival time #[serde(rename = "scheduledArrival")] pub scheduled_arrival: String, /// Whether there is real-time data about this leg #[serde(rename = "realTime")] pub real_time: bool, /// Google polyline encoded coordinate sequence (with precision 5) where the trip travels on this segment. #[serde(rename = "polyline")] pub polyline: String, } impl TripSegment { /// trip segment between two stops to show a trip on a map pub fn new(trips: Vec, mode: models::Mode, distance: f64, from: models::Place, to: models::Place, departure: String, arrival: String, scheduled_departure: String, scheduled_arrival: String, real_time: bool, polyline: String) -> TripSegment { TripSegment { trips, route_color: None, mode, distance, from: Box::new(from), to: Box::new(to), departure, arrival, scheduled_departure, scheduled_arrival, real_time, polyline, } } } motis-openapi-sdk-5.0.0/src/models/vertex_type.rs000064400000000000000000000042401046102023000201670ustar 00000000000000/* * MOTIS API * * This is the MOTIS routing API. Overview of MOTIS API versions: MOTIS 0.x - deprecated/discontinued MOTIS 2.x - current, providing: * /api/v5/{plan,trip,stoptimes,map/trips} renamed METRO mode to SUBURBAN, AREAL_LIFT to AERIAL_LIFT; since MOTIS 2.5.0 * /api/v4/{plan,trip,stoptimes,map/trips} new displayName property, routeShortName only contains actual route short name from source; since MOTIS 2.2.0 * /api/v3/plan with correct maxTransfers API parameter (transfers actually corresponding to number of changes between transit legs (and not to number of transit legs), i.e. maxTransfers=0 returns direct public transit connections, as expected); since MOTIS 2.0.84 * /api/v2/{plan,trip} returns Google polylines with precision=6; since MOTIS 2.0.60 * /api/v1/{plan,trip} returns Google polylines with precision=7 (not defined for |longitude|>107) * /api/v1/_* all other endpoints If you use the JS client lib https://www.npmjs.com/package/@motis-project/motis-client, endpoint versions will be taken into account automatically (i.e. the newest one available will be used). * * The version of the OpenAPI document: v5 * Contact: felix@triptix.tech * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// VertexType : - `NORMAL` - latitude / longitude coordinate or address - `BIKESHARE` - bike sharing station - `TRANSIT` - transit stop /// - `NORMAL` - latitude / longitude coordinate or address - `BIKESHARE` - bike sharing station - `TRANSIT` - transit stop #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum VertexType { #[serde(rename = "NORMAL")] Normal, #[serde(rename = "BIKESHARE")] Bikeshare, #[serde(rename = "TRANSIT")] Transit, } impl std::fmt::Display for VertexType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { match self { Self::Normal => write!(f, "NORMAL"), Self::Bikeshare => write!(f, "BIKESHARE"), Self::Transit => write!(f, "TRANSIT"), } } } impl Default for VertexType { fn default() -> VertexType { Self::Normal } }