dtz_core/models/
context_response.rs

1/*
2 * DTZ Core Api
3 *
4 * a generated client for the DTZ Core API
5 *
6 * The version of the OpenAPI document: 2.0.0
7 * Contact: jens@apimeister.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[allow(unused_imports)]
12use crate::models;
13#[allow(unused_imports)]
14use serde::{Deserialize, Serialize};
15
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct ContextResponse {
18    #[serde(rename = "contextId")]
19    pub context_id: dtz_identifier::ContextId,
20    #[serde(rename = "owner")]
21    pub owner: dtz_identifier::IdentityId,
22    #[serde(rename = "created")]
23    pub created: String,
24    #[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
25    pub alias: Option<String>,
26}
27
28impl ContextResponse {
29    pub fn new(context_id: dtz_identifier::ContextId, owner: dtz_identifier::IdentityId, created: String) -> ContextResponse {
30        ContextResponse {
31            context_id,
32            owner,
33            created,
34            alias: None,
35        }
36    }
37}
38