cloudflare/endpoints/load_balancing/
delete_pool.rs

1use surf::http::Method;
2
3use crate::framework::endpoint::Endpoint;
4use crate::framework::ApiResultTraits;
5
6/// Delete Pool
7/// https://api.cloudflare.com/#account-load-balancer-pools-delete-pool
8#[derive(Debug)]
9pub struct DeletePool<'a> {
10    /// The Cloudflare account of this pool.
11    pub account_identifier: &'a str,
12    /// Which pool to delete.
13    pub identifier: &'a str,
14}
15
16impl<'a> Endpoint<Response, (), ()> for DeletePool<'a> {
17    fn method(&self) -> Method {
18        Method::Delete
19    }
20    fn path(&self) -> String {
21        format!(
22            "accounts/{}/load_balancers/pools/{}",
23            self.account_identifier, self.identifier
24        )
25    }
26}
27
28#[derive(Deserialize, Clone, Debug)]
29pub struct Response {
30    id: String,
31}
32impl ApiResultTraits for Response {}