#![allow(unused_imports, clippy::too_many_arguments)]
use reqwest::Method;
use serde::{Deserialize, Serialize};
use crate::client::{Client, Request, NO_BODY, NO_QUERY};
use crate::error::Result;
use crate::generated::models;
use crate::multipart::{field_text, FilePart};
use crate::util::encode_path;
#[derive(Debug, Clone)]
pub struct BootstrapApi {
pub(crate) client: Client,
}
impl Client {
pub fn bootstrap(&self) -> BootstrapApi {
BootstrapApi { client: self.clone() }
}
}
impl BootstrapApi {
pub async fn bootstrap(&self, body: &models::BootstrapRequest) -> Result<serde_json::Value> {
self.client
.request_json(Request {
method: Method::POST,
path: "/api/v1/bootstrap".to_string(),
query: NO_QUERY,
body: Some(body),
headers: Vec::new(),
idempotent: true,
})
.await
}
}