dtz_core/models/
context_response.rs1#[allow(unused)]
12use crate::models;
13
14
15
16
17#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
18pub struct ContextResponse {
19 #[serde(rename = "contextId")]
20 pub context_id: dtz_identifier::ContextId,
21 #[serde(rename = "owner")]
22 pub owner: dtz_identifier::IdentityId,
23 #[serde(rename = "created")]
24 pub created: String,
25 #[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
26 pub alias: Option<String>,
27}
28
29impl ContextResponse {
30 pub fn new(context_id: dtz_identifier::ContextId, owner: dtz_identifier::IdentityId, created: String) -> ContextResponse {
31 ContextResponse {
32 context_id,
33 owner,
34 created,
35 alias: None,
36 }
37 }
38}
39
40