dtz-core 2.3.6

a generated client for the DTZ Core API
Documentation
/*
 * DTZ Core Api
 *
 * a generated client for the DTZ Core API
 *
 * Contact: jens@apimeister.com
 * Generated by: https://openapi-generator.tech
 */

#[allow(unused_imports)]
use crate::models;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContextResponse {
    #[serde(rename = "contextId")]
    pub context_id: dtz_identifier::ContextId,
    #[serde(rename = "owner")]
    pub owner: dtz_identifier::IdentityId,
    #[serde(rename = "created")]
    pub created: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
    pub alias: Option<String>,
}

impl ContextResponse {
    pub fn new(context_id: dtz_identifier::ContextId, owner: dtz_identifier::IdentityId, created: chrono::DateTime<chrono::FixedOffset>) -> ContextResponse {
        ContextResponse {
            context_id,
            owner,
            created,
            alias: None,
        }
    }
}