Skip to main content

akeyless_api/models/
target_create_splunk.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/// TargetCreateSplunk : targetCreateSplunk is a command that creates a new splunk target
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TargetCreateSplunk {
17    /// Splunk token audience (required when using token authentication for rotation)
18    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
19    pub audience: Option<String>,
20    /// Description of the object
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// Set output format to JSON
24    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
25    pub json: Option<bool>,
26    /// The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
27    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
28    pub key: Option<String>,
29    /// Set the maximum number of versions, limited by the account settings defaults.
30    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
31    pub max_versions: Option<String>,
32    /// Target name
33    #[serde(rename = "name")]
34    pub name: String,
35    /// Splunk Password (used when authenticating with username/password)
36    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
37    pub password: Option<String>,
38    /// Splunk Token (used when authenticating with token)
39    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
40    pub token: Option<String>,
41    /// Splunk Token Owner (required when using token authentication for rotation)
42    #[serde(rename = "token-owner", skip_serializing_if = "Option::is_none")]
43    pub token_owner: Option<String>,
44    /// The universal identity token, Required only for universal_identity authentication
45    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
46    pub uid_token: Option<String>,
47    /// Splunk server URL
48    #[serde(rename = "url")]
49    pub url: String,
50    /// Use TLS certificate verification when connecting to the Splunk management API
51    #[serde(rename = "use-tls", skip_serializing_if = "Option::is_none")]
52    pub use_tls: Option<bool>,
53    /// Splunk Username (used when authenticating with username/password)
54    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
55    pub username: Option<String>,
56}
57
58impl TargetCreateSplunk {
59    /// targetCreateSplunk is a command that creates a new splunk target
60    pub fn new(name: String, url: String) -> TargetCreateSplunk {
61        TargetCreateSplunk {
62            audience: None,
63            description: None,
64            json: None,
65            key: None,
66            max_versions: None,
67            name,
68            password: None,
69            token: None,
70            token_owner: None,
71            uid_token: None,
72            url,
73            use_tls: None,
74            username: None,
75        }
76    }
77}
78