Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions rust/cubeorchestrator/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@ pub enum CompareDateRangeType {
Multi(Vec<Vec<String>>),
}

#[derive(Debug, Clone, Serialize, Deserialize, Hash, Eq, PartialEq)]
pub struct ExtendedDimensionFormat {
#[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(rename = "type")]
pub format_type: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum DimensionFormat {
Single(String),
Extended(ExtendedDimensionFormat),
}

// We can do nothing with JS functions here,
// but to keep DTOs in sync with reality, let's keep it.
pub type JsFunction = String;
Expand Down Expand Up @@ -164,7 +179,7 @@ pub struct ConfigItem {
#[serde(skip_serializing_if = "Option::is_none")]
pub member_type: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
pub format: Option<DimensionFormat>,
#[serde(skip_serializing_if = "Option::is_none")]
pub meta: Option<Value>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -198,7 +213,7 @@ pub struct AnnotatedConfigItem {
#[serde(skip_serializing_if = "Option::is_none")]
pub member_type: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
pub format: Option<DimensionFormat>,
#[serde(skip_serializing_if = "Option::is_none")]
pub meta: Option<Value>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
Loading