ory_client_client/models/
session.rs

1/*
2 * Ory APIs
3 *
4 * Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. 
5 *
6 * The version of the OpenAPI document: v0.0.1-alpha.1
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Session {
16    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
17    pub active: Option<bool>,
18    #[serde(rename = "authenticated_at")]
19    pub authenticated_at: String,
20    #[serde(rename = "expires_at")]
21    pub expires_at: String,
22    #[serde(rename = "id")]
23    pub id: String,
24    #[serde(rename = "identity")]
25    pub identity: Box<crate::models::Identity>,
26    #[serde(rename = "issued_at")]
27    pub issued_at: String,
28}
29
30impl Session {
31    pub fn new(authenticated_at: String, expires_at: String, id: String, identity: crate::models::Identity, issued_at: String) -> Session {
32        Session {
33            active: None,
34            authenticated_at,
35            expires_at,
36            id,
37            identity: Box::new(identity),
38            issued_at,
39        }
40    }
41}
42
43