github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/sts_auth_request.rs (about) 1 /* 2 * lakeFS API 3 * 4 * lakeFS HTTP API 5 * 6 * The version of the OpenAPI document: 1.0.0 7 * Contact: services@treeverse.io 8 * Generated by: https://openapi-generator.tech 9 */ 10 11 use crate::models; 12 13 #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 14 pub struct StsAuthRequest { 15 #[serde(rename = "code")] 16 pub code: String, 17 #[serde(rename = "state")] 18 pub state: String, 19 #[serde(rename = "redirect_uri")] 20 pub redirect_uri: String, 21 /// The time-to-live for the generated token in seconds. The default value is 3600 seconds (1 hour) maximum time allowed is 12 hours. 22 #[serde(rename = "ttl_seconds", skip_serializing_if = "Option::is_none")] 23 pub ttl_seconds: Option<i64>, 24 } 25 26 impl StsAuthRequest { 27 pub fn new(code: String, state: String, redirect_uri: String) -> StsAuthRequest { 28 StsAuthRequest { 29 code, 30 state, 31 redirect_uri, 32 ttl_seconds: None, 33 } 34 } 35 } 36