Skip to main content

akeyless_api/models/
create_salesforce_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/// CreateSalesforceTarget : createSalesforceTarget is a command that creates a new target. [Deprecated: Use target-create-salesforce command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateSalesforceTarget {
17    /// Base64 encoded PEM of the connected app private key (relevant for JWT auth only)
18    #[serde(rename = "app-private-key-data", skip_serializing_if = "Option::is_none")]
19    pub app_private_key_data: Option<String>,
20    /// type of the auth flow ('jwt' / 'user-password')
21    #[serde(rename = "auth-flow")]
22    pub auth_flow: String,
23    /// Base64 encoded PEM cert to use when uploading a new key to Salesforce
24    #[serde(rename = "ca-cert-data", skip_serializing_if = "Option::is_none")]
25    pub ca_cert_data: Option<String>,
26    /// name of the certificate in Salesforce tenant to use when uploading new key
27    #[serde(rename = "ca-cert-name", skip_serializing_if = "Option::is_none")]
28    pub ca_cert_name: Option<String>,
29    /// Client ID of the oauth2 app to use for connecting to Salesforce
30    #[serde(rename = "client-id")]
31    pub client_id: String,
32    /// Client secret of the oauth2 app to use for connecting to Salesforce (required for password flow)
33    #[serde(rename = "client-secret", skip_serializing_if = "Option::is_none")]
34    pub client_secret: Option<String>,
35    /// Deprecated - use description
36    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
37    pub comment: Option<String>,
38    /// Description of the object
39    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
40    pub description: Option<String>,
41    /// The email of the user attached to the oauth2 app used for connecting to Salesforce
42    #[serde(rename = "email")]
43    pub email: String,
44    /// Set output format to JSON
45    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
46    pub json: Option<bool>,
47    /// The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
48    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
49    pub key: Option<String>,
50    /// Set the maximum number of versions, limited by the account settings defaults.
51    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
52    pub max_versions: Option<String>,
53    /// Target name
54    #[serde(rename = "name")]
55    pub name: String,
56    /// The password of the user attached to the oauth2 app used for connecting to Salesforce (required for user-password flow)
57    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
58    pub password: Option<String>,
59    /// The security token of the user attached to the oauth2 app used for connecting to Salesforce  (required for user-password flow)
60    #[serde(rename = "security-token", skip_serializing_if = "Option::is_none")]
61    pub security_token: Option<String>,
62    /// Url of the Salesforce tenant
63    #[serde(rename = "tenant-url")]
64    pub tenant_url: String,
65    /// Authentication token (see `/auth` and `/configure`)
66    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
67    pub token: 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 CreateSalesforceTarget {
74    /// createSalesforceTarget is a command that creates a new target. [Deprecated: Use target-create-salesforce command]
75    pub fn new(auth_flow: String, client_id: String, email: String, name: String, tenant_url: String) -> CreateSalesforceTarget {
76        CreateSalesforceTarget {
77            app_private_key_data: None,
78            auth_flow,
79            ca_cert_data: None,
80            ca_cert_name: None,
81            client_id,
82            client_secret: None,
83            comment: None,
84            description: None,
85            email,
86            json: None,
87            key: None,
88            max_versions: None,
89            name,
90            password: None,
91            security_token: None,
92            tenant_url,
93            token: None,
94            uid_token: None,
95        }
96    }
97}
98