use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::{ApiResult, ApiSuccess};
use serde::Deserialize;
#[derive(Debug)]
pub struct DeleteLoadBalancer<'a> {
pub zone_identifier: &'a str,
pub identifier: &'a str,
}
impl EndpointSpec for DeleteLoadBalancer<'_> {
type JsonResponse = Response;
type ResponseType = ApiSuccess<Self::JsonResponse>;
fn method(&self) -> Method {
Method::DELETE
}
fn path(&self) -> String {
format!(
"zones/{}/load_balancers/{}",
self.zone_identifier, self.identifier
)
}
}
#[derive(Deserialize, Clone, Debug)]
pub struct Response {
pub id: String,
}
impl ApiResult for Response {}