args_api/endpoint/runner/
create_runner.rs1use serde::{Deserialize, Serialize};
2
3use crate::{endpoint::Endpoint, resource::RunnerResource};
4
5pub struct CreateRunner;
6
7impl Endpoint for CreateRunner {
8 const PATH: &'static str = "/ci/runner/{owner}";
9 const METHOD: http::Method = http::Method::POST;
10
11 type Request = CreateRunnerRequest;
12 type Response = CreateRunnerResponse;
13}
14
15#[derive(ApiRequest, Debug, Serialize, Deserialize)]
16pub struct CreateRunnerRequest {
17 pub name: String,
18 pub owner_type: String,
19}
20
21pub type CreateRunnerResponse = RunnerResource;