Skip to main content

akeyless_api/models/
share_item.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ShareItem {
16    /// for personal password manager
17    #[serde(rename = "accessibility", skip_serializing_if = "Option::is_none")]
18    pub accessibility: Option<String>,
19    /// Action to be performed on the item [start/stop/describe]
20    #[serde(rename = "action")]
21    pub action: String,
22    /// List of emails to start/stop sharing the secret with
23    #[serde(rename = "emails", skip_serializing_if = "Option::is_none")]
24    pub emails: Option<Vec<String>>,
25    /// Item name
26    #[serde(rename = "item-name")]
27    pub item_name: String,
28    /// Set output format to JSON
29    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
30    pub json: Option<bool>,
31    /// Share type [email/token]
32    #[serde(rename = "share-type", skip_serializing_if = "Option::is_none")]
33    pub share_type: Option<String>,
34    /// Shared token ids in order to stop sharing a secret
35    #[serde(rename = "shared-token-id", skip_serializing_if = "Option::is_none")]
36    pub shared_token_id: Option<Vec<String>>,
37    /// Authentication token (see `/auth` and `/configure`)
38    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
39    pub token: Option<String>,
40    /// TTL of the Availability of the shared secret in seconds
41    #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
42    pub ttl: Option<i32>,
43    /// The universal identity token, Required only for universal_identity authentication
44    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
45    pub uid_token: Option<String>,
46    /// ViewOnlyOnce Shared secrets can only be viewed once [true/false]
47    #[serde(rename = "view-once", skip_serializing_if = "Option::is_none")]
48    pub view_once: Option<bool>,
49}
50
51impl ShareItem {
52    pub fn new(action: String, item_name: String) -> ShareItem {
53        ShareItem {
54            accessibility: None,
55            action,
56            emails: None,
57            item_name,
58            json: None,
59            share_type: None,
60            shared_token_id: None,
61            token: None,
62            ttl: None,
63            uid_token: None,
64            view_once: None,
65        }
66    }
67}
68