diff --git a/bnaclient/src/lib.rs b/bnaclient/src/lib.rs index 50acba8..32710de 100644 --- a/bnaclient/src/lib.rs +++ b/bnaclient/src/lib.rs @@ -1014,7 +1014,6 @@ pub mod types { /// "type": "object", /// "required": [ /// "core_services", - /// "features", /// "infrastructure", /// "opportunity", /// "people", @@ -1055,7 +1054,6 @@ pub mod types { #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] pub struct BnaPost { pub core_services: CoreServices, - pub features: ::serde_json::Value, pub infrastructure: Infrastructure, pub opportunity: Opportunity, pub people: People, @@ -2379,64 +2377,6 @@ pub mod types { } } - ///Features - /// - ///
JSON schema - /// - /// ```json - ///{ - /// "type": "object", - /// "properties": { - /// "people": { - /// "description": "BNA category score for access to residential - /// areas", - /// "examples": [ - /// 75.81 - /// ], - /// "type": "number" - /// }, - /// "retail": { - /// "description": "BNA category score for access to major retail - /// centers", - /// "examples": [ - /// 73.71 - /// ], - /// "type": "number" - /// }, - /// "transit": { - /// "description": "BNA category score for access to major transit - /// stops", - /// "examples": [ - /// 71.59 - /// ], - /// "type": "number" - /// } - /// } - ///} - /// ``` - ///
- #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)] - pub struct Features { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub people: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub retail: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub transit: ::std::option::Option, - } - - impl From<&Features> for Features { - fn from(value: &Features) -> Self { - value.clone() - } - } - - impl Features { - pub fn builder() -> builder::Features { - Default::default() - } - } - ///GetCityCensusResponseItem /// ///
JSON schema @@ -2576,11 +2516,13 @@ pub mod types { /// "enum": [ /// "All", /// "CoreServices", - /// "Features", /// "Infratructure", /// "Opportunity", + /// "People", /// "Recreation", - /// "Summary" + /// "Retail", + /// "Summary", + /// "Transit" /// ] ///} /// ``` @@ -2600,11 +2542,13 @@ pub mod types { pub enum GetRatingComponent { All, CoreServices, - Features, Infratructure, Opportunity, + People, Recreation, + Retail, Summary, + Transit, } impl From<&GetRatingComponent> for GetRatingComponent { @@ -2618,11 +2562,13 @@ pub mod types { match *self { Self::All => write!(f, "All"), Self::CoreServices => write!(f, "CoreServices"), - Self::Features => write!(f, "Features"), Self::Infratructure => write!(f, "Infratructure"), Self::Opportunity => write!(f, "Opportunity"), + Self::People => write!(f, "People"), Self::Recreation => write!(f, "Recreation"), + Self::Retail => write!(f, "Retail"), Self::Summary => write!(f, "Summary"), + Self::Transit => write!(f, "Transit"), } } } @@ -2633,11 +2579,13 @@ pub mod types { match value { "All" => Ok(Self::All), "CoreServices" => Ok(Self::CoreServices), - "Features" => Ok(Self::Features), "Infratructure" => Ok(Self::Infratructure), "Opportunity" => Ok(Self::Opportunity), + "People" => Ok(Self::People), "Recreation" => Ok(Self::Recreation), + "Retail" => Ok(Self::Retail), "Summary" => Ok(Self::Summary), + "Transit" => Ok(Self::Transit), _ => Err("invalid value".into()), } } @@ -5064,7 +5012,6 @@ pub mod types { #[derive(Clone, Debug)] pub struct BnaPost { core_services: ::std::result::Result, - features: ::std::result::Result<::serde_json::Value, ::std::string::String>, infrastructure: ::std::result::Result, opportunity: ::std::result::Result, people: ::std::result::Result, @@ -5078,7 +5025,6 @@ pub mod types { fn default() -> Self { Self { core_services: Err("no value supplied for core_services".to_string()), - features: Err("no value supplied for features".to_string()), infrastructure: Err("no value supplied for infrastructure".to_string()), opportunity: Err("no value supplied for opportunity".to_string()), people: Err("no value supplied for people".to_string()), @@ -5101,16 +5047,6 @@ pub mod types { }); self } - pub fn features(mut self, value: T) -> Self - where - T: std::convert::TryInto<::serde_json::Value>, - T::Error: std::fmt::Display, - { - self.features = value - .try_into() - .map_err(|e| format!("error converting supplied value for features: {}", e)); - self - } pub fn infrastructure(mut self, value: T) -> Self where T: std::convert::TryInto, @@ -5190,7 +5126,6 @@ pub mod types { ) -> ::std::result::Result { Ok(Self { core_services: value.core_services?, - features: value.features?, infrastructure: value.infrastructure?, opportunity: value.opportunity?, people: value.people?, @@ -5206,7 +5141,6 @@ pub mod types { fn from(value: super::BnaPost) -> Self { Self { core_services: Ok(value.core_services), - features: Ok(value.features), infrastructure: Ok(value.infrastructure), opportunity: Ok(value.opportunity), people: Ok(value.people), @@ -6630,79 +6564,6 @@ pub mod types { } } - #[derive(Clone, Debug)] - pub struct Features { - people: ::std::result::Result<::std::option::Option, ::std::string::String>, - retail: ::std::result::Result<::std::option::Option, ::std::string::String>, - transit: ::std::result::Result<::std::option::Option, ::std::string::String>, - } - - impl Default for Features { - fn default() -> Self { - Self { - people: Ok(Default::default()), - retail: Ok(Default::default()), - transit: Ok(Default::default()), - } - } - } - - impl Features { - pub fn people(mut self, value: T) -> Self - where - T: std::convert::TryInto<::std::option::Option>, - T::Error: std::fmt::Display, - { - self.people = value - .try_into() - .map_err(|e| format!("error converting supplied value for people: {}", e)); - self - } - pub fn retail(mut self, value: T) -> Self - where - T: std::convert::TryInto<::std::option::Option>, - T::Error: std::fmt::Display, - { - self.retail = value - .try_into() - .map_err(|e| format!("error converting supplied value for retail: {}", e)); - self - } - pub fn transit(mut self, value: T) -> Self - where - T: std::convert::TryInto<::std::option::Option>, - T::Error: std::fmt::Display, - { - self.transit = value - .try_into() - .map_err(|e| format!("error converting supplied value for transit: {}", e)); - self - } - } - - impl ::std::convert::TryFrom for super::Features { - type Error = super::error::ConversionError; - fn try_from( - value: Features, - ) -> ::std::result::Result { - Ok(Self { - people: value.people?, - retail: value.retail?, - transit: value.transit?, - }) - } - } - - impl From for Features { - fn from(value: super::Features) -> Self { - Self { - people: Ok(value.people), - retail: Ok(value.retail), - transit: Ok(value.transit), - } - } - } - #[derive(Clone, Debug)] pub struct Infrastructure { high_stress_miles: diff --git a/openapi.yaml b/openapi.yaml index 9299ff1..ac99035 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -729,7 +729,6 @@ components: $ref: "#/components/schemas/transit" required: - core_services - - features - infrastructure - opportunity - people @@ -1068,21 +1067,6 @@ components: description: "A collection of errors" items: $ref: "#/components/schemas/error" - features: - type: object - properties: - people: - type: number - description: "BNA category score for access to residential areas" - example: 75.81 - retail: - type: number - description: "BNA category score for access to major retail centers" - example: 73.71 - transit: - type: number - description: "BNA category score for access to major transit stops" - example: 71.59 header: type: string description: "The name of a single request header which caused the error" @@ -1465,13 +1449,14 @@ components: enum: - All - CoreServices - - Features - Infratructure - Opportunity + - People - Recreation + - Retail - Summary + - Transit example: All - page: name: page in: query