uarp_sdk/generated/api/
bootstrap.rs1#![allow(unused_imports, clippy::too_many_arguments)]
6
7use reqwest::Method;
8use serde::{Deserialize, Serialize};
9
10use crate::client::{Client, Request, NO_BODY, NO_QUERY};
11use crate::error::Result;
12use crate::generated::models;
13use crate::multipart::{field_text, FilePart};
14use crate::util::encode_path;
15
16#[derive(Debug, Clone)]
18pub struct BootstrapApi {
19 pub(crate) client: Client,
20}
21
22impl Client {
23 pub fn bootstrap(&self) -> BootstrapApi {
25 BootstrapApi { client: self.clone() }
26 }
27}
28
29impl BootstrapApi {
30 pub async fn bootstrap(&self, body: &models::BootstrapRequest) -> Result<serde_json::Value> {
34 self.client
35 .request_json(Request {
36 method: Method::POST,
37 path: "/api/v1/bootstrap".to_string(),
38 query: NO_QUERY,
39 body: Some(body),
40 headers: Vec::new(),
41 idempotent: true,
42 })
43 .await
44 }
45}