use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::ApiSuccess;
#[derive(Debug)]
pub struct DeleteTail<'a> {
pub account_identifier: &'a str,
pub script_name: &'a str,
pub tail_id: &'a str,
}
impl EndpointSpec for DeleteTail<'_> {
type JsonResponse = ();
type ResponseType = ApiSuccess<Self::JsonResponse>;
fn method(&self) -> Method {
Method::DELETE
}
fn path(&self) -> String {
format!(
"accounts/{}/workers/scripts/{}/tails/{}",
self.account_identifier, self.script_name, self.tail_id
)
}
}