use conjure_http::endpoint;
/// The Units Service serves as a comprehensive catalog of the units of measurement supported by scout. Units, by
/// default, follow the UCUM convention for representation.
#[conjure_http::conjure_client(name = "UnitsService")]
pub trait UnitsService<
    #[response_body]
    I: Iterator<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Returns all known units, grouped by the physical property they measure.
    #[endpoint(
        method = GET,
        path = "/units/v1/units",
        name = "getAllUnits",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    fn get_all_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
    ) -> Result<
        super::super::super::objects::scout::units::api::GetUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Returns information for a unit symbol if available. Returns as empty if the provided symbol cannot be parsed.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/get-unit",
        name = "getUnit",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_unit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        unit: &super::super::super::objects::scout::units::api::UnitSymbol,
    ) -> Result<
        Option<super::super::super::objects::scout::units::api::Unit>,
        conjure_http::private::Error,
    >;
    /// Returns information for the unit symbols if available. If the provided symbol cannot be parsed, it will be
    /// omitted from the map.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/get-batch-units",
        name = "getBatchUnits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_batch_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        units: &std::collections::BTreeSet<
            super::super::super::objects::scout::units::api::UnitSymbol,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::units::api::UnitSymbol,
            super::super::super::objects::scout::units::api::Unit,
        >,
        conjure_http::private::Error,
    >;
    /// Returns the set of cataloged units that can be converted to and from the given unit.
    /// No commensurable units does not imply the unit is invalid. Use /get-unit to check for validity.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/commensurable-units",
        name = "getCommensurableUnits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    fn get_commensurable_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        unit: &super::super::super::objects::scout::units::api::UnitSymbol,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::units::api::Unit,
        >,
        conjure_http::private::Error,
    >;
}
/// The Units Service serves as a comprehensive catalog of the units of measurement supported by scout. Units, by
/// default, follow the UCUM convention for representation.
#[conjure_http::conjure_client(name = "UnitsService")]
pub trait AsyncUnitsService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Returns all known units, grouped by the physical property they measure.
    #[endpoint(
        method = GET,
        path = "/units/v1/units",
        name = "getAllUnits",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_all_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
    ) -> Result<
        super::super::super::objects::scout::units::api::GetUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Returns information for a unit symbol if available. Returns as empty if the provided symbol cannot be parsed.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/get-unit",
        name = "getUnit",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_unit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        unit: &super::super::super::objects::scout::units::api::UnitSymbol,
    ) -> Result<
        Option<super::super::super::objects::scout::units::api::Unit>,
        conjure_http::private::Error,
    >;
    /// Returns information for the unit symbols if available. If the provided symbol cannot be parsed, it will be
    /// omitted from the map.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/get-batch-units",
        name = "getBatchUnits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_batch_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        units: &std::collections::BTreeSet<
            super::super::super::objects::scout::units::api::UnitSymbol,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::units::api::UnitSymbol,
            super::super::super::objects::scout::units::api::Unit,
        >,
        conjure_http::private::Error,
    >;
    /// Returns the set of cataloged units that can be converted to and from the given unit.
    /// No commensurable units does not imply the unit is invalid. Use /get-unit to check for validity.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/commensurable-units",
        name = "getCommensurableUnits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_commensurable_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        unit: &super::super::super::objects::scout::units::api::UnitSymbol,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::units::api::Unit,
        >,
        conjure_http::private::Error,
    >;
}
/// The Units Service serves as a comprehensive catalog of the units of measurement supported by scout. Units, by
/// default, follow the UCUM convention for representation.
#[conjure_http::conjure_client(name = "UnitsService", local)]
pub trait LocalAsyncUnitsService<
    #[response_body]
    I: conjure_http::private::Stream<
            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
        >,
> {
    /// Returns all known units, grouped by the physical property they measure.
    #[endpoint(
        method = GET,
        path = "/units/v1/units",
        name = "getAllUnits",
        accept = conjure_http::client::StdResponseDeserializer
    )]
    async fn get_all_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
    ) -> Result<
        super::super::super::objects::scout::units::api::GetUnitsResponse,
        conjure_http::private::Error,
    >;
    /// Returns information for a unit symbol if available. Returns as empty if the provided symbol cannot be parsed.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/get-unit",
        name = "getUnit",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_unit(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        unit: &super::super::super::objects::scout::units::api::UnitSymbol,
    ) -> Result<
        Option<super::super::super::objects::scout::units::api::Unit>,
        conjure_http::private::Error,
    >;
    /// Returns information for the unit symbols if available. If the provided symbol cannot be parsed, it will be
    /// omitted from the map.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/get-batch-units",
        name = "getBatchUnits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_batch_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        units: &std::collections::BTreeSet<
            super::super::super::objects::scout::units::api::UnitSymbol,
        >,
    ) -> Result<
        std::collections::BTreeMap<
            super::super::super::objects::scout::units::api::UnitSymbol,
            super::super::super::objects::scout::units::api::Unit,
        >,
        conjure_http::private::Error,
    >;
    /// Returns the set of cataloged units that can be converted to and from the given unit.
    /// No commensurable units does not imply the unit is invalid. Use /get-unit to check for validity.
    #[endpoint(
        method = POST,
        path = "/units/v1/units/commensurable-units",
        name = "getCommensurableUnits",
        accept = conjure_http::client::conjure::CollectionResponseDeserializer
    )]
    async fn get_commensurable_units(
        &self,
        #[auth]
        auth_: &conjure_object::BearerToken,
        #[body(serializer = conjure_http::client::StdRequestSerializer)]
        unit: &super::super::super::objects::scout::units::api::UnitSymbol,
    ) -> Result<
        std::collections::BTreeSet<
            super::super::super::objects::scout::units::api::Unit,
        >,
        conjure_http::private::Error,
    >;
}
