cognite/dto/data_modeling/
spaces.rs

1use serde::{Deserialize, Serialize};
2use serde_with::skip_serializing_none;
3
4#[skip_serializing_none]
5#[derive(Serialize, Deserialize, Clone, Debug, Default)]
6#[serde(rename_all = "camelCase")]
7/// Object used to create a space.
8pub struct SpaceCreate {
9    /// Space ID, must be unique. Note that a few spaces are reserved:
10    ///
11    /// `space`, `cdf`, `dms`, `pg3`, `shared`, `system`, `node`, `edge`.
12    pub space: String,
13    /// Space description.
14    pub description: Option<String>,
15    /// Human readable space name.
16    pub name: Option<String>,
17}
18
19#[skip_serializing_none]
20#[derive(Serialize, Deserialize, Clone, Debug, Default)]
21#[serde(rename_all = "camelCase")]
22/// Description of a data modeling space.
23pub struct Space {
24    /// Space ID, must be unique.
25    pub space: String,
26    /// Space description.
27    pub description: Option<String>,
28    /// Human readable space name.
29    pub name: Option<String>,
30    /// Time this space was created, in milliseconds since epoch.
31    pub created_time: i64,
32    /// Time this space was last modified, in milliseconds since epoch.
33    pub last_updated_time: i64,
34    /// Whether this space is a global space.
35    pub is_global: bool,
36}