Skip to main content

uarp_sdk/generated/api/
bootstrap.rs

1// Code generated by @uarp/codegen from spec/openapi.json. DO NOT EDIT.
2//!
3//! First-time platform setup
4
5#![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/// First-time platform setup
17#[derive(Debug, Clone)]
18pub struct BootstrapApi {
19    pub(crate) client: Client,
20}
21
22impl Client {
23    /// First-time platform setup
24    pub fn bootstrap(&self) -> BootstrapApi {
25        BootstrapApi { client: self.clone() }
26    }
27}
28
29impl BootstrapApi {
30    /// Bootstrap the platform (first-time setup)
31    ///
32    /// `POST /api/v1/bootstrap`
33    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}