You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Derived using online tool that converts openapi spec to json schema via cli which is then converted to serde using quicktype
// Example code that deserializes and serializes the model.// extern crate serde;// #[macro_use]// extern crate serde_derive;// extern crate serde_json;//// use generated_module::frf;//// fn main() {// let json = r#"{"answer": 42}"#;// let model: frf = serde_json::from_str(&json).unwrap();// }use serde::{Serialize,Deserialize};#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "PascalCase")]pubstructFrf{pubadditional_locations:Option<AdditionalLocations>,pubaddress:Option<Address>,pubcategory:Option<Category>,pubcategory_details:Option<CategoryDetails>,pubcategory_id:Option<String>,pubchain_info:Option<ChainInfo>,pubcontact_info:Option<ContactInfo>,puberror:Option<Error>,pubhours:Option<Hours>,pubhours_by_day:Option<HoursByDay>,pubicon_details:Option<IconDetails>,pubnear_point_result:Option<NearPointResult>,pubnullable_point:Option<NullablePoint>,pubpagination:Option<Pagination>,pubplace_details:Option<PlaceDetails>,pubplace_id:Option<String>,pubpoint:Option<Point>,pubrating:Option<Rating>,pubsearch_distance:Option<f64>,pubsocial_media:Option<SocialMedia>,pubtime_range:Option<TimeRange>,pubwithin_extent_result:Option<WithinExtentResult>,pubx_coord:Option<f64>,puby_coord:Option<f64>,}/// A set of additional locations for the place.////// This list provides alternative locations for accessing a place such as/// `frontDoor` or `road`.///////// A set of additional locations that represent the place, for example the location of the/// front door, or of a drop off point.////// This object and child properties are part of the "Location"/// attribute group.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructAdditionalLocations{/// A location for drop-off/pick-up for a place.pubdrop_off:Option<NullablePoint>,/// A location for the front door for a place.pubfront_door:Option<NullablePoint>,/// A road-side location for a place.pubroad:Option<NullablePoint>,/// A location in the roof centroid for a place.pubroof:Option<NullablePoint>,}/// A location for drop-off/pick-up for a place.///////// A point defined in WGS84 decimal degrees.///////// A location for the front door for a place.///////// A road-side location for a place.///////// A location in the roof centroid for a place.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructNullablePoint{/// The x, or longitude, of this location in WGS84 decimal degrees.pubx:f64,/// The y, or latitude, of this location in WGS84 decimal degrees.puby:f64,}/// The address of a place, or point of interest (POI).///////// The address of the place or point of interest (POI).////// This object and child properties are part of the "Address" attribute/// group.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructAddress{/// Additional sub-division.////// Usually, but not always, a country sub-division (e.g., Scotland).pubadmin_region:Option<String>,/// The census block Id of the place (US only).pubcensus_block_id:Option<String>,/// Two letter ISO country codepubcountry:Option<String>,/// As defined by Nielsen, signifies a region where the population can receive similar TV and/// radio offerings (US only).pubdesignated_market_area:Option<String>,/// Additional address information, including suite or apartment numbers.pubextended:Option<String>,/// The city, town, or equivalent.publocality:Option<String>,/// The neighborhoods of the place.pubneighborhood:Option<Vec<String>>,/// Post-office box.pubpo_box:Option<String>,/// Postal code or equivalent (zip code in the US).////// Format will be localized based on country.pubpostcode:Option<String>,/// Town/place employed in postal addressing.pubpost_town:Option<String>,/// The state, province, territory or equivalent.pubregion:Option<String>,/// The street address for a place, for example the street name and number.pubstreet_address:Option<String>,}/// Represents the category of a place.////// You can get more information on categories from the `places/categories`/// endpoint.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructCategory{/// The category Id uniquely identifies this category or type of place.////// The name of the category can be looked up using the/// `places/categories` endpoint. For example, 17119 is the id for a/// "Bicycle Store".pubcategory_id:String,/// The label that describes the category.publabel:String,}/// Provides details about a category or type of place.////// Categories are hierarchical so that you can filter places based on/// specific categories such as "Provençal Restaurant", or with more generic/// types such as "Restaurant". A category such as "Provençal Restaurant"/// includes the details of its more generic parent, such as "French/// Restaurant".#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructCategoryDetails{/// A unique identifying string for a category.////// This matches the `categoryId` of a place's `category` property.pubcategory_id:String,/// The full list of labels that describe the category, including its more generic parent/// categories.pubfull_label:Vec<String>,/// Details of an icon, suitable for depicting this place.////// To fetch icon details use the `icon` query parameter.pubicon:Option<IconDetails>,/// The list of parent category Ids for this category.pubparents:Option<Vec<String>>,}/// Details of an icon, suitable for depicting this place.////// To fetch icon details use the `icon` query parameter.///////// Information about an icon for depicting a place or category.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructIconDetails{/// Url for an icon for this place or category in either `svg`, `cim` or `png` format.puburl:Option<String>,}/// Information about a chain that a place belongs to.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructChainInfo{/// The name of the chain.pubname:Option<String>,}/// The contact information for a place.///////// Contact information for the place, such as the telephone number or email address.////// This object and child properties are part of the "Details" attribute/// group.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructContactInfo{/// Email address.pubemail:Option<String>,/// Fax number.pubfax:Option<String>,/// The telephone number of the place.pubtelephone:Option<String>,/// The website address of the place.pubwebsite:Option<String>,}#[derive(Debug,Clone,Serialize,Deserialize)]pubstructError{/// Error informationpuberror:ErrorClass,}/// Error information#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructErrorClass{/// A code identifying the type of error.////// This can be an HTTP status code, `498` (invalid or expired/// token), or `499` (missing token).pubcode:i64,/// List of details about the error.pubdetails:Option<Vec<String>>,/// A message describing the error.pubmessage:String,/// A link to general information about the service, such as the owning system and token/// service URL.////// This property is only/// present for errors relating to tokens.pubrest_info_url:Option<String>,}/// Lists the opening hours of this place or POI along with the popular or busy hours.////// A string is also provided that can be used for display.///////// The operating hours for the place, including hours of opening and popular times.////// This object and child properties are part of the "Details" attribute/// group.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructHours{/// The opening hours for a place.////// Opening hours are shown by day of the week. Each day can have/// several pairs of from and to times. For example, if a coffee shop is/// open from 9:00 until 12:00 and then again from 13:00 until 17:00, it/// would contain two pairs of from/to times: 09:00 paired with 12:00/// and 13:00 with 17:00. Opening hours are shown in 24-hour time in the/// local timezone of the place or POI.pubopening:Option<HoursByDay>,/// The opening hours for this place, formatted for display.pubopening_text:Option<String>,/// The popular or busy hours for a place.////// Popular hours are shown by day of the week. Each day can have/// several pairs of from and to times. For example, if a coffee shop is/// popular from 9:00 until 10:00 and then again from 14:00 until 15:00,/// it would contain two pairs of from/to times: 09:00 paired with 10:00/// and 14:00 with 15:00. Popular hours are shown in 24-hour time in the/// local timezone of the place or POI.pubpopular:Option<HoursByDay>,}/// The opening hours for a place.////// Opening hours are shown by day of the week. Each day can have/// several pairs of from and to times. For example, if a coffee shop is/// open from 9:00 until 12:00 and then again from 13:00 until 17:00, it/// would contain two pairs of from/to times: 09:00 paired with 12:00/// and 13:00 with 17:00. Opening hours are shown in 24-hour time in the/// local timezone of the place or POI.///////// The opening or popular hours for a place.////// Opening hours are shown by day of the week. Each day can have several/// pairs of from and to times. For example, if a coffee shop is open from/// 9:00 until 12:00 and then again from 13:00 until 17:00, it would contain/// two pairs of opening/closing times: 9:00 paired with 12:00 and 13:00/// with 17:00. Hours are shown in 24-hour time in the local timezone of the/// place or POI.///////// The popular or busy hours for a place.////// Popular hours are shown by day of the week. Each day can have/// several pairs of from and to times. For example, if a coffee shop is/// popular from 9:00 until 10:00 and then again from 14:00 until 15:00,/// it would contain two pairs of from/to times: 09:00 paired with 10:00/// and 14:00 with 15:00. Popular hours are shown in 24-hour time in the/// local timezone of the place or POI.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructHoursByDay{pubfriday:Option<Vec<TimeRange>>,pubmonday:Option<Vec<TimeRange>>,pubsaturday:Option<Vec<TimeRange>>,pubsunday:Option<Vec<TimeRange>>,pubthursday:Option<Vec<TimeRange>>,pubtuesday:Option<Vec<TimeRange>>,pubwednesday:Option<Vec<TimeRange>>,}/// A pair of times defining the start and end of a time period.////// For example, this could define opening hours or popular hours. Hours are/// shown in 24-hour time in the local timezone of the place or POI.////// Where a time range is 24-hours (for example a venue that is open 24-hours),/// the `from` property will be 00:00 and the `to` property will be 23:59.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructTimeRange{/// The start of a time range in the format "HH:MM".pubfrom:String,/// The end of a time range in the format "HH:MM".pubto:String,}/// A result of searching for places using a `places/near-point` request.////// The result object includes a single place that satisfied the search and/// the distance from the search point, in meters.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructNearPointResult{/// A list of category objects for a place.////// Categories are uniquely identified by a `categoryId`. For example,/// `17119` identifies a "Bicycle Store" and `10051` identifies a/// "Stadium". Note that a single place can belong to multiple/// categories (for example, a petrol station could also have a/// super-market).pubcategories:Vec<Category>,/// The distance, in meters, from the place to the search point of a 'places/near-point`/// query.pubdistance:f64,/// Details of an icon, suitable for depicting this place.////// To fetch icon details use the `icon` query parameter.pubicon:Option<IconDetails>,/// The location of this place as a WGS84 point.publocation:Point,/// The name of the place, or point of interest./// You can search for places by name using the `searchText` property in/// a `places/near-point` or `places/within-extent` request.pubname:String,/// The unique Id of this place.////// This place Id can be passed to the `places/{placeId}` endpoint to/// retrieve additional details.pubplace_id:String,}/// The location of this place as a WGS84 point.///////// A point defined in WGS84 decimal degrees.///////// The location of this place as a WGS84 point.////// This property is part of the "Location" attribute group.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructPoint{/// The x, or longitude, of this location in WGS84 decimal degrees.pubx:f64,/// The y, or latitude, of this location in WGS84 decimal degrees.puby:f64,}/// Provides pagination links for accessing more results for the current request.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructPagination{/// A url for fetching the next page of results.////// Use this property to request the next page of results if available. If/// this property is omitted then there are no more pages of results/// available. You must also supply authentication details, such as a/// `token`, to make a next page request.pubnext_url:Option<String>,/// A url for fetching the previous page of results.////// Use this property to request the previous page of results if/// available. If this property is omitted then there are no previous/// pages of results. You must also supply authentication details, such/// as a `token`, to make a previous page request.pubprevious_url:Option<String>,}/// The additional details for a `Place`, including address, contact details, opening hours,/// and rating.////// You can request additional details for a place by using the `placeId` in/// a `places/{placeId}` request. Use the `requestedFields` query parameter/// to choose the fields or attributes that are included in the response.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructPlaceDetails{/// A set of additional locations that represent the place, for example the location of the/// front door, or of a drop off point.////// This object and child properties are part of the "Location"/// attribute group.pubadditional_locations:Option<AdditionalLocations>,/// The address of the place or point of interest (POI).////// This object and child properties are part of the "Address" attribute/// group.pubaddress:Option<Address>,/// A list of category objects for a place.////// Categories are uniquely identified by a `categoryId`. For example,/// `17119` identifies a "Bicycle Store" and `10051` identifies a/// "Stadium". Note that a single place can belong to multiple/// categories (for example, a petrol station could also have a/// super-market).////// This property is part of the "Place" attribute group.pubcategories:Option<Vec<Category>>,/// Information about all the chains the place belongs to.////// This object and child properties are part of the "Details" attribute/// group.pubchains:Option<Vec<ChainInfo>>,/// Contact information for the place, such as the telephone number or email address.////// This object and child properties are part of the "Details" attribute/// group.pubcontact_info:Option<ContactInfo>,/// A text description of the place.////// This property is part of the "Details" attribute group.pubdescription:Option<String>,/// The operating hours for the place, including hours of opening and popular times.////// This object and child properties are part of the "Details" attribute/// group.pubhours:Option<Hours>,/// Details of an icon, suitable for depicting this place.////// To fetch icon details use the `icon` query parameter.pubicon:Option<IconDetails>,/// The location of this place as a WGS84 point.////// This property is part of the "Location" attribute group.publocation:Option<Point>,/// The name of the place, or point of interest.////// This property is part of the "Place" attribute group.pubname:Option<String>,/// The unique Id of this place.pubplace_id:String,/// Rating information supplied by users of the place.////// This object and child properties are part of the "Details" attribute/// group.pubrating:Option<Rating>,/// Social media information associated with the place.////// This object and child properties are part of the "Details" attribute/// group.pubsocial_media:Option<SocialMedia>,}/// Rating information supplied by users of the place.////// This object and child properties are part of the "Details" attribute/// group.///////// Rating information about the price and user rating of the place.#[derive(Debug,Clone,Serialize,Deserialize)]pubstructRating{/// An indication of the overall price of a place based on user reviews.pubprice:Option<Price>,/// A rating for the place based on user-reviews from 0 to 5, where 5 is the best rating.pubuser:Option<f64>,}/// An indication of the overall price of a place based on user reviews.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubenumPrice{Cheap,Expensive,Moderate,#[serde(rename = "veryExpensive")]VeryExpensive,}/// Social media information associated with the place.////// This object and child properties are part of the "Details" attribute/// group.///////// The social media details for a place.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructSocialMedia{/// The facebook Id of the place.pubfacebook_id:Option<String>,/// The instagram ID of the place.pubinstagram:Option<String>,/// The twitter handle of the place.pubtwitter:Option<String>,}/// A result of searching for places using a `places/within-extent` request.////// The result object includes a single place that satisfied the search.#[derive(Debug,Clone,Serialize,Deserialize)]#[serde(rename_all = "camelCase")]pubstructWithinExtentResult{/// A list of category objects for a place.////// Categories are uniquely identified by a `categoryId`. For example,/// `17119` identifies a "Bicycle Store" and `10051` identifies a/// "Stadium". Note that a single place can belong to multiple/// categories (for example, a petrol station could also have a/// super-market).pubcategories:Vec<Category>,/// Details of an icon, suitable for depicting this place.////// To fetch icon details use the `icon` query parameter.pubicon:Option<IconDetails>,/// The location of this place as a WGS84 point.publocation:Point,/// The name of the place, or point of interest./// You can search for places by name using the `searchText` property in/// a `places/near-point` or `places/within-extent` request.pubname:String,/// The unique Id of this place.////// This place Id can be passed to the `places/{placeId}` endpoint to/// retrieve additional details.pubplace_id:String,}
The text was updated successfully, but these errors were encountered:
Derived using online tool that converts openapi spec to json schema via cli which is then converted to serde using quicktype
The text was updated successfully, but these errors were encountered: