windmill_api/models/set_git_credential_request.rs
1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.816.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SetGitCredentialRequest {
16 /// The repository the credential is for, and the key it is stored under. It is served for this repository and no other, so repointing a resource elsewhere cannot carry the token along.
17 #[serde(rename = "repo_url")]
18 pub repo_url: String,
19 /// The access token, as pasted
20 #[serde(rename = "token")]
21 pub token: String,
22}
23
24impl SetGitCredentialRequest {
25 pub fn new(repo_url: String, token: String) -> SetGitCredentialRequest {
26 SetGitCredentialRequest {
27 repo_url,
28 token,
29 }
30 }
31}
32