#![allow(
clippy::doc_markdown,
clippy::missing_errors_doc,
clippy::must_use_candidate,
clippy::needless_pass_by_value,
clippy::return_self_not_must_use,
clippy::single_match_else
)]
use super::air_temperature::{air_temperature_parts, decode_air_temperature_response};
use super::four_day_outlook::{decode_four_day_outlook_response, four_day_outlook_parts};
use super::pm25::{decode_pm25_response, pm25_parts};
use super::psi::{decode_psi_response, psi_parts};
use super::rainfall::{decode_rainfall_response, rainfall_parts};
use super::relative_humidity::{decode_relative_humidity_response, relative_humidity_parts};
use super::twenty_four_hr_forecast::{
decode_twenty_four_hr_forecast_response, twenty_four_hr_forecast_parts,
};
use super::two_hr_forecast::{decode_two_hr_forecast_response, two_hr_forecast_parts};
use super::uv::{decode_uv_response, uv_parts};
use super::weather_sub_api::{decode_weather_sub_api_response, weather_sub_api_parts};
use super::wind_direction::{decode_wind_direction_response, wind_direction_parts};
use super::wind_speed::{decode_wind_speed_response, wind_speed_parts};
use super::{
AirTemperatureInput, AirTemperatureOperationResponse, FourDayOutlookInput,
FourDayOutlookOperationResponse, NeaWeatherSubApi, Pm25Input, Pm25OperationResponse, PsiInput,
PsiOperationResponse, RainfallInput, RainfallOperationResponse, RelativeHumidityInput,
RelativeHumidityOperationResponse, TwentyFourHrForecastInput,
TwentyFourHrForecastOperationResponse, TwoHrForecastInput, TwoHrForecastOperationResponse,
UvInput, UvOperationResponse, WeatherSubApiInput, WeatherSubApiOperationResponse,
WindDirectionInput, WindDirectionOperationResponse, WindSpeedInput, WindSpeedOperationResponse,
};
use crate::air_quality;
use crate::environment;
use crate::weather_forecast;
use crate::weather_readings;
#[derive(Debug, Clone)]
pub struct Api {
base_url: String,
x_api_key: Option<String>,
}
impl Default for Api {
fn default() -> Self {
Self::new()
}
}
impl Api {
pub fn new() -> Self {
Self {
base_url: super::SERVER_URL.to_owned(),
x_api_key: None,
}
}
pub fn base_url(mut self, base_url: impl Into<String>) -> Self {
self.base_url = base_url.into();
self
}
pub fn x_api_key(mut self, value: impl Into<String>) -> Self {
self.x_api_key = Some(value.into());
self
}
pub fn air_quality(&self) -> air_quality::Api<'_> {
air_quality::Api { api: self }
}
pub fn weather_readings(&self) -> weather_readings::Api<'_> {
weather_readings::Api { api: self }
}
pub fn weather_forecast(&self) -> weather_forecast::Api<'_> {
weather_forecast::Api { api: self }
}
pub fn environment(&self) -> environment::Api<'_> {
environment::Api { api: self }
}
fn apply<B>(
&self,
parts: &mut satay_runtime::RequestParts<B>,
) -> Result<(), satay_runtime::Error> {
if let Some(value) = &self.x_api_key {
satay_runtime::insert_header(&mut parts.headers, "x-api-key", value)?;
}
if self.base_url.is_empty() {
return Ok(());
}
let path_and_query = parts.uri.as_str();
let base_url = self.base_url.trim_end_matches('/');
let separator = if path_and_query.starts_with('/') {
""
} else {
"/"
};
parts.uri = format!("{base_url}{separator}{path_and_query}");
Ok(())
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct PsiAction<'a> {
api: &'a Api,
input: PsiInput,
}
impl<'a> PsiAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: PsiInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = psi_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<PsiOperationResponse, satay_runtime::Error> {
decode_psi_response(response)
}
}
impl satay_runtime::Action for PsiAction<'_> {
type Response = PsiOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct Pm25Action<'a> {
api: &'a Api,
input: Pm25Input,
}
impl<'a> Pm25Action<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: Pm25Input::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = pm25_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Pm25OperationResponse, satay_runtime::Error> {
decode_pm25_response(response)
}
}
impl satay_runtime::Action for Pm25Action<'_> {
type Response = Pm25OperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct AirTemperatureAction<'a> {
api: &'a Api,
input: AirTemperatureInput,
}
impl<'a> AirTemperatureAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: AirTemperatureInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = air_temperature_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<AirTemperatureOperationResponse, satay_runtime::Error> {
decode_air_temperature_response(response)
}
}
impl satay_runtime::Action for AirTemperatureAction<'_> {
type Response = AirTemperatureOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct RelativeHumidityAction<'a> {
api: &'a Api,
input: RelativeHumidityInput,
}
impl<'a> RelativeHumidityAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: RelativeHumidityInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = relative_humidity_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<RelativeHumidityOperationResponse, satay_runtime::Error> {
decode_relative_humidity_response(response)
}
}
impl satay_runtime::Action for RelativeHumidityAction<'_> {
type Response = RelativeHumidityOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct WindSpeedAction<'a> {
api: &'a Api,
input: WindSpeedInput,
}
impl<'a> WindSpeedAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: WindSpeedInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = wind_speed_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<WindSpeedOperationResponse, satay_runtime::Error> {
decode_wind_speed_response(response)
}
}
impl satay_runtime::Action for WindSpeedAction<'_> {
type Response = WindSpeedOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct WindDirectionAction<'a> {
api: &'a Api,
input: WindDirectionInput,
}
impl<'a> WindDirectionAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: WindDirectionInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = wind_direction_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<WindDirectionOperationResponse, satay_runtime::Error> {
decode_wind_direction_response(response)
}
}
impl satay_runtime::Action for WindDirectionAction<'_> {
type Response = WindDirectionOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct RainfallAction<'a> {
api: &'a Api,
input: RainfallInput,
}
impl<'a> RainfallAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: RainfallInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = rainfall_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<RainfallOperationResponse, satay_runtime::Error> {
decode_rainfall_response(response)
}
}
impl satay_runtime::Action for RainfallAction<'_> {
type Response = RainfallOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct TwoHrForecastAction<'a> {
api: &'a Api,
input: TwoHrForecastInput,
}
impl<'a> TwoHrForecastAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: TwoHrForecastInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = two_hr_forecast_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<TwoHrForecastOperationResponse, satay_runtime::Error> {
decode_two_hr_forecast_response(response)
}
}
impl satay_runtime::Action for TwoHrForecastAction<'_> {
type Response = TwoHrForecastOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct TwentyFourHrForecastAction<'a> {
api: &'a Api,
input: TwentyFourHrForecastInput,
}
impl<'a> TwentyFourHrForecastAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: TwentyFourHrForecastInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = twenty_four_hr_forecast_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<TwentyFourHrForecastOperationResponse, satay_runtime::Error> {
decode_twenty_four_hr_forecast_response(response)
}
}
impl satay_runtime::Action for TwentyFourHrForecastAction<'_> {
type Response = TwentyFourHrForecastOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct FourDayOutlookAction<'a> {
api: &'a Api,
input: FourDayOutlookInput,
}
impl<'a> FourDayOutlookAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: FourDayOutlookInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = four_day_outlook_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<FourDayOutlookOperationResponse, satay_runtime::Error> {
decode_four_day_outlook_response(response)
}
}
impl satay_runtime::Action for FourDayOutlookAction<'_> {
type Response = FourDayOutlookOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct UvAction<'a> {
api: &'a Api,
input: UvInput,
}
impl<'a> UvAction<'a> {
pub(crate) fn new(api: &'a Api) -> Self {
Self {
api,
input: UvInput::new(),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = uv_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<UvOperationResponse, satay_runtime::Error> {
decode_uv_response(response)
}
}
impl satay_runtime::Action for UvAction<'_> {
type Response = UvOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}
#[must_use = "configure this action and execute it or call `.request()`"]
#[derive(Debug, Clone)]
pub struct WeatherSubApiAction<'a> {
api: &'a Api,
input: WeatherSubApiInput,
}
impl<'a> WeatherSubApiAction<'a> {
pub(crate) fn new(api_2: &'a Api, api: NeaWeatherSubApi) -> Self {
Self {
api: api_2,
input: WeatherSubApiInput::new(api),
}
}
#[must_use = "builder methods return the configured action"]
pub fn date(mut self, date: satay_runtime::Date) -> Self {
self.input = self.input.date(date);
self
}
#[must_use = "builder methods return the configured action"]
pub fn pagination_token(mut self, pagination_token: impl Into<String>) -> Self {
self.input = self.input.pagination_token(pagination_token);
self
}
#[must_use = "builder methods return the configured action"]
pub fn x_api_key(mut self, x_api_key: impl Into<String>) -> Self {
self.input = self.input.x_api_key(x_api_key);
self
}
pub fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
let api = self.api;
let mut parts = weather_sub_api_parts(self.input)?;
api.apply(&mut parts)?;
satay_runtime::into_empty_request(parts)
}
pub fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<WeatherSubApiOperationResponse, satay_runtime::Error> {
decode_weather_sub_api_response(response)
}
}
impl satay_runtime::Action for WeatherSubApiAction<'_> {
type Response = WeatherSubApiOperationResponse;
fn request(self) -> Result<http::Request<Vec<u8>>, satay_runtime::Error> {
self.request()
}
fn decode<B: AsRef<[u8]>>(
response: satay_runtime::ResponseParts<B>,
) -> Result<Self::Response, satay_runtime::Error> {
Self::decode(response)
}
}