Skip to main content

akeyless_api/models/
create_artifactory_target.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/// CreateArtifactoryTarget : createArtifactoryTarget is a command that creates a new target. [Deprecated: Use target-create-artifactory command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateArtifactoryTarget {
17    /// Artifactory Admin Name
18    #[serde(rename = "artifactory-admin-name")]
19    pub artifactory_admin_name: String,
20    /// Artifactory Admin password
21    #[serde(rename = "artifactory-admin-pwd")]
22    pub artifactory_admin_pwd: String,
23    /// Base URL
24    #[serde(rename = "base-url")]
25    pub base_url: String,
26    /// Deprecated - use description
27    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
28    pub comment: Option<String>,
29    /// Description of the object
30    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
31    pub description: Option<String>,
32    /// Set output format to JSON
33    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
34    pub json: Option<bool>,
35    /// The name of a key used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
36    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
37    pub key: Option<String>,
38    /// Set the maximum number of versions, limited by the account settings defaults.
39    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
40    pub max_versions: Option<String>,
41    /// Target name
42    #[serde(rename = "name")]
43    pub name: String,
44    /// Authentication token (see `/auth` and `/configure`)
45    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
46    pub token: Option<String>,
47    /// The universal identity token, Required only for universal_identity authentication
48    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
49    pub uid_token: Option<String>,
50}
51
52impl CreateArtifactoryTarget {
53    /// createArtifactoryTarget is a command that creates a new target. [Deprecated: Use target-create-artifactory command]
54    pub fn new(artifactory_admin_name: String, artifactory_admin_pwd: String, base_url: String, name: String) -> CreateArtifactoryTarget {
55        CreateArtifactoryTarget {
56            artifactory_admin_name,
57            artifactory_admin_pwd,
58            base_url,
59            comment: None,
60            description: None,
61            json: None,
62            key: None,
63            max_versions: None,
64            name,
65            token: None,
66            uid_token: None,
67        }
68    }
69}
70