|
1 |
| -/* |
2 |
| - * Svix API |
3 |
| - * |
4 |
| - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) |
5 |
| - * |
6 |
| - * The version of the OpenAPI document: 1.1.1 |
7 |
| - * |
8 |
| - * Generated by: https://openapi-generator.tech |
9 |
| - */ |
10 |
| - |
11 |
| -#[allow(unused_imports)] |
12 |
| -use crate::models; |
13 |
| -#[allow(unused_imports)] |
| 1 | +// this file is @generated |
14 | 2 | use serde::{Deserialize, Serialize};
|
15 | 3 |
|
16 |
| -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] |
| 4 | +use super::application_in::ApplicationIn; |
| 5 | + |
| 6 | +#[derive(Clone, Debug, Default, PartialEq, Deserialize, Serialize)] |
17 | 7 | pub struct AppPortalAccessIn {
|
18 |
| - #[serde(rename = "application", skip_serializing_if = "Option::is_none")] |
19 |
| - pub application: Option<Box<models::ApplicationIn>>, |
20 |
| - /// How long the token will be valid for, in seconds. Valid values are |
21 |
| - /// between 1 hour and 7 days. The default is 7 days. |
22 |
| - #[serde(rename = "expiry", skip_serializing_if = "Option::is_none")] |
| 8 | + /// Optionally creates a new application while generating the access link. |
| 9 | + /// If the application id or uid that is used in the path already exists, |
| 10 | + /// this argument is ignored. |
| 11 | + #[serde(skip_serializing_if = "Option::is_none")] |
| 12 | + pub application: Option<ApplicationIn>, |
| 13 | + |
| 14 | + /// How long the token will be valid for, in seconds. |
| 15 | + /// |
| 16 | + /// Valid values are between 1 hour and 7 days. The default is 7 days. |
| 17 | + #[serde(skip_serializing_if = "Option::is_none")] |
23 | 18 | pub expiry: Option<i32>,
|
| 19 | + |
24 | 20 | /// The set of feature flags the created token will have access to.
|
25 |
| - #[serde(rename = "featureFlags", skip_serializing_if = "Option::is_none")] |
| 21 | + #[serde(rename = "featureFlags")] |
| 22 | + #[serde(skip_serializing_if = "Option::is_none")] |
26 | 23 | pub feature_flags: Option<Vec<String>>,
|
| 24 | + |
27 | 25 | /// Whether the app portal should be in read-only mode.
|
28 |
| - #[serde(rename = "readOnly", skip_serializing_if = "Option::is_none")] |
| 26 | + #[serde(rename = "readOnly")] |
| 27 | + #[serde(skip_serializing_if = "Option::is_none")] |
29 | 28 | pub read_only: Option<bool>,
|
30 | 29 | }
|
31 | 30 |
|
32 | 31 | impl AppPortalAccessIn {
|
33 |
| - pub fn new() -> AppPortalAccessIn { |
34 |
| - AppPortalAccessIn { |
| 32 | + pub fn new() -> Self { |
| 33 | + Self { |
35 | 34 | application: None,
|
36 | 35 | expiry: None,
|
37 | 36 | feature_flags: None,
|
|
0 commit comments