Skip to main content

akeyless_api/models/
dynamic_secret_create_gitlab.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DynamicSecretCreateGitlab : dynamicSecretCreateGitlab is a command that creates gitlab dynamic secret
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DynamicSecretCreateGitlab {
17    /// Protection from accidental deletion of this object [true/false]
18    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
19    pub delete_protection: Option<String>,
20    /// Description of the object
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// Gitlab access token
24    #[serde(rename = "gitlab-access-token", skip_serializing_if = "Option::is_none")]
25    pub gitlab_access_token: Option<String>,
26    /// Gitlab access token type [project,group]
27    #[serde(rename = "gitlab-access-type")]
28    pub gitlab_access_type: String,
29    /// Gitlab tls certificate (base64 encoded)
30    #[serde(rename = "gitlab-certificate", skip_serializing_if = "Option::is_none")]
31    pub gitlab_certificate: Option<String>,
32    /// Gitlab role
33    #[serde(rename = "gitlab-role", skip_serializing_if = "Option::is_none")]
34    pub gitlab_role: Option<String>,
35    /// Comma-separated list of access token scopes to grant
36    #[serde(rename = "gitlab-token-scopes")]
37    pub gitlab_token_scopes: String,
38    /// Gitlab base url
39    #[serde(rename = "gitlab-url", skip_serializing_if = "Option::is_none")]
40    pub gitlab_url: Option<String>,
41    /// Gitlab group name, required for access-type=group
42    #[serde(rename = "group-name", skip_serializing_if = "Option::is_none")]
43    pub group_name: Option<String>,
44    /// Gitlab project name, required for access-type=project
45    #[serde(rename = "installation-organization", skip_serializing_if = "Option::is_none")]
46    pub installation_organization: Option<String>,
47    /// Additional custom fields to associate with the item
48    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
49    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
50    /// Set output format to JSON
51    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
52    pub json: Option<bool>,
53    /// Dynamic secret name
54    #[serde(rename = "name")]
55    pub name: String,
56    /// Add tags attached to this object
57    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
58    pub tags: Option<Vec<String>>,
59    /// Target name
60    #[serde(rename = "target-name", skip_serializing_if = "Option::is_none")]
61    pub target_name: Option<String>,
62    /// Authentication token (see `/auth` and `/configure`)
63    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
64    pub token: Option<String>,
65    /// Access Token TTL
66    #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
67    pub ttl: Option<String>,
68    /// The universal identity token, Required only for universal_identity authentication
69    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
70    pub uid_token: Option<String>,
71}
72
73impl DynamicSecretCreateGitlab {
74    /// dynamicSecretCreateGitlab is a command that creates gitlab dynamic secret
75    pub fn new(gitlab_access_type: String, gitlab_token_scopes: String, name: String) -> DynamicSecretCreateGitlab {
76        DynamicSecretCreateGitlab {
77            delete_protection: None,
78            description: None,
79            gitlab_access_token: None,
80            gitlab_access_type,
81            gitlab_certificate: None,
82            gitlab_role: None,
83            gitlab_token_scopes,
84            gitlab_url: None,
85            group_name: None,
86            installation_organization: None,
87            item_custom_fields: None,
88            json: None,
89            name,
90            tags: None,
91            target_name: None,
92            token: None,
93            ttl: None,
94            uid_token: None,
95        }
96    }
97}
98