hugging_face_client/api/
delete_repo.rs

1use serde::Serialize;
2
3use crate::RepoType;
4
5/// Request of [`crate::client::Client::delete_repo`]
6#[derive(Debug, Serialize)]
7pub struct DeleteRepoReq<'a> {
8  name: &'a str,
9
10  #[serde(rename = "type")]
11  repo_type: RepoType,
12
13  #[serde(skip_serializing_if = "Option::is_none")]
14  organization: Option<&'a str>,
15}
16
17impl<'a> DeleteRepoReq<'a> {
18  pub fn new(name: &'a str) -> Self {
19    DeleteRepoReq {
20      name,
21      repo_type: RepoType::default(),
22      organization: None,
23    }
24  }
25
26  pub fn repo_type(mut self, repo_type: RepoType) -> Self {
27    self.repo_type = repo_type;
28    self
29  }
30
31  pub fn organization(mut self, organization: &'a str) -> Self {
32    self.organization = Some(organization);
33    self
34  }
35}
36
37// Response of [`crate::client::Client::delete_repo`]
38// #[derive(Debug, Deserialize)]
39// pub struct DeleteRepoRes {
40//
41// }