1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// this file is @generated
use serde::{Deserialize, Serialize};
use super::{app_portal_capability::AppPortalCapability, application_in::ApplicationIn};
#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)]
pub struct AppPortalAccessIn {
/// Optionally creates a new application while generating the access link.
///
/// If the application id or uid that is used in the path already exists,
/// this argument is ignored.
#[serde(skip_serializing_if = "Option::is_none")]
pub application: Option<ApplicationIn>,
/// Custom capabilities attached to the token, You can combine as many
/// capabilities as necessary.
///
/// The `ViewBase` capability is always required
///
/// - `ViewBase`: Basic read only permissions, does not allow the user to
/// see the endpoint secret.
///
/// - `ViewEndpointSecret`: Allows user to view the endpoint secret.
///
/// - `ManageEndpointSecret`: Allows user to rotate and view the endpoint
/// secret.
///
/// - `ManageTransformations`: Allows user to modify the endpoint
/// transformations.
///
/// - `CreateAttempts`: Allows user to replay missing messages and send
/// example messages.
///
/// - `ManageEndpoint`: Allows user to read/modify any field or
/// configuration of an endpoint (including secrets)
///
/// By default, the token will get all capabilities if the capabilities are
/// not explicitly specified.
#[serde(skip_serializing_if = "Option::is_none")]
pub capabilities: Option<Vec<AppPortalCapability>>,
/// How long the token will be valid for, in seconds.
///
/// Valid values are between 1 hour and 7 days. The default is 7 days.
#[serde(skip_serializing_if = "Option::is_none")]
pub expiry: Option<i32>,
/// The set of feature flags the created token will have access to.
#[serde(rename = "featureFlags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub feature_flags: Option<Vec<String>>,
/// Whether the app portal should be in read-only mode.
#[deprecated]
#[serde(rename = "readOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
/// An optional session ID to attach to the token.
///
/// When expiring tokens with "Expire All", you can include the session ID
/// to only expire tokens that were created with that session ID.
#[serde(rename = "sessionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session_id: Option<String>,
}
impl AppPortalAccessIn {
pub fn new() -> Self {
#[allow(deprecated)]
Self {
application: None,
capabilities: None,
expiry: None,
feature_flags: None,
read_only: None,
session_id: None,
}
}
}