use super::WorkersRouteIdOnly;
use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::ApiSuccess;
#[derive(Debug)]
pub struct DeleteRoute<'a> {
pub zone_identifier: &'a str,
pub identifier: &'a str,
}
impl EndpointSpec for DeleteRoute<'_> {
type JsonResponse = WorkersRouteIdOnly;
type ResponseType = ApiSuccess<Self::JsonResponse>;
fn method(&self) -> Method {
Method::DELETE
}
fn path(&self) -> String {
format!(
"zones/{}/workers/routes/{}",
self.zone_identifier, self.identifier
)
}
}